homeview.h 774 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef HOMEVIEW_H
  2. #define HOMEVIEW_H
  3. #include <QWidget>
  4. #include <QtGui>
  5. #include "networkapi.h"
  6. class HomeView : public QWidget
  7. {
  8. Q_OBJECT
  9. public:
  10. HomeView(QWidget *parent);
  11. void resetUI();
  12. void init(NetworkApi *networkApi);
  13. signals:
  14. void loginComplete(const QString &nick);
  15. private slots:
  16. void tryLogin();
  17. void exitApp();
  18. void processLogin(QString *xmlData);
  19. void processError(QString *errorData);
  20. protected:
  21. void focusInEvent(QFocusEvent *event);
  22. private:
  23. QPushButton *buttonLogin;
  24. QPushButton *buttonExit;
  25. QLineEdit *textNick;
  26. QWidget *picTitle;
  27. QLabel *labelStatus;
  28. QVBoxLayout *vLayout;
  29. NetworkApi *networkApi;
  30. };
  31. #endif // HOMEVIEW_H