configwindow.h
2.64 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
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
#ifndef CONFIGWINDOW_H
#define CONFIGWINDOW_H
#include <QMainWindow>
#include <QVector>
#include "udphandler.h"
#include "configpanelbutton.h"
#include "configfavoritebutton.h"
#include "config.h"
using namespace Define;
enum CONFIG_MENU_POS{
config_menu_favorite = -1,
config_menu_setting =0,
config_menu_sound,
config_menu_system,
config_menu_energy,
config_menu_expert,
config_menu_display,
config_menu_service
};
namespace Ui {
class ConfigWindow;
}
class ConfigWindow : public QMainWindow
{
Q_OBJECT
private:
const uint16_t m_arrMaxMenuCount[7] ={
6,8,9,2,4,0,6
};
const Define::ConfigType m_arrConfigListInfos[7][20] = {
{config_language,config_datetime, config_temptype,config_backlight, config_time_type,config_resttime_format,},
{config_marster_vol,config_keypad_sound1,config_keypad_sound2,config_request_loadexec,config_programstep_finish,config_cooktime_finish,config_stoperror_distinguish,config_sound_factory_reset},
{config_haccp_data_download, config_info_data_download,config_service_data_download,config_program_download,config_program_upload ,config_program_initialize,config_ip,config_set_download,config_set_upload},
{config_set_half_energy,config_set_auto_darkness,},
{config_duty_wash,config_loading_door_monitoring,config_cooking_door_monitoring,config_anti_freeze},
{config_invalid,},
{config_software_info,config_hotline_chef,config_hotline_service,config_steam_wash,config_demo_mode,config_enter_engineer_mode}
};
void nextFocus();
void prevFocus();
public:
explicit ConfigWindow(QWidget *parent = 0);
~ConfigWindow();
private slots:
void on_pushButton_clicked();
void on_backButton_clicked();
void on_pushButton_3_clicked();
void on_pushButton_8_clicked();
void on_pushButton_7_clicked();
void on_pushButton_2_clicked();
void on_pushButton_4_clicked();
void on_pushButton_5_clicked();
void on_washButton_clicked();
void on_helpButton_clicked();
void reloadValue(void);
void reloadUi(void);
public slots:
void onConfigBtnClicked(uint16_t id);
void onConfigCheckBtnClicked(uint16_t id, bool checked);
void onDeleteFavoriteBtnClicked(uint16_t id);
void onLoadedWindow(void);
void showFullScreen();
protected:
void keyReleaseEvent(QKeyEvent* event);
void keyPressEvent(QKeyEvent* event);
private:
Ui::ConfigWindow *ui;
QVector<ConfigPanelButton *> m_vectorMenuList;
QVector<ConfigFavoriteButton*> m_vectorFavorMenuList;
QVector<QWidget*> m_vectorTabOrder;
CONFIG_MENU_POS m_nCurConfigPos;
int m_nTabIndex = 0;
};
#endif // CONFIGWINDOW_H