完成文件读取
This commit is contained in:
49
readthread.h
Normal file
49
readthread.h
Normal file
@ -0,0 +1,49 @@
|
||||
#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
|
Reference in New Issue
Block a user