-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.h
140 lines (117 loc) · 3.63 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include "SchemeSensors.h"
#include "DataBaseEngine.h"
#include "LineChartWidget.h"
#include "OGLContextWidget.h"
#include "LevelsWidget.h"
#include "NumSensorsDialog.h"
#include <QTranslator>
#include <QMainWindow>
#include <QGroupBox>
#include <QHBoxLayout>
#include <QActionGroup>
#include <QSettings>
#include <QTableView>
#include <QSplitter>
class MainWindow : public QMainWindow
{
/* Macros for signal, slots, tr(), etc. */
Q_OBJECT
/********** Start Translators **********/
QTranslator appTranslator;
QTranslator qtTranslator;
/********** End Translators **********/
/********** Start Actions **********/
/* Toolbar #1 */
QAction *addRandomRowInTheDataBaseAction;
QAction *loadTableFromHeaderAction;
QAction *clearDataBaseAction;
// Separator
QAction *loadTableFromTextFileAction;
QAction *loadTableFromDataFileAction;
QAction *saveTableToTextFileAction;
QAction *saveTableToDataFileAction;
QAction *saveTableToHtmlFileAction;
// Separator
QAction *changeTableModelAction;
QAction *changeNumSensorsAction;
/* Toolbar #2 */
QAction *showChartWindowAction;
QAction *showLevelsWindowAction;
QAction *showOpenGLContextWindowAction;
// Separator
QAction *showHelpInBrowserAction;
QAction *showAboutDialogWindowAction;
QAction *showAboutQtDialogWindowAction;
/* Other Actions */
QActionGroup *languageActionGroup;
QAction *setEditTablePolicy;
QAction *setNoEditTablePolicy;
QAction *languageAction;
QAction *quitAppAction;
/********** End Actions **********/
/********** Start Menus *********/
QMenu *fileMenu;
QMenu *viewMenu;
QMenu *tableMenu;
QMenu *languageMenu;
QMenu *helpMenu;
/********** End Menus *********/
/********** Start ToolBars **********/
QToolBar *fileToolBar;
QToolBar *viewToolBar;
/********** End ToolBars **********/
/********** Start Widgets **********/
QWidget *mainWidget;
QHBoxLayout *mainLayout;
QGroupBox *tableGroupBox;
QHBoxLayout *tableWidgetLayout;
QTableView *tableWidget;
QGroupBox *schemeGroupBox;
QHBoxLayout *schemeWidgetLayout;
SchemeSensors *schemeWidget;
/********** End Widgets **********/
/********** Start Others **********/
QSplitter *splitter;
QSettings *appSettings;
QString aboutTitle;
QString aboutBody;
QString globalLocale;
DataBaseEngine *dataBaseEngine;
LineChartWidget *lineChartWidget;
OGLContextWidget *oglContextWidget;
LevelsWidget *levelsWidget;
/********** End Others **********/
void readGlobalSettings();
void writeGlobalSettings();
void createActions();
void createAndReadDataBase();
void createMenus();
void createLanguageMenu();
void createToolBars();
void createStatusBar();
void readSettingsFromIniFile();
void createCentralWidget();
void createTableGroupBox();
void createSchemeGroupBox();
void settingsWindow();
void retranslateUi();
private slots:
void switchLanguage(QAction *action);
void setEditTablePolicySlot();
void setNoEditTablePolicySlot();
void switchTable();
void showChartWindowSlot();
void showOpenGLContextWindowSlot();
void showLevelsWindowSlot();
void showHelp();
void showAboutDialog();
void showChangeNumSensorsDialog();
protected:
void closeEvent(QCloseEvent *event);
public:
MainWindow(QWidget *parent = 0);
~MainWindow();
};
#endif // MAINWINDOW_H