ProjectView.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #ifndef PROJECTVIEW_H
  2. #define PROJECTVIEW_H
  3. #include <QWidget>
  4. class ProjectInfo;
  5. class IndexSystemWidget;
  6. class EvalSchemeWidget2;
  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. void exportClicked();
  35. private:
  36. ProjectInfo *m_proj = nullptr;
  37. QVBoxLayout *m_layout = nullptr;
  38. QHBoxLayout *m_headerLayout = nullptr;
  39. QHBoxLayout *m_contentLayout = nullptr;
  40. QLabel *m_title = nullptr;
  41. PushButton *m_export = nullptr;
  42. PushButton *m_close = nullptr;
  43. TreeWidget *m_tree = nullptr;
  44. QWidget *m_seperator = nullptr;
  45. QStackedWidget *m_stack = nullptr;
  46. IndexSystemWidget *m_indexSystem = nullptr;
  47. EvalSchemeWidget2 *m_evalScheme = nullptr;
  48. DataCollectionWidget *m_dataCollection = nullptr;
  49. DataProcessingWidget *m_dataProcessing = nullptr;
  50. };
  51. #endif // PROJECTVIEW_H