50 lines
937 B
C
50 lines
937 B
C
|
#ifndef READTHREAD_H
|
||
|
#define READTHREAD_H
|
||
|
|
||
|
#include <QThread>
|
||
|
#include <QFile>
|
||
|
#include <QRegularExpression>
|
||
|
#include <QDateTime>
|
||
|
#include "global.h"
|
||
|
|
||
|
|
||
|
class ReadThread : public QThread {
|
||
|
Q_OBJECT
|
||
|
public:
|
||
|
explicit ReadThread(QObject *parent = nullptr);
|
||
|
|
||
|
bool isNumeric(QString data);
|
||
|
|
||
|
signals:
|
||
|
|
||
|
void clearCombo();
|
||
|
|
||
|
void showStatusbar(QString str);
|
||
|
|
||
|
void setProgressBar(int bytesRead);
|
||
|
|
||
|
void setBeginTime(QDateTime beginTime);
|
||
|
|
||
|
void setEndTime(QDateTime beginTime);
|
||
|
|
||
|
void addCombo(QStringList names);
|
||
|
|
||
|
void closeProg();
|
||
|
|
||
|
protected:
|
||
|
void run() Q_DECL_OVERRIDE;
|
||
|
|
||
|
private:
|
||
|
QRegularExpression dateTimeRegex;
|
||
|
QRegularExpressionMatch matchDateTime;
|
||
|
QRegularExpression jdRegex;
|
||
|
QRegularExpressionMatch matchLogLevel;
|
||
|
QRegularExpression pattern;
|
||
|
QRegularExpressionMatch patternMatch;
|
||
|
QRegularExpression kexue;
|
||
|
QRegularExpressionMatch kexueMatch;
|
||
|
|
||
|
};
|
||
|
|
||
|
#endif // READTHREAD_H
|