CreateProjView.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #ifndef CREATEPROJVIEW_H
  2. #define CREATEPROJVIEW_H
  3. #include <QWidget>
  4. class QGridLayout;
  5. class QLabel;
  6. class LineEdit;
  7. class CheckBox;
  8. class PushButton;
  9. ///
  10. /// \brief The CreateProjView class
  11. /// 创建工程页面
  12. class CreateProjView : public QWidget
  13. {
  14. Q_OBJECT
  15. public:
  16. CreateProjView(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. QGridLayout *m_gridLayout = nullptr;
  36. QLabel *m_nameLabel = nullptr;
  37. QLabel *m_typeLabel = nullptr;
  38. LineEdit *m_nameLineEdit = nullptr;
  39. CheckBox *m_importanceCheckBox = nullptr;
  40. CheckBox *m_schemeCheckBox = nullptr;
  41. PushButton *m_createButton = nullptr;
  42. PushButton *m_cancelButton = nullptr;
  43. };
  44. #endif // CREATEPROJVIEW_H