Commit e3205cf8390b19cf158f490ca125bd243fd1d0b7
1 parent
097e5e14a0
Exists in
master
and in
2 other branches
고객사 요구 사항 반영
- 데모모드 복구 - 데모모드 상황시 설정 진입시 비밀번호 요구
Showing
10 changed files
with
509 additions
and
8 deletions
Show diff stats
app/gui/oven_control/config.cpp
... | ... | @@ -23,6 +23,7 @@ |
23 | 23 | #include "udphandler.h" |
24 | 24 | #include "system.h" |
25 | 25 | #include "unistd.h" |
26 | +#include "configdemomodedlg.h" | |
26 | 27 | |
27 | 28 | using namespace Define; |
28 | 29 | using namespace System; |
... | ... | @@ -493,6 +494,9 @@ void Config::execConfigWindow(QWidget *parent, Define::ConfigType idx){ |
493 | 494 | case config_duty_wash: |
494 | 495 | dlg = new ConfigDutyWashDlg(parent); |
495 | 496 | break; |
497 | + case config_demo_mode: | |
498 | + dlg = new ConfigDemoModeDlg(parent); | |
499 | + break; | |
496 | 500 | default: |
497 | 501 | dlg=NULL; |
498 | 502 | } | ... | ... |
app/gui/oven_control/configdemomodedlg.cpp
... | ... | @@ -0,0 +1,178 @@ |
1 | +#include "configdemomodedlg.h" | |
2 | +#include "ui_configdemomodedlg.h" | |
3 | +#include "config.h" | |
4 | +#include "soundplayer.h" | |
5 | + | |
6 | +using namespace Define; | |
7 | + | |
8 | +ConfigDemoModeDlg::ConfigDemoModeDlg(QWidget *parent) : | |
9 | + QDialog(parent), | |
10 | + ui(new Ui::ConfigDemoModeDlg) | |
11 | +{ | |
12 | + Config* cfg = Config::getInstance(); | |
13 | + config_item item; | |
14 | + item = cfg->getConfigValue(config_demo_mode); | |
15 | + m_nCurSel = item.d32; | |
16 | + ui->setupUi(this); | |
17 | + this->setWindowFlags( Qt::FramelessWindowHint); | |
18 | + this->setAttribute( Qt::WA_DeleteOnClose); | |
19 | + qApp->setActiveWindow(this); | |
20 | + this->setFocus(); | |
21 | + | |
22 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
23 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
24 | + | |
25 | + ui->pushButton_1->setText(QCoreApplication::translate("Config",on_off_menu[0])); | |
26 | + ui->pushButton_2->setText(QCoreApplication::translate("Config", on_off_menu[1])); | |
27 | + | |
28 | + reloadUi(); | |
29 | + | |
30 | + m_pSignalMapper = new QSignalMapper(this); | |
31 | + m_pSignalMapper->setMapping(ui->pushButton_1,0); | |
32 | + m_pSignalMapper->setMapping(ui->pushButton_2,1); | |
33 | + | |
34 | + connect(ui->pushButton_1,SIGNAL(clicked(bool)),m_pSignalMapper,SLOT(map())); | |
35 | + connect(ui->pushButton_2,SIGNAL(clicked(bool)),m_pSignalMapper,SLOT(map())); | |
36 | + | |
37 | + connect(m_pSignalMapper,SIGNAL(mapped(int)),this,SLOT(onConfigBtnClicked(int))); | |
38 | + | |
39 | + m_vectorTabOrder.append(this); | |
40 | + m_vectorTabOrder.append(ui->pushButton_1); | |
41 | + m_vectorTabOrder.append(ui->pushButton_2); | |
42 | + m_vectorTabOrder.append(ui->ctrBtnOk); | |
43 | + m_vectorTabOrder.append(ui->ctrBtnCancel); | |
44 | +} | |
45 | + | |
46 | +ConfigDemoModeDlg::~ConfigDemoModeDlg() | |
47 | +{ | |
48 | + delete ui; | |
49 | +} | |
50 | + | |
51 | +void ConfigDemoModeDlg::on_ctrBtnOk_clicked() | |
52 | +{ | |
53 | + Config* cfg = Config::getInstance(); | |
54 | + config_item item; | |
55 | + item.d32 = m_nCurSel; | |
56 | + cfg->setConfigValue(config_demo_mode,item); | |
57 | + accept(); | |
58 | +} | |
59 | + | |
60 | +void ConfigDemoModeDlg::on_ctrBtnCancel_clicked() | |
61 | +{ | |
62 | + reject(); | |
63 | +} | |
64 | + | |
65 | +void ConfigDemoModeDlg::onConfigBtnClicked(const int sel){ | |
66 | + m_nCurSel = sel; | |
67 | +} | |
68 | + | |
69 | +void ConfigDemoModeDlg::reloadUi(){ | |
70 | + switch(m_nCurSel){ | |
71 | + case 0: | |
72 | + ui->pushButton_1->setChecked(true); | |
73 | + break; | |
74 | + case 1: | |
75 | + ui->pushButton_2->setChecked(true); | |
76 | + break; | |
77 | + default: | |
78 | + break; | |
79 | + } | |
80 | +} | |
81 | + | |
82 | +void ConfigDemoModeDlg::keyPressEvent(QKeyEvent *event){ | |
83 | + int i = 0; | |
84 | + switch (event->key()) | |
85 | + { | |
86 | + case 0x01000030: // Turn left | |
87 | + for(i = 0; i < m_vectorTabOrder.size();i++){ | |
88 | + if(focusWidget() == m_vectorTabOrder[i]) break; | |
89 | + } | |
90 | + | |
91 | + if(i==0){ | |
92 | + i = m_vectorTabOrder.size()-1; | |
93 | + m_vectorTabOrder[i]->setFocus(); | |
94 | + } | |
95 | + else if(i < m_vectorTabOrder.size()) { | |
96 | + i = i - 1; | |
97 | + m_vectorTabOrder[i]->setFocus(); | |
98 | + } | |
99 | + else{ | |
100 | + i=0; | |
101 | + m_vectorTabOrder[i]->setFocus(); | |
102 | + } | |
103 | + break; | |
104 | + case 0x01000031: // Push | |
105 | + | |
106 | + break; | |
107 | + case 0x01000032: // Turn right | |
108 | + for(i = 0; i < m_vectorTabOrder.size();i++){ | |
109 | + if(focusWidget() == m_vectorTabOrder[i]) break; | |
110 | + } | |
111 | + | |
112 | + if(i<m_vectorTabOrder.size()-1){ | |
113 | + i+=1; | |
114 | + m_vectorTabOrder[i]->setFocus(); | |
115 | + } | |
116 | + else if(i== (m_vectorTabOrder.size()-1)){ | |
117 | + i=0; | |
118 | + m_vectorTabOrder[i]->setFocus(); | |
119 | + } | |
120 | + else{ | |
121 | + i=0; | |
122 | + m_vectorTabOrder[i]->setFocus(); | |
123 | + } | |
124 | + break; | |
125 | + } | |
126 | +} | |
127 | + | |
128 | +void ConfigDemoModeDlg::keyReleaseEvent(QKeyEvent *event){ | |
129 | + int i = 0; | |
130 | + switch (event->key()) | |
131 | + { | |
132 | + case 0x01000030: // Turn left | |
133 | + for(i = 0; i < m_vectorTabOrder.size();i++){ | |
134 | + if(focusWidget() == m_vectorTabOrder[i]) break; | |
135 | + } | |
136 | + | |
137 | + if(i==0){ | |
138 | + i = m_vectorTabOrder.size()-1; | |
139 | + m_vectorTabOrder[i]->setFocus(); | |
140 | + } | |
141 | + else if(i < m_vectorTabOrder.size()) { | |
142 | + i = i - 1; | |
143 | + m_vectorTabOrder[i]->setFocus(); | |
144 | + } | |
145 | + else{ | |
146 | + i=0; | |
147 | + m_vectorTabOrder[i]->setFocus(); | |
148 | + } | |
149 | + break; | |
150 | + case 0x01000031: // Push | |
151 | + { | |
152 | + QPushButton *btn = qobject_cast<QPushButton*>(focusWidget()); | |
153 | + if(btn != NULL){ | |
154 | + btn->click(); | |
155 | + } | |
156 | + break; | |
157 | + } | |
158 | + case 0x01000032: // Turn right | |
159 | + for(i = 0; i < m_vectorTabOrder.size();i++){ | |
160 | + if(focusWidget() == m_vectorTabOrder[i]) break; | |
161 | + } | |
162 | + | |
163 | + if(i<m_vectorTabOrder.size()-1){ | |
164 | + i+=1; | |
165 | + m_vectorTabOrder[i]->setFocus(); | |
166 | + } | |
167 | + else if(i== (m_vectorTabOrder.size()-1)){ | |
168 | + i=0; | |
169 | + m_vectorTabOrder[i]->setFocus(); | |
170 | + } | |
171 | + else{ | |
172 | + i=0; | |
173 | + m_vectorTabOrder[i]->setFocus(); | |
174 | + } | |
175 | + break; | |
176 | + } | |
177 | +} | |
178 | + | ... | ... |
app/gui/oven_control/configdemomodedlg.h
... | ... | @@ -0,0 +1,41 @@ |
1 | +#ifndef CONFIGDEMOMODEDLG_H | |
2 | +#define CONFIGDEMOMODEDLG_H | |
3 | + | |
4 | +#include <QDialog> | |
5 | +#include <QSignalMapper> | |
6 | +#include <QKeyEvent> | |
7 | +#include <QVector> | |
8 | + | |
9 | +namespace Ui { | |
10 | +class ConfigDemoModeDlg; | |
11 | +} | |
12 | + | |
13 | +class ConfigDemoModeDlg : public QDialog | |
14 | +{ | |
15 | + Q_OBJECT | |
16 | + | |
17 | + void reloadUi(void); | |
18 | + | |
19 | +public: | |
20 | + explicit ConfigDemoModeDlg(QWidget *parent = 0); | |
21 | + ~ConfigDemoModeDlg(); | |
22 | + | |
23 | +private slots: | |
24 | + void on_ctrBtnOk_clicked(); | |
25 | + | |
26 | + void on_ctrBtnCancel_clicked(); | |
27 | + | |
28 | + void onConfigBtnClicked(const int sel); | |
29 | + | |
30 | +private: | |
31 | + Ui::ConfigDemoModeDlg *ui; | |
32 | + QSignalMapper *m_pSignalMapper; | |
33 | + int m_nCurSel; | |
34 | + QVector<QWidget*> m_vectorTabOrder; | |
35 | + | |
36 | +protected: | |
37 | + void keyReleaseEvent(QKeyEvent* event); | |
38 | + void keyPressEvent(QKeyEvent* event); | |
39 | +}; | |
40 | + | |
41 | +#endif // CONFIGDEMOMODEDLG_H | ... | ... |
app/gui/oven_control/configdemomodedlg.ui
... | ... | @@ -0,0 +1,222 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<ui version="4.0"> | |
3 | + <class>ConfigDemoModeDlg</class> | |
4 | + <widget class="QDialog" name="ConfigDemoModeDlg"> | |
5 | + <property name="geometry"> | |
6 | + <rect> | |
7 | + <x>0</x> | |
8 | + <y>0</y> | |
9 | + <width>900</width> | |
10 | + <height>1600</height> | |
11 | + </rect> | |
12 | + </property> | |
13 | + <property name="autoFillBackground"> | |
14 | + <bool>false</bool> | |
15 | + </property> | |
16 | + <property name="styleSheet"> | |
17 | + <string notr="true">#centralwidget{ | |
18 | + background-image : url(:/images/background/popup/503.png); | |
19 | +} | |
20 | + | |
21 | +QPushButton{ | |
22 | + border-color : transparent; | |
23 | + background-color : transparent; | |
24 | + color : white; | |
25 | +} | |
26 | + | |
27 | +QPushButton::focus{ | |
28 | + color : yellow; | |
29 | +} | |
30 | + | |
31 | +QPushButton::pressed{ | |
32 | + color : green; | |
33 | +} | |
34 | + | |
35 | +QPushButton::checked{ | |
36 | + color : red; | |
37 | +} | |
38 | + | |
39 | +QLabel{ | |
40 | + color : white; | |
41 | +}</string> | |
42 | + </property> | |
43 | + <widget class="QWidget" name="centralwidget" native="true"> | |
44 | + <property name="geometry"> | |
45 | + <rect> | |
46 | + <x>0</x> | |
47 | + <y>450</y> | |
48 | + <width>900</width> | |
49 | + <height>362</height> | |
50 | + </rect> | |
51 | + </property> | |
52 | + <property name="minimumSize"> | |
53 | + <size> | |
54 | + <width>900</width> | |
55 | + <height>0</height> | |
56 | + </size> | |
57 | + </property> | |
58 | + <layout class="QVBoxLayout" name="verticalLayout_3" stretch="92,0,176,88"> | |
59 | + <item> | |
60 | + <widget class="QLabel" name="label"> | |
61 | + <property name="font"> | |
62 | + <font> | |
63 | + <pointsize>18</pointsize> | |
64 | + <weight>75</weight> | |
65 | + <bold>true</bold> | |
66 | + </font> | |
67 | + </property> | |
68 | + <property name="styleSheet"> | |
69 | + <string notr="true"/> | |
70 | + </property> | |
71 | + <property name="text"> | |
72 | + <string>시연모드</string> | |
73 | + </property> | |
74 | + <property name="alignment"> | |
75 | + <set>Qt::AlignCenter</set> | |
76 | + </property> | |
77 | + </widget> | |
78 | + </item> | |
79 | + <item> | |
80 | + <widget class="Line" name="line"> | |
81 | + <property name="orientation"> | |
82 | + <enum>Qt::Horizontal</enum> | |
83 | + </property> | |
84 | + </widget> | |
85 | + </item> | |
86 | + <item> | |
87 | + <layout class="QVBoxLayout" name="verticalLayout"> | |
88 | + <item> | |
89 | + <widget class="QPushButton" name="pushButton_1"> | |
90 | + <property name="sizePolicy"> | |
91 | + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> | |
92 | + <horstretch>0</horstretch> | |
93 | + <verstretch>0</verstretch> | |
94 | + </sizepolicy> | |
95 | + </property> | |
96 | + <property name="font"> | |
97 | + <font> | |
98 | + <family>나눔고딕</family> | |
99 | + <pointsize>16</pointsize> | |
100 | + </font> | |
101 | + </property> | |
102 | + <property name="text"> | |
103 | + <string>PushButton</string> | |
104 | + </property> | |
105 | + <property name="checkable"> | |
106 | + <bool>true</bool> | |
107 | + </property> | |
108 | + <property name="checked"> | |
109 | + <bool>true</bool> | |
110 | + </property> | |
111 | + <property name="autoExclusive"> | |
112 | + <bool>true</bool> | |
113 | + </property> | |
114 | + <property name="flat"> | |
115 | + <bool>true</bool> | |
116 | + </property> | |
117 | + </widget> | |
118 | + </item> | |
119 | + <item> | |
120 | + <widget class="Line" name="line_2"> | |
121 | + <property name="orientation"> | |
122 | + <enum>Qt::Horizontal</enum> | |
123 | + </property> | |
124 | + </widget> | |
125 | + </item> | |
126 | + <item> | |
127 | + <widget class="QPushButton" name="pushButton_2"> | |
128 | + <property name="sizePolicy"> | |
129 | + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> | |
130 | + <horstretch>0</horstretch> | |
131 | + <verstretch>0</verstretch> | |
132 | + </sizepolicy> | |
133 | + </property> | |
134 | + <property name="font"> | |
135 | + <font> | |
136 | + <family>나눔고딕</family> | |
137 | + <pointsize>16</pointsize> | |
138 | + </font> | |
139 | + </property> | |
140 | + <property name="text"> | |
141 | + <string>PushButton</string> | |
142 | + </property> | |
143 | + <property name="checkable"> | |
144 | + <bool>true</bool> | |
145 | + </property> | |
146 | + <property name="autoExclusive"> | |
147 | + <bool>true</bool> | |
148 | + </property> | |
149 | + <property name="flat"> | |
150 | + <bool>true</bool> | |
151 | + </property> | |
152 | + </widget> | |
153 | + </item> | |
154 | + <item> | |
155 | + <widget class="Line" name="line_3"> | |
156 | + <property name="orientation"> | |
157 | + <enum>Qt::Horizontal</enum> | |
158 | + </property> | |
159 | + </widget> | |
160 | + </item> | |
161 | + </layout> | |
162 | + </item> | |
163 | + <item> | |
164 | + <layout class="QGridLayout" name="gridLayout" columnstretch="1,1,1,1,1,1"> | |
165 | + <item row="0" column="5"> | |
166 | + <widget class="QPushButton" name="ctrBtnCancel"> | |
167 | + <property name="sizePolicy"> | |
168 | + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> | |
169 | + <horstretch>0</horstretch> | |
170 | + <verstretch>0</verstretch> | |
171 | + </sizepolicy> | |
172 | + </property> | |
173 | + <property name="font"> | |
174 | + <font> | |
175 | + <family>나눔고딕</family> | |
176 | + <pointsize>10</pointsize> | |
177 | + <weight>75</weight> | |
178 | + <bold>true</bold> | |
179 | + <underline>true</underline> | |
180 | + </font> | |
181 | + </property> | |
182 | + <property name="text"> | |
183 | + <string>취소</string> | |
184 | + </property> | |
185 | + <property name="flat"> | |
186 | + <bool>true</bool> | |
187 | + </property> | |
188 | + </widget> | |
189 | + </item> | |
190 | + <item row="0" column="4"> | |
191 | + <widget class="QPushButton" name="ctrBtnOk"> | |
192 | + <property name="sizePolicy"> | |
193 | + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> | |
194 | + <horstretch>0</horstretch> | |
195 | + <verstretch>0</verstretch> | |
196 | + </sizepolicy> | |
197 | + </property> | |
198 | + <property name="font"> | |
199 | + <font> | |
200 | + <family>나눔고딕</family> | |
201 | + <pointsize>10</pointsize> | |
202 | + <weight>75</weight> | |
203 | + <bold>true</bold> | |
204 | + <underline>true</underline> | |
205 | + </font> | |
206 | + </property> | |
207 | + <property name="text"> | |
208 | + <string>확인</string> | |
209 | + </property> | |
210 | + <property name="flat"> | |
211 | + <bool>true</bool> | |
212 | + </property> | |
213 | + </widget> | |
214 | + </item> | |
215 | + </layout> | |
216 | + </item> | |
217 | + </layout> | |
218 | + </widget> | |
219 | + </widget> | |
220 | + <resources/> | |
221 | + <connections/> | |
222 | +</ui> | ... | ... |
app/gui/oven_control/configwindow.cpp
... | ... | @@ -14,6 +14,7 @@ |
14 | 14 | #include "washwindow.h" |
15 | 15 | #include "mainwindow.h" |
16 | 16 | #include "configdoormonitoring.h" |
17 | +#include "servicepassinputdlg.h" | |
17 | 18 | |
18 | 19 | ConfigWindow::ConfigWindow(QWidget *parent) : |
19 | 20 | QMainWindow(parent), |
... | ... | @@ -25,12 +26,16 @@ ConfigWindow::ConfigWindow(QWidget *parent) : |
25 | 26 | ui->clockContainer->setParent(ui->upperStack); |
26 | 27 | setAttribute(Qt::WA_DeleteOnClose); |
27 | 28 | |
29 | + Config* cfg = Config::getInstance(); | |
30 | + | |
31 | + | |
28 | 32 | ui->scrollAreaMenuLayout->setAlignment(Qt::AlignTop); |
29 | 33 | |
30 | 34 | foreach (QPushButton *button, findChildren<QPushButton *>()) |
31 | 35 | connect(button, &QPushButton::pressed, SoundPlayer::playClick); |
32 | 36 | |
33 | - Config* cfg = Config::getInstance(); | |
37 | + config_item item; | |
38 | + | |
34 | 39 | |
35 | 40 | QSetIterator<uint32_t> itr = cfg->getConstBeginFavorite(); |
36 | 41 | while(itr.hasNext()) itr.next(); |
... | ... | @@ -44,8 +49,38 @@ ConfigWindow::ConfigWindow(QWidget *parent) : |
44 | 49 | |
45 | 50 | reloadUi(); |
46 | 51 | |
52 | + | |
53 | + item = cfg->getConfigValue(config_demo_mode); | |
54 | + if(item.d32!=0){ | |
55 | + QDialog* dlg = new ServicePassInputDlg(this, DEMO_SERVICE_PASS_MODE); | |
56 | + dlg->setModal(true); | |
57 | + dlg->showFullScreen(); | |
58 | + dlg->raise(); | |
59 | + connect(dlg, SIGNAL(rejected()), SLOT(close())); | |
60 | + } | |
47 | 61 | } |
48 | 62 | |
63 | +void ConfigWindow::onLoadedWindow(){ | |
64 | + QDialog* dlg = new ServicePassInputDlg(this); | |
65 | + dlg->exec(); | |
66 | + this->show(); | |
67 | +} | |
68 | + | |
69 | +void ConfigWindow::showFullScreen(){ | |
70 | + Config* cfg = Config::getInstance(); | |
71 | + config_item item = cfg->getConfigValue(config_demo_mode); | |
72 | + if(item.d32){ | |
73 | + //QMainWindow::showFullScreen(); | |
74 | +// QDialog* dlg = new ServicePassInputDlg(this->parentWidget()); | |
75 | +// dlg->exec(); | |
76 | + QMainWindow::showFullScreen(); | |
77 | + } | |
78 | + else{ | |
79 | + QMainWindow::showFullScreen(); | |
80 | + } | |
81 | +} | |
82 | + | |
83 | + | |
49 | 84 | ConfigWindow::~ConfigWindow() |
50 | 85 | { |
51 | 86 | delete ui; |
... | ... | @@ -419,3 +454,4 @@ void ConfigWindow::on_helpButton_clicked() |
419 | 454 | { |
420 | 455 | |
421 | 456 | } |
457 | + | ... | ... |
app/gui/oven_control/configwindow.h
... | ... | @@ -32,7 +32,7 @@ class ConfigWindow : public QMainWindow |
32 | 32 | |
33 | 33 | private: |
34 | 34 | const uint16_t m_arrMaxMenuCount[7] ={ |
35 | - 6,8,8,2,3,0,5 | |
35 | + 6,8,8,2,3,0,6 | |
36 | 36 | }; |
37 | 37 | const Define::ConfigType m_arrConfigListInfos[7][20] = { |
38 | 38 | {config_language,config_datetime, config_temptype,config_backlight, config_time_type,config_resttime_format,}, |
... | ... | @@ -41,7 +41,7 @@ private: |
41 | 41 | {config_set_half_energy,config_set_auto_darkness,}, |
42 | 42 | {config_duty_wash,config_loading_door_monitoring,config_cooking_door_monitoring}, |
43 | 43 | {config_invalid,}, |
44 | - {config_software_info,config_hotline_chef,config_hotline_service,config_steam_wash,config_enter_engineer_mode} | |
44 | + {config_software_info,config_hotline_chef,config_hotline_service,config_steam_wash,config_demo_mode,config_enter_engineer_mode} | |
45 | 45 | }; |
46 | 46 | |
47 | 47 | void nextFocus(); |
... | ... | @@ -79,6 +79,8 @@ public slots: |
79 | 79 | void onConfigBtnClicked(uint16_t id); |
80 | 80 | void onConfigCheckBtnClicked(uint16_t id, bool checked); |
81 | 81 | void onDeleteFavoriteBtnClicked(uint16_t id); |
82 | + void onLoadedWindow(void); | |
83 | + void showFullScreen(); | |
82 | 84 | |
83 | 85 | protected: |
84 | 86 | void keyReleaseEvent(QKeyEvent* event); | ... | ... |
app/gui/oven_control/errorpopupdlg.cpp
app/gui/oven_control/oven_control.pro
... | ... | @@ -123,6 +123,8 @@ SOURCES += main.cpp\ |
123 | 123 | autocookcheckwindow.cpp \ |
124 | 124 | autocookcheckconfigwindow.cpp \ |
125 | 125 | programmedcookpanelbutton.cpp |
126 | + configdemomodedlg.cpp | |
127 | + | |
126 | 128 | |
127 | 129 | HEADERS += mainwindow.h \ |
128 | 130 | cook.h \ |
... | ... | @@ -235,6 +237,7 @@ HEADERS += mainwindow.h \ |
235 | 237 | autocookcheckwindow.h \ |
236 | 238 | autocookcheckconfigwindow.h \ |
237 | 239 | programmedcookpanelbutton.h |
240 | + configdemomodedlg.h | |
238 | 241 | |
239 | 242 | FORMS += mainwindow.ui \ |
240 | 243 | manualcookwindow.ui \ |
... | ... | @@ -313,6 +316,7 @@ FORMS += mainwindow.ui \ |
313 | 316 | autocookcheckwindow.ui \ |
314 | 317 | autocookcheckconfigwindow.ui \ |
315 | 318 | programmedcookpanelbutton.ui |
319 | + configdemomodedlg.ui | |
316 | 320 | |
317 | 321 | RESOURCES += \ |
318 | 322 | resources.qrc | ... | ... |
app/gui/oven_control/servicepassinputdlg.cpp
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 | #include "soundplayer.h" |
6 | 6 | |
7 | 7 | |
8 | -ServicePassInputDlg::ServicePassInputDlg(QWidget *parent) : | |
8 | +ServicePassInputDlg::ServicePassInputDlg(QWidget *parent, service_pass_type mode) : | |
9 | 9 | QDialog(parent), |
10 | 10 | ui(new Ui::ServicePassInputDlg) |
11 | 11 | { |
... | ... | @@ -28,6 +28,7 @@ ServicePassInputDlg::ServicePassInputDlg(QWidget *parent) : |
28 | 28 | connect(ui->keyboardwidget, SIGNAL(onCancelKeyClicked()),SLOT(keyCancel_clicked())); |
29 | 29 | connect(ui->keyboardwidget,SIGNAL(onKeyboardClickSignal(QString)),SLOT(keyboardInputEvent(QString))); |
30 | 30 | ui->keyboardwidget->focusInKeyboard(); |
31 | + m_nMode = mode; | |
31 | 32 | } |
32 | 33 | |
33 | 34 | ServicePassInputDlg::~ServicePassInputDlg() |
... | ... | @@ -37,14 +38,19 @@ ServicePassInputDlg::~ServicePassInputDlg() |
37 | 38 | |
38 | 39 | void ServicePassInputDlg::on_ctrBtnOk_clicked() |
39 | 40 | { |
40 | - if( QString(m_strInputPass) == QString(PASS_WORD)){ | |
41 | + | |
42 | + if( QString(m_strInputPass) == QString(NORMAL_PASS_WORD) && m_nMode == NORMAL_SERVICE_PASS_MODE){ | |
41 | 43 | qDebug() << this->parentWidget() <<this->parent(); |
42 | 44 | EngineerMenuWindow *w = new EngineerMenuWindow(this->parentWidget()); |
43 | 45 | connect(w,SIGNAL(destroyed(QObject*)),this,SLOT(close())); |
44 | 46 | w->setWindowModality(Qt::WindowModal); |
45 | - w->show(); | |
47 | + w->showFullScreen(); | |
48 | + w->raise(); | |
46 | 49 | this->hide(); |
47 | 50 | } |
51 | + else if(QString(m_strInputPass) == QString(DEMO_PASS_WORD) && m_nMode == DEMO_SERVICE_PASS_MODE){ | |
52 | + accept(); | |
53 | + } | |
48 | 54 | else { |
49 | 55 | reject(); |
50 | 56 | } | ... | ... |
app/gui/oven_control/servicepassinputdlg.h
... | ... | @@ -5,13 +5,19 @@ |
5 | 5 | #include <QKeyEvent> |
6 | 6 | |
7 | 7 | |
8 | -#define PASS_WORD "00000000" | |
8 | +#define NORMAL_PASS_WORD "00000000" | |
9 | +#define DEMO_PASS_WORD "11111111" | |
9 | 10 | #define MAX_PASSWORD 8 |
10 | 11 | |
11 | 12 | namespace Ui { |
12 | 13 | class ServicePassInputDlg; |
13 | 14 | } |
14 | 15 | |
16 | +enum service_pass_type{ | |
17 | + NORMAL_SERVICE_PASS_MODE = 0, | |
18 | + DEMO_SERVICE_PASS_MODE=1 | |
19 | +}; | |
20 | + | |
15 | 21 | class ServicePassInputDlg : public QDialog |
16 | 22 | { |
17 | 23 | Q_OBJECT |
... | ... | @@ -21,7 +27,7 @@ class ServicePassInputDlg : public QDialog |
21 | 27 | QChar m_strInputPass[MAX_PASSWORD+1]; |
22 | 28 | |
23 | 29 | public: |
24 | - explicit ServicePassInputDlg(QWidget *parent = 0); | |
30 | + explicit ServicePassInputDlg(QWidget *parent = 0, service_pass_type mode = NORMAL_SERVICE_PASS_MODE ); | |
25 | 31 | ~ServicePassInputDlg(); |
26 | 32 | |
27 | 33 | private slots: |
... | ... | @@ -42,6 +48,7 @@ protected: |
42 | 48 | private: |
43 | 49 | Ui::ServicePassInputDlg *ui; |
44 | 50 | int m_nCurInputCount; |
51 | + service_pass_type m_nMode; | |
45 | 52 | }; |
46 | 53 | |
47 | 54 | #endif // SERVICEPASSINPUTDLG_H | ... | ... |