-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathmainwindow.h
92 lines (74 loc) · 2.38 KB
/
mainwindow.h
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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
/* Qt GUI incude */
#include <QMainWindow>
#include <QDateTime>
/* Live View includes */
#include "controlsbox.h"
#include "fft_widget.h"
#include "frame_c_meta.h"
#include "frameview_widget.h"
#include "flight_widget.h"
#include "histogram_widget.h"
#include "profile_widget.h"
#include "playback_widget.h"
#include "saveserver.h"
#include "startupOptions.h"
#include "preferences.h"
#include "consolelog.h"
// GPS includes:
#include "gpsGUI/gpsbinaryreader.h"
/*! \file
* \brief The main viewing window for Live View.
*/
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
/*! The main window must be passed a QThread to ensure that GUI commands are handled
* separately from backend commands. This improves the overall responsiveness of the software. */
MainWindow(startupOptionsType *options, QThread *qth, frameWorker *fw, QWidget *parent = 0);
private:
frameWorker *fw;
QTabWidget *tabWidget;
QWidget *mainwidget;
ControlsBox *controlbox;
saveServer *save_server; // Save Server is a non-GUI component that should be open regardless of the current view widget
startupOptionsType *options;
QString settingsFilename;
QDateTime startDateTime;
void prepareGPS();
void processGPSMessage();
/*! All widgets currently used in Live View
* @{ */
frameview_widget *unfiltered_widget;
frameview_widget *dsf_widget;
frameview_widget *waterfall_widget;
flight_widget *flight_screen;
frameview_widget *std_dev_widget;
histogram_widget *hist_widget;
profile_widget *vert_mean_widget;
profile_widget *horiz_mean_widget;
profile_widget *vert_cross_widget;
profile_widget *horiz_cross_widget;
profile_widget *vert_overlay_widget;
fft_widget *fft_mean_widget;
playback_widget *raw_play_widget;
consoleLog *cLog;
/*! @} */
void removeTab(QString tabTitle);
void closeEvent(QCloseEvent *e);
public slots:
void handleMainWindowStatusMessage(QString message);
void handleGeneralStatusMessage(QString message);
void handlePreferenceRead(settingsT prefs);
void enableStdDevTabs();
void debugThis();
signals:
void toggleStdDevCalc(bool enabled);
protected:
/*! \brief Defines keyboard controls for all components of Live View */
void keyPressEvent(QKeyEvent *c);
//void closeEvent(QCloseEvent *e);
};
#endif // MAINWINDOW_H