12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- #ifndef EXPERTMANAGEVIEW_H
- #define EXPERTMANAGEVIEW_H
- #include <QWidget>
- #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<QFUser *> 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<QFUser *> m_userList;
- };
- #endif // EXPERTMANAGEVIEW_H
|