HomeView.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #ifndef HOMEVIEW_H
  2. #define HOMEVIEW_H
  3. #include <QWidget>
  4. class EngineerInfo;
  5. class CreateProjWidget;
  6. class ProjectStateWidget;
  7. class PushButton;
  8. class LineEdit;
  9. class QVBoxLayout;
  10. class QHBoxLayout;
  11. class QLabel;
  12. ///
  13. /// \brief The HomeView class
  14. /// 首页
  15. class HomeView : public QWidget
  16. {
  17. Q_OBJECT
  18. public:
  19. explicit HomeView(QWidget *parent = nullptr);
  20. void showEvent(QShowEvent *event) override;
  21. void hideEvent(QHideEvent *event) override;
  22. private:
  23. void initialize();
  24. void initLayout();
  25. void connectSignalsAndSlots();
  26. void refreshTable();
  27. QList<EngineerInfo *> searchResult() const;
  28. private slots:
  29. void slotCreateProjClicked();
  30. void slotSearchTextChanged();
  31. private:
  32. bool m_initilized = false;
  33. QVBoxLayout *m_vBoxLayout = nullptr;
  34. QLabel *m_titleLabel = nullptr;
  35. QHBoxLayout *m_hBoxLayout = nullptr;
  36. LineEdit *m_searchLineEdit = nullptr;
  37. PushButton *m_createProjPushButton = nullptr;
  38. ProjectStateWidget *m_projStateWidget = nullptr;
  39. CreateProjWidget *m_createProjWidget = nullptr;
  40. QList<EngineerInfo *> m_projList;
  41. };
  42. #endif // HOMEVIEW_H