-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLogController.h
More file actions
38 lines (29 loc) · 794 Bytes
/
Copy pathLogController.h
File metadata and controls
38 lines (29 loc) · 794 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//Класс отвечает за организацию лога
#pragma once
#include <qobject.h>
#include <qobjectdefs.h>
#include <qplaintextedit.h>
#include <qtimer.h>
#include "iec104/iec104_log.h"
class LogController : public QObject
{
Q_OBJECT
public:
explicit LogController(iec104_log* logQueue, QPlainTextEdit* logUI, QObject* parent = nullptr);
~LogController();
void clear();
void setLogState(bool state);
void setLogLevel(bool state);
void copyToClipboard();
void setAutoScrollState(bool state);
signals:
void signal_logUpdated();
private slots:
void slot_timerLogmsg(); // timer for log messages
private:
iec104_log* m_logQueue;
QPlainTextEdit* m_logUI;
bool m_autoScroll = true;
size_t m_loglevel = 0;
QTimer m_tmLogMsg; // timer to show log messages
};