CreateProjWidget.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. #ifndef CREATEPROJWIDGET_H
  2. #define CREATEPROJWIDGET_H
  3. #include <QDialog>
  4. class ProjectInfo;
  5. class LineEdit;
  6. class CheckBox;
  7. class PushButton;
  8. class DateTimeEdit;
  9. class TextEdit;
  10. class QVBoxLayout;
  11. class QHBoxLayout;
  12. class QGridLayout;
  13. class QLabel;
  14. /// 创建工程页面
  15. class CreateProjWidget : public QDialog
  16. {
  17. Q_OBJECT
  18. public:
  19. CreateProjWidget(QWidget *parent = nullptr);
  20. const QString projName() const;
  21. void clearInputs();
  22. ProjectInfo projectInfo() const;
  23. signals:
  24. void signalCreate();
  25. private:
  26. void initWindow();
  27. void initWidgets();
  28. void initLayout();
  29. void connectSignalsAndSlots();
  30. void updateCreateButtonState();
  31. private slots:
  32. void slotTextChanged();
  33. void slotCheckBoxChanged();
  34. void slotCreateClicked();
  35. void slotCancelClicked();
  36. private:
  37. // 项目概要
  38. QLabel *m_summary = nullptr; // 项目概要
  39. LineEdit *m_taskName = nullptr; // 任务名称
  40. DateTimeEdit *m_evalTime = nullptr; // 评估时间
  41. LineEdit *m_evalPurpose = nullptr; // 评估目的
  42. LineEdit *m_evalUnit = nullptr; // 评估单位
  43. LineEdit *m_evalCrew = nullptr; // 评估人员
  44. LineEdit *m_rank = nullptr; // 职称
  45. TextEdit *m_note = nullptr; // 备注
  46. QWidget *m_separator = nullptr; // 分隔线
  47. // 项目信息
  48. QLabel *m_nameLabel = nullptr;
  49. LineEdit *m_name = nullptr;
  50. QLabel *m_typeLabel = nullptr;
  51. CheckBox *m_type1 = nullptr;
  52. CheckBox *m_type2 = nullptr;
  53. CheckBox *m_type3 = nullptr;
  54. // 按钮
  55. PushButton *m_confirm = nullptr;
  56. PushButton *m_cancel = nullptr;
  57. // 布局
  58. QVBoxLayout *m_layout = nullptr;
  59. QVBoxLayout *m_summaryLayout = nullptr;
  60. QGridLayout *m_projLayout = nullptr;
  61. QHBoxLayout *m_btnLayout = nullptr;
  62. };
  63. #endif // CREATEPROJWIDGET_H