feat: 添加ElaWidgetTool库
This commit is contained in:
29
ElaWidgetTools/ElaLog.h
Normal file
29
ElaWidgetTools/ElaLog.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#ifndef ELALOG_H
|
||||
#define ELALOG_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#include "ElaProperty.h"
|
||||
#include "ElaSingleton.h"
|
||||
|
||||
class ElaLogPrivate;
|
||||
class ELA_EXPORT ElaLog : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_Q_CREATE(ElaLog)
|
||||
Q_PROPERTY_CREATE_Q_H(QString, LogSavePath)
|
||||
Q_PROPERTY_CREATE_Q_H(QString, LogFileName)
|
||||
Q_PROPERTY_CREATE_Q_H(bool, IsLogFileNameWithTime)
|
||||
Q_SINGLETON_CREATE_H(ElaLog);
|
||||
|
||||
private:
|
||||
explicit ElaLog(QObject* parent = nullptr);
|
||||
~ElaLog();
|
||||
|
||||
public:
|
||||
void initMessageLog(bool isEnable);
|
||||
Q_SIGNALS:
|
||||
void logMessage(QString log);
|
||||
};
|
||||
|
||||
#endif // ELALOG_H
|
||||
Reference in New Issue
Block a user