12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- #ifndef DATATABLEWIDGET_H
- #define DATATABLEWIDGET_H
- #include <QWidget>
- class CMind;
- class ProjectInfo;
- class PushButton;
- class QLabel;
- class QTabWidget;
- class QVBoxLayout;
- class QHBoxLayout;
- /**
- * @brief The DataTableWidget class
- * 数据表, 整体上是包含多个 QTableView 的 QTabWidget
- */
- class DataTableWidget : public QWidget
- {
- Q_OBJECT
- public:
- explicit DataTableWidget(ProjectInfo *proj, int indexType, QWidget *parent = nullptr);
- void initWidget();
- void initLayout();
- void connectSignalsAndSlots();
- void setupMind();
- void setupTabWidget();
- int currentPage() const;
- void setCurrentPage(int p);
- void updateCurrentTable();
- signals:
- public slots:
- void slotPrevious();
- void slotNext();
- void slotTabCurrentChanged(int c);
- private:
- ProjectInfo *m_proj = nullptr;
- int m_indexType;
- int m_currentPage = 0;
- CMind *m_mind1 = nullptr;
- CMind *m_mind2 = nullptr;
- QTabWidget *m_dataTab = nullptr;
- QLabel *m_pageLab = nullptr; // 共4页, 当前第2页
- PushButton *m_previous = nullptr; // 上一级指标
- PushButton *m_next = nullptr; // 下一级指标
- QVBoxLayout *m_layout = nullptr;
- QHBoxLayout *m_pageLayout = nullptr;
- bool m_isSettingTable = false;
- };
- #endif // DATATABLEWIDGET_H
|