ProjectView.h 713 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef PROJECTVIEW_H
  2. #define PROJECTVIEW_H
  3. #include <QWidget>
  4. class ProjectInfo;
  5. class QVBoxLayout;
  6. class QHBoxLayout;
  7. class QLabel;
  8. /// 工程视图
  9. class ProjectView : public QWidget
  10. {
  11. Q_OBJECT
  12. public:
  13. explicit ProjectView(ProjectInfo *proj = nullptr, QWidget *parent = nullptr);
  14. void showEvent(QShowEvent *event) override;
  15. void hideEvent(QHideEvent *event) override;
  16. ProjectInfo *proj() const;
  17. void setProject(ProjectInfo *proj);
  18. signals:
  19. private:
  20. void initWidgets();
  21. void initLayout();
  22. void connectSigalsAndSlots();
  23. private:
  24. ProjectInfo *m_proj = nullptr;
  25. bool m_initilized = false;
  26. QHBoxLayout *m_layout = nullptr;
  27. };
  28. #endif // PROJECTVIEW_H