12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- #ifndef EXPERTINFOWIDGET_H
- #define EXPERTINFOWIDGET_H
- #include <QWidget>
- class LineEdit;
- class PasswordLineEdit;
- class PushButton;
- class TextEdit;
- class QVBoxLayout;
- class QHBoxLayout;
- class QGridLayout;
- class QLabel;
- ///
- /// 专家信息页面
- class ExpertInfoWidget : public QWidget
- {
- Q_OBJECT
- public:
- enum Mode
- {
- Add, // 新增
- Update, // 编辑
- Read, // 查看
- };
- explicit ExpertInfoWidget(QWidget *parent = nullptr);
- void setMode(Mode mode);
- void clearInputs();
- private:
- void initWindow();
- void initialize();
- void initLayout();
- void connectSignalsAndSlots();
- void updateState();
- private slots:
- void slotConfirm();
- void slotCancel();
- signals:
- private:
- Mode m_mode = Add;
- QVBoxLayout *m_vBoxLayout = nullptr;
- QGridLayout *m_gridLayout = nullptr;
- QLabel *m_idLabel = nullptr;
- LineEdit *m_idLineEdit = nullptr;
- QLabel *m_passwordLabel = nullptr;
- PasswordLineEdit *m_passwordLineEdit = nullptr;
- QLabel *m_nameLabel = nullptr;
- LineEdit *m_nameLineEdit = nullptr;
- QLabel *m_companyLabel = nullptr;
- LineEdit *m_companyLineEdit = nullptr;
- QLabel *m_jobLabel = nullptr;
- LineEdit *m_jobLineEdit = nullptr;
- QLabel *m_majorLabel = nullptr;
- LineEdit *m_majorLineEdit = nullptr;
- QLabel *m_contactInfoLabel = nullptr;
- LineEdit *m_contactInfoLineEdit = nullptr;
- QLabel *m_noteLabel = nullptr;
- TextEdit *m_noteTextEdit = nullptr;
- QHBoxLayout *m_hBoxLayout = nullptr;
- PushButton *m_confirmButton = nullptr;
- PushButton *m_cancelButton = nullptr;
- };
- #endif // EXPERTINFOWIDGET_H
|