EXProjectView.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #ifndef EXPROJECTVIEW_H
  2. #define EXPROJECTVIEW_H
  3. #include <QWidget>
  4. class ProjectInfo;
  5. class EXIndexView;
  6. class EXDataView;
  7. class QPushButton;
  8. class TreeWidget;
  9. class QVBoxLayout;
  10. class QHBoxLayout;
  11. class QLabel;
  12. class QTreeWidgetItem;
  13. class QStackedWidget;
  14. class EXProjectView : public QWidget
  15. {
  16. Q_OBJECT
  17. public:
  18. explicit EXProjectView(ProjectInfo *proj, QWidget *parent = nullptr);
  19. void showEvent(QShowEvent *event) override;
  20. void hideEvent(QHideEvent *event) override;
  21. ProjectInfo *proj() const;
  22. void showEvalWidget(int eval, int task);
  23. private:
  24. void initWidgets();
  25. void initLayout();
  26. void connectSigalsAndSlots();
  27. private slots:
  28. void itemClicked(QTreeWidgetItem *item, int column);
  29. private:
  30. ProjectInfo *m_proj = nullptr;
  31. QVBoxLayout *m_layout = nullptr;
  32. QHBoxLayout *m_headerLayout = nullptr;
  33. QHBoxLayout *m_contentLayout = nullptr;
  34. QLabel *m_title = nullptr;
  35. TreeWidget *m_tree = nullptr;
  36. QWidget *m_seperator = nullptr;
  37. QStackedWidget *m_stack = nullptr;
  38. EXIndexView *m_indexSystem = nullptr;
  39. EXDataView *m_dataCollection = nullptr;
  40. QPushButton *m_export = nullptr;
  41. QPushButton *m_user = nullptr;
  42. };
  43. #endif // EXPROJECTVIEW_H