You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
616 B
C++
30 lines
616 B
C++
#ifndef NMDATALOGFILE_H
|
|
#define NMDATALOGFILE_H
|
|
|
|
#include "nmData_global.h"
|
|
#include <QObject>
|
|
|
|
class QFile;
|
|
class QTextStream;
|
|
|
|
class NM_DATA_EXPORT nmDataLogFile : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit nmDataLogFile(QObject *parent = nullptr);
|
|
~nmDataLogFile();
|
|
// 获取对象,单例模式
|
|
static nmDataLogFile* getInstance();
|
|
// 写日志文件
|
|
void writeLog(const QString &message);
|
|
private:
|
|
static nmDataLogFile* s_instance;
|
|
|
|
QTextStream* m_textStream;
|
|
QFile* m_logFile;
|
|
signals:
|
|
|
|
};
|
|
|
|
#endif // NMDATALOGFILE_H
|