OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ConnectToLoggerDialog.h
Go to the documentation of this file.
1
4// ###########################################################################################################################################################################################################################################################################################################################
5
6#pragma once
7
8// OpenTwin header
9#include "OTCore/Logger.h"
10#include "OTWidgets/Dialog.h"
11
12// Qt header
13#include <QtCore/qlist.h>
14
15// std header
16#include <list>
17
18class QVBoxLayout;
19class QHBoxLayout;
20class QGridLayout;
21class QLabel;
22class QLineEdit;
23class QPushButton;
24
26 Q_OBJECT
27public:
29 virtual ~ConnectToLoggerDialog();
30
31 const std::list<ot::LogMessage>& messageBuffer(void) const { return m_messageBuffer; };
32
33 QString loggerServiceUrl(void) const;
34
35 void queueConnectRequest(void);
36 void queueRecenterRequest(void);
37
38protected:
39 virtual bool mayCloseDialogWindow(void) const override;
40
41private Q_SLOTS:
42 void slotCancel(void);
43 void slotConnect(void);
44 void slotPingFail(void);
45 void slotRegisterFail(void);
46 void slotDone(void);
47 void slotRecenter(void);
48 void slotEnable(void);
49
50private:
51 void worker(QString _url);
52 void stopWorker(void);
53
54 std::atomic_bool m_workerRunning;
55 std::atomic_bool m_stopWorker;
56
57 QVBoxLayout * m_centralLayout;
58 QGridLayout * m_inputLayout;
59 QHBoxLayout * m_buttonLayout;
60
61 QLabel * m_urlL;
62 QLineEdit * m_url;
63
64 QPushButton * m_btnCancel;
65 QPushButton * m_btnConnect;
66
67 std::list<ot::LogMessage> m_messageBuffer;
68};
OpenTwin Logging system.
Definition ConnectToLoggerDialog.h:25
virtual ~ConnectToLoggerDialog()
Definition ConnectToLoggerDialog.cpp:72
ConnectToLoggerDialog()
Definition ConnectToLoggerDialog.cpp:33
void queueConnectRequest(void)
Definition ConnectToLoggerDialog.cpp:80
void queueRecenterRequest(void)
Definition ConnectToLoggerDialog.cpp:84
virtual bool mayCloseDialogWindow(void) const override
Definition ConnectToLoggerDialog.cpp:88
const std::list< ot::LogMessage > & messageBuffer(void) const
Definition ConnectToLoggerDialog.h:31
QString loggerServiceUrl(void) const
Definition ConnectToLoggerDialog.cpp:76
Definition Dialog.h:19