-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmainwidget.h
85 lines (66 loc) · 1.72 KB
/
mainwidget.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
#ifndef MAINWIDGET_H
#define MAINWIDGET_H
#include <QWidget>
#include <QLabel>
#include <QButtonGroup>
#include <QPushButton>
#include <QToolButton>
#include <QStackedWidget>
#include "eb_options.h"
#include "sub_page/lcdpage.h"
#include "sub_page/touchpage.h"
#include "sub_page/camerapage.h"
#include "sub_page/datetimepage.h"
#include "sub_page/monitorpage.h"
#include "sub_page/versionpage.h"
#include "sub_page/realtimepage.h"
#include "sub_page/seatpage.h"
#include "sub_page/networkpage.h"
#include "sub_page/systempage.h"
class MainWidget : public QWidget
{
Q_OBJECT
public:
MainWidget(EbOptions *options, QWidget *parent = 0);
~MainWidget();
typedef enum {
PAGE_LCD = 0,
PAGE_TOUCH,
PAGE_CAMERA,
//PAGE_DATETIME,
PAGE_NETWORK,
PAGE_SERIALPORT,
PAGE_ABOUT, // Settings Page
PAGE_MONITOR,
PAGE_VERSION,
//PAGE_REALTIME,
}pageTypes;
private slots:
void menuBtnGroupToggled(int);
//void showHomePage(void);
//void sideBtnToggled(bool);
private:
void initMainUI();
EbOptions *g_opt;
//---------- 标题栏 -----------
//QWidget *titleWidget;
//QPushButton *closeBtn;
//---------- 菜单栏 -----------
QWidget *menuWidget;
QButtonGroup *menuBtnGroup;
//---------- 侧边栏 -----------
//QWidget *sideBar;
//---------- 子界面 -----------
QStackedWidget *centerPages;
LcdPage *lcdPage;
TouchPage *touchPage;
CameraPage *cameraPage;
NetworkPage *networkPage;
SystemPage *systemPage;
SeatPage *seatPage;
MonitorPage *monitorPage;
VersionPage *versionPage;
pageTypes prevPage;
pageTypes currPage;
};
#endif // MAINWIDGET_H