ExpertManageView.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #ifndef EXPERTMANAGEVIEW_H
  2. #define EXPERTMANAGEVIEW_H
  3. #include <QWidget>
  4. #include "ExpertInfoWidget.h"
  5. class ExpertListWidget;
  6. class QFUser;
  7. class PushButton;
  8. class ToolButton;
  9. class SearchLineEdit;
  10. class QVBoxLayout;
  11. class QHBoxLayout;
  12. class QLabel;
  13. ///
  14. /// \brief The ExpertManageView class
  15. /// 用户管理页面
  16. class ExpertManageView : public QWidget
  17. {
  18. Q_OBJECT
  19. public:
  20. explicit ExpertManageView(QWidget *parent = nullptr);
  21. void showEvent(QShowEvent *event) override;
  22. void hideEvent(QHideEvent *event) override;
  23. signals:
  24. private:
  25. void init();
  26. void initialize();
  27. void initLayout();
  28. void connectSignalsAndSlots();
  29. void setListButtonHidden(bool hidden);
  30. void showExpertInfoWidget(ExpertInfoWidget::Mode mode = ExpertInfoWidget::Info);
  31. void hideExpertInfoWidget();
  32. void showExpertInfo(QFUser *user);
  33. void refreshList();
  34. private slots:
  35. void slotAddExpertClicked();
  36. void slotDetailClicked();
  37. void slotDeleteClicked();
  38. void slotListSelectionChanged();
  39. void slotListItemDoubleClicked(int row);
  40. void slotConfirmAddExpert();
  41. void slotConfirmDeleteExpert();
  42. private:
  43. bool m_initilized = false;
  44. QVBoxLayout *m_vBoxLayout = nullptr;
  45. QLabel *m_titleLabel = nullptr;
  46. QHBoxLayout *m_hBoxLayout = nullptr;
  47. SearchLineEdit *m_searchLineEdit = nullptr;
  48. PushButton *m_addExpertButton = nullptr;
  49. ToolButton *m_detailButton = nullptr;
  50. ToolButton *m_deleteButton = nullptr;
  51. ExpertInfoWidget *m_expertInfoWidget = nullptr;
  52. ExpertListWidget *m_expertListWidget = nullptr;
  53. QList<QFUser *> m_userList;
  54. };
  55. #endif // EXPERTMANAGEVIEW_H