CreateProjWidget.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. void resetInputs();
  21. ProjectInfo projectInfo() const;
  22. signals:
  23. void signalCreate();
  24. private:
  25. void initWindow();
  26. void initWidgets();
  27. void initLayout();
  28. void connectSignalsAndSlots();
  29. void updateCreateButtonState();
  30. private slots:
  31. void slotTextChanged();
  32. void slotCheckBoxChanged();
  33. void slotCreateClicked();
  34. void slotCancelClicked();
  35. private:
  36. // 项目概要
  37. QLabel *m_summary = nullptr; // 项目概要
  38. LineEdit *m_taskName = nullptr; // 任务名称
  39. DateTimeEdit *m_evalTime = nullptr; // 评估时间
  40. LineEdit *m_evalPurpose = nullptr; // 评估目的
  41. LineEdit *m_evalUnit = nullptr; // 评估单位
  42. LineEdit *m_evalCrew = nullptr; // 评估人员
  43. LineEdit *m_rank = nullptr; // 职称
  44. TextEdit *m_note = nullptr; // 备注
  45. QWidget *m_separator = nullptr; // 分隔线
  46. // 项目信息
  47. QLabel *m_nameLabel = nullptr;
  48. LineEdit *m_name = nullptr;
  49. QLabel *m_typeLabel = nullptr;
  50. CheckBox *m_type1 = nullptr;
  51. CheckBox *m_type2 = nullptr;
  52. CheckBox *m_type3 = nullptr;
  53. // 按钮
  54. PushButton *m_confirm = nullptr;
  55. PushButton *m_cancel = nullptr;
  56. // 布局
  57. QVBoxLayout *m_layout = nullptr;
  58. QVBoxLayout *m_summaryLayout = nullptr;
  59. QGridLayout *m_projLayout = nullptr;
  60. QHBoxLayout *m_btnLayout = nullptr;
  61. };
  62. #endif // CREATEPROJWIDGET_H