68 lines
1.3 KiB
C++
Executable File
68 lines
1.3 KiB
C++
Executable File
#ifndef TABLEPAGEWIDGET_H
|
|
#define TABLEPAGEWIDGET_H
|
|
|
|
#include <QWidget>
|
|
#if _MSC_VER >= 1600
|
|
#pragma execution_character_set("utf-8")
|
|
#endif
|
|
|
|
namespace Ui {
|
|
class TablePageWidget;
|
|
}
|
|
|
|
class TablePageWidget : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit TablePageWidget(QWidget *parent = nullptr);
|
|
~TablePageWidget();
|
|
|
|
public:
|
|
void setTableHeaders(QStringList headerList);
|
|
void setTableData(QStringList dataList);
|
|
void appendTableData(QStringList newDataList);
|
|
|
|
private slots:
|
|
void changeTablePageLine(int idx);
|
|
|
|
void on_toolbuttonBehind_clicked();
|
|
|
|
void on_toolbuttonFront_clicked();
|
|
|
|
void on_toolbutton1_clicked();
|
|
|
|
void on_toolbutton2_clicked();
|
|
|
|
void on_toolbutton3_clicked();
|
|
|
|
void on_toolbutton4_clicked();
|
|
|
|
void on_toolbutton5_clicked();
|
|
|
|
private:
|
|
Ui::TablePageWidget *ui;
|
|
void initForm();
|
|
//每一页的行数
|
|
int pageLine;
|
|
//一共多少页
|
|
int pageTotal;
|
|
//当前页数
|
|
int currentPage;
|
|
//当前页第一行的行号
|
|
int currentLine;
|
|
|
|
int currentFivePage;
|
|
|
|
int TotalFivePage;
|
|
|
|
void setCurrentFivePage(int idx);
|
|
|
|
void setCurrentData();
|
|
|
|
private:
|
|
QStringList dataList;
|
|
};
|
|
|
|
#endif // TABLEPAGEWIDGET_H
|