-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainwindow.hpp
102 lines (83 loc) · 3 KB
/
mainwindow.hpp
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#ifndef MAINWINDOW_HPP
#define MAINWINDOW_HPP
#include <QMainWindow>
#include <QWebEngineView>
#include <QStatusBar>
#include <QTableWidget>
#include <QProgressBar>
#include "data/datahandler.hpp"
#include "config/configuration.hpp"
#include "configwindow.hpp"
#include "statusbarwidgets.hpp"
#include "datalogger.hpp"
#include "aboutdialog.hpp"
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private:
Ui::MainWindow* ui;
Configuration* config;
DataHandler* dataHandler;
ConfigWindow* configWindow;
StatusBarWidgets* statusBarWidgets;
DataLogger* dataLogger;
QTableWidget* clientsTable;
AboutDialog* aboutDialog;
QStatusBar* statusBar;
QWebEngineView* webView;
QLabel* positionInfoHabLatitudeValue;
QLabel* positionInfoHabLongitudeValue;
QLabel* positionInfoHabAltitudeValue;
QLabel* positionInfoLocalGpsLatitudeValue;
QLabel* positionInfoLocalGpsLongitudeValue;
QLabel* positionInfoLocalGpsAltitudeValue;
QProgressBar* ratioSocketProgressBar;
QProgressBar* ratioRadioProgressBar;
void initWebView();
void initStatusBar();
void initClientsTable();
void showStatusBarMessage(QString message, int timeout = 3000);
void mapExecJS(QString jsCode);
void clearHabPosition();
void clearLocalGpsPosition();
void mapRemoteClientClear();
void clearHabFixStatus();
void clearHabTelemetry();
private slots:
void applicationExit();
void showConfigWindow();
void updateActionEnableStatus();
void configurationChanged();
void toogleHab();
void toogleLocalGps();
void toogleServerSync();
void toogleMapAutoBoundsAndZoom();
void handleServerSyncSocketEvent(QAbstractSocket::SocketState socketState);
void appendLogLine(QString line);
void imageSaved(QString imageName);
void updateClientsTable();
void removeAllRemoteClients();
void updateHabPosition(Hab* hab);
void updateLocalGpsPosition(Client* client);
void mapHabUpdate(Hab* hab);
void mapHabRemove();
void mapLocalClientUpdate(Client* client);
void mapLocalClientRemove();
void mapRemoteClientAdd(Client* client);
void mapRemoteClientUpdate(Client* client);
void mapRemoteClientRemove(Client* client);
void handleImageSlice(Hab* hab);
void handleNewImage(QByteArray imageData);
void updateHabFixStatus(Hab* hab);
void updateHabTelemetry(Hab* hab);
void showAboutDialog();
void updateRatioProgressBars(int radioLines, int socketLines);
void updateErrorsProgressBar(int errors, int lines);
};
#endif // MAINWINDOW_HPP