#ifndef MODELVIEWTABLE_H #define MODELVIEWTABLE_H #include #include #include #include #include #include #include #include #include "dbService/ClassSet.h" namespace Ui { class ModelViewTable; } class ModelViewTable : public QWidget { Q_OBJECT public: explicit ModelViewTable(QWidget *parent = nullptr); ~ModelViewTable(); void init(QList &infos); void setIndexForMessaureMethods(QStringList methods) { indexForMeasureMehods = methods; } void addStackWidgetPage(int pages); int getStackedWidgetPages(QList datas); bool IsTableEmpty(QStandardItemModel *tableModel); bool IsQStringListEqual(QStringList tabList, QStringList nextList); QMap> getTabWidgetHeaderLabel(int currentStackWidgetPage); QTabWidget * createTabWidget(QMap> corrElements, int currentPage); QList getTableViewContent(QMap> pageTabAndCorrTables); void setTableWidgetContent(QList datas, QMap> pageTabAndCorrTables); QStandardItemModel *createModel(QStringList rowHeaderList, QStringList colHeaderList); private: QWidget *m_widget; QPushButton *lastPageBtn; QPushButton *nextPageBtn; QPushButton *restoreBtn; QFrame * m_frame; QStackedWidget *m_stackWidget; QVBoxLayout *mainLayout; QVBoxLayout *frameLayout; QHBoxLayout *btnLayout; QTableView *m_tableView; private: Ui::ModelViewTable *ui; private slots: void switchToNextPage(); void switchToLastPage(); void saveResult(); private: int stackedWidgetPages; // QMap> pageAndCorrTables; // QList tmpTables; QMap> pageTabAndCorrTableModels; QMap tabAndCorrTableModel; QList datas; QStringList indexForMeasureMehods; }; #endif // MODELVIEWTABLE_H