CreateProjWidget.h 1.8 KB

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