-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWidget.h
More file actions
60 lines (49 loc) · 1.33 KB
/
MainWidget.h
File metadata and controls
60 lines (49 loc) · 1.33 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#ifndef MAINWIDGET_H
#define MAINWIDGET_H
#include <QWidget>
#include <QWebEngineView>
#include "APIWebsockets.h"
class QPushButton;
class QPlainTextEdit;
class QWebEngineView;
class APIWebsockets;
/**
* @brief Implements the graphical interface of the demonstrator
*
* The main components of the graphical interface are described in this class.
* It inherits from QWidget and contains a button, a plain text field, and a web view.
*/
class MainWidget : public QWidget
{
Q_OBJECT
public:
/**
* @brief Construct a new Main Widget object
*
* Initiates all the GUI elements (button, web view and text field).
* Defines a layout to arrange these elements.
* Initiate the Websocket server to listen for Potree.
* Connects the proper signal and slots.
*
* @param parent parent Widget, optional
*/
explicit MainWidget(QWidget *parent = 0);
/**
* @brief Destroy the Main Widget object
*/
~MainWidget();
/**
* @brief Appends log to demonstrator text field
*
* Provided string is appended to demonstrator text field.
*
* @param text text data to log
*/
void log(QString text);
private:
QPushButton* button_;
QPlainTextEdit* logger_;
QWebEngineView* webEngineView_;
APIWebsockets* socketServer_;
};
#endif // MAINWIDGET_H