| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- #ifndef RUNLOGWIDGET_H
- #define RUNLOGWIDGET_H
- #include <QWidget>
- namespace Ui {
- class RunLogWidget;
- }
- class RunLogWidget : public QWidget
- {
- Q_OBJECT
- public:
- explicit RunLogWidget(QWidget *parent = nullptr);
- ~RunLogWidget();
- //刷新
- void UpdateLog();
- private:
- //初始化UI
- void InitUI();
- //添加一行数据
- void AddRowData(int nIndex,int nType,QString nTime,QString strMSG);
- //清空表数据
- void ClearList();
- //计算分页数据
- void calculateTotalPages();
- //更新分页
- void loadPage(int page);
- //更新按钮状态
- void updateButtons();
- private slots:
- //上一页,下一页
- void slot_upPage();
- void slot_downPage();
- private:
- Ui::RunLogWidget *ui;
- int currentPage = 1;
- int totalPages = 0;
- const int perPage = 6;
- };
- #endif // RUNLOGWIDGET_H
|