#ifndef PROFESSORINPUTTABLE_H #define PROFESSORINPUTTABLE_H #include #include #include #include #include #include #include "dbService/ClassSet.h" namespace Ui { class ProfessorInputTable; } class ProfessorInputTable : public QDialog { Q_OBJECT public: explicit ProfessorInputTable(QWidget *parent = nullptr); ~ProfessorInputTable(); void Init(); void InitInterface(); void addStackWidgetPage(int pages); bool IsTableEmpty(QTableWidget *tableWidget); bool IsQStringListEqual(QStringList tabList, QStringList nextList); QList getTableWidgetContent(QString professorName); QList getTableWidgetContent(QMap> pageTabAndCorrTables); QMap> setTableWidgetContent(QList datas, QMap> pageTabAndCorrTables); int getStackedWidgetPages(); void showTables(); QMap> getTabWidgetHeaderLabel(int currentStackWidgetPage); QTableWidget *createTable(QStringList tableNames); QTabWidget * createTabWidget(QMap> corrElements, int currentPage); private: Ui::ProfessorInputTable *ui; private: QWidget *m_widget; QPushButton *lastPageBtn; QPushButton *nextPageBtn; QPushButton *restoreBtn; QFrame * m_frame; QStackedWidget *m_stackWidget; QVBoxLayout *mainLayout; QVBoxLayout *frameLayout; QHBoxLayout *btnLayout; private slots: void switchToNextPage(); void switchToLastPage(); void testfunction(); private: int stackedWidgetPages; // QMap> pageAndCorrTables; // QList tmpTables; QMap> pageTabAndCorrTables; QMap tabAndCorrTable; QList datas; }; #endif // PROFESSORINPUTTABLE_H