123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- #ifndef CREATEPROJWIDGET_H
- #define CREATEPROJWIDGET_H
- #include <QDialog>
- class ProjectInfo;
- class LineEdit;
- class CheckBox;
- class PushButton;
- class DateTimeEdit;
- class TextEdit;
- class QVBoxLayout;
- class QHBoxLayout;
- class QGridLayout;
- class QLabel;
- /// 创建工程页面
- class CreateProjWidget : public QDialog
- {
- Q_OBJECT
- public:
- CreateProjWidget(QWidget *parent = nullptr);
- void resetInputs();
- ProjectInfo projectInfo() const;
- signals:
- void signalCreate();
- private:
- void initWindow();
- void initWidgets();
- void initLayout();
- void connectSignalsAndSlots();
- void updateCreateButtonState();
- private slots:
- void slotTextChanged();
- void slotCheckBoxChanged();
- void slotCreateClicked();
- void slotCancelClicked();
- private:
- // 项目概要
- QLabel *m_summary = nullptr; // 项目概要
- LineEdit *m_taskName = nullptr; // 任务名称
- DateTimeEdit *m_evalTime = nullptr; // 评估时间
- LineEdit *m_evalPurpose = nullptr; // 评估目的
- LineEdit *m_evalUnit = nullptr; // 评估单位
- LineEdit *m_evalCrew = nullptr; // 评估人员
- LineEdit *m_rank = nullptr; // 职称
- TextEdit *m_note = nullptr; // 备注
- QWidget *m_separator = nullptr; // 分隔线
- // 项目信息
- QLabel *m_nameLabel = nullptr;
- LineEdit *m_name = nullptr;
- QLabel *m_typeLabel = nullptr;
- CheckBox *m_type1 = nullptr;
- CheckBox *m_type2 = nullptr;
- CheckBox *m_type3 = nullptr;
- // 按钮
- PushButton *m_confirm = nullptr;
- PushButton *m_cancel = nullptr;
- // 布局
- QVBoxLayout *m_layout = nullptr;
- QVBoxLayout *m_summaryLayout = nullptr;
- QGridLayout *m_projLayout = nullptr;
- QHBoxLayout *m_btnLayout = nullptr;
- };
- #endif // CREATEPROJWIDGET_H
|