ExpertManageView.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. QList<QFUser *> searchResult() const;
  35. private slots:
  36. void slotAddExpertClicked();
  37. void slotDetailClicked();
  38. void slotDeleteClicked();
  39. void slotListSelectionChanged();
  40. void slotListItemDoubleClicked(int row);
  41. void slotSearchTextChanged();
  42. void slotConfirmAddExpert();
  43. void slotConfirmDeleteExpert();
  44. private:
  45. bool m_initilized = false;
  46. QVBoxLayout *m_vBoxLayout = nullptr;
  47. QLabel *m_titleLabel = nullptr;
  48. QHBoxLayout *m_hBoxLayout = nullptr;
  49. LineEdit *m_searchLineEdit = nullptr;
  50. PushButton *m_addExpertButton = nullptr;
  51. ToolButton *m_detailButton = nullptr;
  52. ToolButton *m_deleteButton = nullptr;
  53. ExpertInfoWidget *m_expertInfoWidget = nullptr;
  54. ExpertListWidget *m_expertListWidget = nullptr;
  55. QList<QFUser *> m_userList;
  56. };
  57. #endif // EXPERTMANAGEVIEW_H