formaccountinfo.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #ifndef FORMACCOUNTINFO_H
  2. #define FORMACCOUNTINFO_H
  3. #include <QWidget>
  4. #include <QtGui>
  5. #include "snccore.h"
  6. #include "wscube2.h"
  7. #include "wssso.h"
  8. namespace Ui {
  9. class FormAccountInfo;
  10. }
  11. class FormAccountInfo : public QWidget
  12. {
  13. Q_OBJECT
  14. public:
  15. explicit FormAccountInfo(QWidget *parent = 0);
  16. ~FormAccountInfo();
  17. public slots:
  18. void setAccountInfo(QMap<QString,QString> info);
  19. signals:
  20. void buttonLoginClick();
  21. private slots:
  22. void on_pushButtonLogin_clicked();
  23. void on_pushButtonCharge_clicked();
  24. void on_pushButtonRefreshUserState_clicked();
  25. void onDataUpdated();
  26. private:
  27. void initVariables(); //初始化成员变量
  28. void initUI(); //初始化UI样式
  29. void setAccountAreaUI(AccountLoginState state); //设置账户区域UI;
  30. void changeImage(AccountLoginState state); //切换在不同的用户登录状态时,tip所对应的图片
  31. void refreshAccountInfo();
  32. bool checkLastClickTime(QObject *button);
  33. private:
  34. Ui::FormAccountInfo *ui;
  35. QMap<QString,QString> m_account;
  36. WSCube2 *m_cubews;
  37. WSSSO *m_ssows;
  38. QMap<QString,QDateTime> m_clickTime;
  39. QMovie *m_movie;
  40. AccountLoginState m_state;
  41. };
  42. #endif // FORMACCOUNTINFO_H