1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- #ifndef PROFESSORINPUTTABLE_H
- #define PROFESSORINPUTTABLE_H
- #include <QDialog>
- #include <QPushButton>
- #include <QStackedWidget>
- #include <QHBoxLayout>
- #include <QVBoxLayout>
- #include <QTableWidget>
- #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<NodeMatrixInfo *> getTableWidgetContent(QString professorName);
- QList<NodeMatrixInfo *> getTableWidgetContent(QMap<int, QMap<QString, QTableWidget *>> pageTabAndCorrTables);
- QMap<int, QMap<QString, QTableWidget *>>
- setTableWidgetContent(QList<NodeMatrixInfo *> datas, QMap<int, QMap<QString, QTableWidget *>> pageTabAndCorrTables);
- int getStackedWidgetPages();
- void showTables();
- QMap<QString, QSet<QString>> getTabWidgetHeaderLabel(int currentStackWidgetPage);
- QTableWidget *createTable(QStringList tableNames);
- QTabWidget * createTabWidget(QMap<QString, QSet<QString>> 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<int, QList<QTableWidget* >> pageAndCorrTables;
- // QList<QTableWidget* > tmpTables;
- QMap<int, QMap<QString, QTableWidget *>> pageTabAndCorrTables;
- QMap<QString, QTableWidget *> tabAndCorrTable;
- QList<NodeMatrixInfo *> datas;
- };
- #endif // PROFESSORINPUTTABLE_H
|