#ifndef EXPERTMANAGEVIEW_H #define EXPERTMANAGEVIEW_H #include #include "ExpertInfoWidget.h" class ExpertListWidget; class QFUser; class PushButton; class ToolButton; class SearchLineEdit; class QVBoxLayout; class QHBoxLayout; class QLabel; /// /// \brief The ExpertManageView class /// 用户管理页面 class ExpertManageView : public QWidget { Q_OBJECT public: explicit ExpertManageView(QWidget *parent = nullptr); void showEvent(QShowEvent *event) override; void hideEvent(QHideEvent *event) override; signals: private: void init(); void initialize(); void initLayout(); void connectSignalsAndSlots(); void setListButtonHidden(bool hidden); void showExpertInfoWidget(ExpertInfoWidget::Mode mode = ExpertInfoWidget::Info); void hideExpertInfoWidget(); void showExpertInfo(QFUser *user); void refreshList(); QList searchResult() const; private slots: void slotAddExpertClicked(); void slotDetailClicked(); void slotDeleteClicked(); void slotListSelectionChanged(); void slotListItemDoubleClicked(int row); void slotSearchTextChanged(); void slotConfirmAddExpert(); void slotConfirmDeleteExpert(); private: bool m_initilized = false; QVBoxLayout *m_vBoxLayout = nullptr; QLabel *m_titleLabel = nullptr; QHBoxLayout *m_hBoxLayout = nullptr; LineEdit *m_searchLineEdit = nullptr; PushButton *m_addExpertButton = nullptr; ToolButton *m_detailButton = nullptr; ToolButton *m_deleteButton = nullptr; ExpertInfoWidget *m_expertInfoWidget = nullptr; ExpertListWidget *m_expertListWidget = nullptr; QList m_userList; }; #endif // EXPERTMANAGEVIEW_H