CreateProjWidget.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. /// 创建工程页面
  12. class CreateProjWidget : public QDialog
  13. {
  14. Q_OBJECT
  15. public:
  16. CreateProjWidget(QWidget *parent = nullptr);
  17. const QString projName() const;
  18. bool importanceSelected() const;
  19. bool schemeSelected() const;
  20. void clearInputs();
  21. signals:
  22. void signalCreate();
  23. private:
  24. void initWindow();
  25. void initialize();
  26. void initLayout();
  27. void connectSignalsAndSlots();
  28. void updateCreateButtonState();
  29. private slots:
  30. void slotTextChanged(const QString &text);
  31. void slotCheckBoxChanged(int state);
  32. void slotCreateClicked();
  33. void slotCancelClicked();
  34. private:
  35. QVBoxLayout *m_vBoxLayout = nullptr;
  36. QGridLayout *m_gridLayout = nullptr;
  37. QLabel *m_nameLabel = nullptr;
  38. QLabel *m_typeLabel = nullptr;
  39. LineEdit *m_nameLineEdit = nullptr;
  40. CheckBox *m_importanceEvalCheckBox = nullptr;
  41. CheckBox *m_capaIndexCheckBox = nullptr;
  42. CheckBox *m_techIndexCheckBox = nullptr;
  43. CheckBox *m_schemeEvalCheckBox = nullptr;
  44. CheckBox *m_schemeIndexCheckBox = nullptr;
  45. QHBoxLayout *m_buttonLayout = nullptr;
  46. PushButton *m_createButton = nullptr;
  47. PushButton *m_cancelButton = nullptr;
  48. };
  49. #endif // CREATEPROJWIDGET_H