#ifndef LOGQUERY_H
|
#define LOGQUERY_H
|
|
#include <QMainWindow>
|
#include "common.h"
|
#include <QTcpSocket>
|
#pragma execution_character_set("utf-8")
|
|
|
namespace Ui {
|
class LogQuery;
|
}
|
|
class LogQuery : public QMainWindow
|
{
|
Q_OBJECT
|
|
public:
|
explicit LogQuery(QWidget *parent = 0);
|
explicit LogQuery(QTcpSocket *client,QWidget *parent = 0);
|
~LogQuery();
|
|
private slots:
|
void on_pushButton_search_clicked();
|
|
void queryResSlot(LogQueryRes *res);
|
|
void on_pushButton_up_clicked();
|
|
void on_pushButton_down_clicked();
|
|
void onComboBoxIndexChanged(int index);
|
|
private:
|
void displayCurrentPage();
|
Ui::LogQuery *ui;
|
QTcpSocket *m_client;
|
|
QVector<ParsedLog> logs;
|
|
int currentPage = 1; // 当前页码,从1开始
|
int totalPages = 1; // 总页数
|
const int logsPerPage = 10; // 每页显示的日志数量
|
|
void initializeRequestData(LogQueryReq* req);//初始化请求数据
|
void updatePageLabel();
|
};
|
|
#endif // LOGQUERY_H
|