DataTableWidget.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #ifndef DATATABLEWIDGET_H
  2. #define DATATABLEWIDGET_H
  3. #include <QWidget>
  4. class CMind;
  5. class ProjectInfo;
  6. class PushButton;
  7. class QLabel;
  8. class QTabWidget;
  9. class QVBoxLayout;
  10. class QHBoxLayout;
  11. class DataTableWidget : public QWidget
  12. {
  13. Q_OBJECT
  14. public:
  15. explicit DataTableWidget(ProjectInfo *proj, int indexType, QWidget *parent = nullptr);
  16. void initWidget();
  17. void initLayout();
  18. void connectSignalsAndSlots();
  19. void setupMind();
  20. void setupTabWidget();
  21. int currentPage() const;
  22. void setCurrentPage(int p);
  23. void updateCurrentTable();
  24. signals:
  25. public slots:
  26. void slotPrevious();
  27. void slotNext();
  28. void slotTabCurrentChanged(int c);
  29. private:
  30. ProjectInfo *m_proj = nullptr;
  31. int m_indexType;
  32. int m_currentPage = 0;
  33. CMind *m_mind1 = nullptr;
  34. CMind *m_mind2 = nullptr;
  35. QTabWidget *m_dataTab = nullptr;
  36. QLabel *m_pageLab = nullptr; // 共4页, 当前第2页
  37. PushButton *m_previous = nullptr; // 上一级指标
  38. PushButton *m_next = nullptr; // 下一级指标
  39. QVBoxLayout *m_layout = nullptr;
  40. QHBoxLayout *m_pageLayout = nullptr;
  41. bool m_isSettingTable = false;
  42. };
  43. #endif // DATATABLEWIDGET_H