iVS3D v2.0.0
Loading...
Searching...
No Matches
logfile.h
1#ifndef LOGFILE_H
2#define LOGFILE_H
3
4#include "LogFileParent.h"
5
7 QString name;
8 qint64 elapsedTime;
9 QString startTime;
10 QString stopTime;
11};
12
22class LogFile : public LogFileParent
23{
24 Q_OBJECT
25public:
31 LogFile(const QString &name, bool isPlugin);
36 QString getName() override;
41 QString getCreationTime() override;
46 bool getIsPlugin() override;
51 void setSettings(QMap<QString, QVariant> settings) override;
56 void setInputInfo(std::vector<uint> inputFrames) override;
61 void setResultsInfo(std::vector<uint> keyframes) override;
68 void addCustomEntry(QString entryName, QVariant entryValue, QString type = EMPTY_TYPE) override;
73 void startTimer(QString timerName) override;
77 void stopTimer() override;
82 QJsonObject toQJSON() override;
88 bool print(QString path) override;
89
90signals:
91 void sig_updateLog();
92
93private:
94 QDateTime m_creationTime;
95 bool m_isPlugin;
96 QList<QJsonObject> m_customLog;
97 QList<INTERNAL_PROCEDURE> m_procedureList;
98 QElapsedTimer m_timer;
99 QMap<QString, QVariant> m_settings;
100 QJsonObject m_inputInfo, m_resultInfo;
101 QString m_name;
102 QString m_globalProcedureStart, m_globalProcedureStop;
103 qint64 m_globalProcedureElapsed;
104 QElapsedTimer m_totalProcedures;
105
106 QVariant vectorToVariant(std::vector<uint> vector);
107 QString getCurrentTime();
108};
109
110#endif // LOGFILE_H
The LogFile class logs progress as well as information about a process (e.g. Inport,...
Definition logfile.h:23
QJsonObject toQJSON() override
toQJSON Returns the current state of the log file in form of a QJsonObject
Definition logfile.cpp:104
void setResultsInfo(std::vector< uint > keyframes) override
setResultsInfo allows to log the returned result of the process
Definition logfile.cpp:41
void setInputInfo(std::vector< uint > inputFrames) override
setInputInfo allows to log the used input
Definition logfile.cpp:33
bool getIsPlugin() override
getIsPlugin Returns true if the logged process is a plugin
Definition logfile.cpp:22
QString getCreationTime() override
getCreationTime Returns the time and date when the file was initalized
Definition logfile.cpp:17
QString getName() override
getName Returns the name
Definition logfile.cpp:12
bool print(QString path) override
print Saves the current sate of the log file as a file at the given path
Definition logfile.cpp:151
void addCustomEntry(QString entryName, QVariant entryValue, QString type=EMPTY_TYPE) override
addCustomEntry allows to log with custom entries and types
Definition logfile.cpp:49
void stopTimer() override
stopTimer Stops the currently running timer and logs the surpassed timespan
Definition logfile.cpp:82
void setSettings(QMap< QString, QVariant > settings) override
setSettings Allows to log the used settings
Definition logfile.cpp:27
void startTimer(QString timerName) override
startTimer Starts a timer to measure a specific internal process
Definition logfile.cpp:62
The LogFileParent class logs progress as well as information about a process (e.g....
Definition LogFileParent.h:30
Definition logfile.h:6