ProjectView.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #ifndef PROJECTVIEW_H
  2. #define PROJECTVIEW_H
  3. #include <QWidget>
  4. class ProjectInfo;
  5. class IndexSystemWidget;
  6. class SchemePlanWidget;
  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. void showEvalWidget(int eval, int task);
  26. signals:
  27. void sigClose();
  28. private:
  29. void initWidgets();
  30. void initLayout();
  31. void connectSigalsAndSlots();
  32. private slots:
  33. void itemClicked(QTreeWidgetItem *item, int column);
  34. private:
  35. ProjectInfo *m_proj = nullptr;
  36. QVBoxLayout *m_layout = nullptr;
  37. QHBoxLayout *m_headerLayout = nullptr;
  38. QHBoxLayout *m_contentLayout = nullptr;
  39. QLabel *m_title = nullptr;
  40. PushButton *m_close = nullptr;
  41. TreeWidget *m_tree = nullptr;
  42. QWidget *m_seperator = nullptr;
  43. QStackedWidget *m_stack = nullptr;
  44. IndexSystemWidget *m_indexSystem = nullptr;
  45. SchemePlanWidget *m_schemeDesign = nullptr;
  46. DataCollectionWidget *m_dataCollection = nullptr;
  47. DataProcessingWidget *m_dataProcessing = nullptr;
  48. };
  49. #endif // PROJECTVIEW_H