ProjectView.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #ifndef PROJECTVIEW_H
  2. #define PROJECTVIEW_H
  3. #include <QWidget>
  4. class ProjectInfo;
  5. class IndexSystemWidget;
  6. class EvalSchemeWidget;
  7. class DataCollectionWidget;
  8. class DataProcessingWidget;
  9. class PushButton;
  10. class TreeWidget;
  11. class QVBoxLayout;
  12. class QHBoxLayout;
  13. class QLabel;
  14. class QTreeWidgetItem;
  15. class QStackedWidget;
  16. /// 工程视图
  17. class ProjectView : public QWidget
  18. {
  19. Q_OBJECT
  20. public:
  21. explicit ProjectView(ProjectInfo *proj = nullptr, QWidget *parent = nullptr);
  22. void showEvent(QShowEvent *event) override;
  23. void hideEvent(QHideEvent *event) override;
  24. ProjectInfo *proj() const;
  25. signals:
  26. void sigClose();
  27. private:
  28. void initWidgets();
  29. void initLayout();
  30. void connectSigalsAndSlots();
  31. private slots:
  32. void itemClicked(QTreeWidgetItem *item, int column);
  33. private:
  34. ProjectInfo *m_proj = nullptr;
  35. QVBoxLayout *m_layout = nullptr;
  36. QHBoxLayout *m_headerLayout = nullptr;
  37. QHBoxLayout *m_contentLayout = nullptr;
  38. QLabel *m_title = nullptr;
  39. PushButton *m_close = nullptr;
  40. TreeWidget *m_tree = nullptr;
  41. QWidget *m_seperator = nullptr;
  42. QStackedWidget *m_stack = nullptr;
  43. IndexSystemWidget *m_indexSystem = nullptr;
  44. EvalSchemeWidget *m_evalScheme = nullptr;
  45. DataCollectionWidget *m_dataCollection = nullptr;
  46. DataProcessingWidget *m_dataProcessing = nullptr;
  47. };
  48. #endif // PROJECTVIEW_H