Commit aa40dc8071e269065ae2851ba7ded460f8ff1863
1 parent
bb225930e7
Exists in
master
and in
2 other branches
세척 모드 중 뒤로 가기 버튼을 누르면 세척 종료 화면 표시 후 세척이 종료된 뒤 뒤로가도록 변경
Showing
3 changed files
with
167 additions
and
19 deletions
Show diff stats
app/gui/oven_control/washwindow.cpp
... | ... | @@ -11,6 +11,7 @@ WashWindow::WashWindow(QWidget *parent, UdpHandler *udp) : |
11 | 11 | opened(false), |
12 | 12 | started(false), |
13 | 13 | run(false), |
14 | + canceled(false), | |
14 | 15 | type(0) |
15 | 16 | { |
16 | 17 | ui->setupUi(this); |
... | ... | @@ -78,6 +79,13 @@ void WashWindow::start(int type) |
78 | 79 | |
79 | 80 | void WashWindow::stop() |
80 | 81 | { |
82 | + if (!started) | |
83 | + return; | |
84 | + | |
85 | + if (canceled) | |
86 | + return; | |
87 | + | |
88 | + canceled = true; | |
81 | 89 | udp->turnOff(TG_CLEANING); |
82 | 90 | } |
83 | 91 | |
... | ... | @@ -128,6 +136,8 @@ void WashWindow::onChanged() |
128 | 136 | ui->animation->load(":/images/animation/wash_03.png"); |
129 | 137 | ui->animation->load(":/images/animation/wash_04.png"); |
130 | 138 | ui->washStepGauge->setValue(0); |
139 | + ui->titleLabel->setText("기기의 내부를 세척 중입니다"); | |
140 | + ui->descLabel->setText("완료될 때까지 문을 열지 마세요.\n기기의 내부의 자동 세척 기능을 실행 중입니다."); | |
131 | 141 | ui->washStepTypeLabel->setText(""); |
132 | 142 | ui->washStepCountLabel->setText(""); |
133 | 143 | |
... | ... | @@ -154,44 +164,50 @@ void WashWindow::onChanged() |
154 | 164 | switch (control.clean_step_type) |
155 | 165 | { |
156 | 166 | case 1: |
157 | - ui->washStepTypeLabel->setText("내부 헹굼"); | |
167 | + ui->washStepTypeLabel->setText("내부 헹굼 진행 중입니다."); | |
158 | 168 | break; |
159 | 169 | case 2: |
160 | - ui->washStepTypeLabel->setText("Steam Generator Tank 급수"); | |
170 | + ui->washStepTypeLabel->setText("스팀 급수 진행 중입니다."); | |
161 | 171 | break; |
162 | 172 | case 3: |
163 | - ui->washStepTypeLabel->setText("Inner Tank 팬 사이드 세척"); | |
173 | + ui->washStepTypeLabel->setText("내부 팬 세척 진행 중입니다."); | |
164 | 174 | break; |
165 | 175 | case 4: |
166 | - ui->washStepTypeLabel->setText("Inner Tank 불림"); | |
176 | + ui->washStepTypeLabel->setText("내부 스팀 불림 진행 중입니다."); | |
167 | 177 | break; |
168 | 178 | case 5: |
169 | - ui->washStepTypeLabel->setText("Inner Tank 강 세척"); | |
179 | + ui->washStepTypeLabel->setText("내부 강 세척 진행 중입니다."); | |
170 | 180 | break; |
171 | 181 | case 6: |
172 | - ui->washStepTypeLabel->setText("Inner Tank 상부 세척"); | |
182 | + ui->washStepTypeLabel->setText("내부 상부 세척 진행 중입니다."); | |
173 | 183 | break; |
174 | 184 | case 7: |
175 | - ui->washStepTypeLabel->setText("Inner Tank 스팀 세척"); | |
185 | + ui->washStepTypeLabel->setText("내부 스팀 세척 진행 중입니다."); | |
176 | 186 | break; |
177 | 187 | case 8: |
178 | - ui->washStepTypeLabel->setText("드레인 탱크 헹굼"); | |
188 | + ui->washStepTypeLabel->setText("세척 종료 진행 중입니다."); | |
179 | 189 | break; |
180 | 190 | case 9: |
181 | - ui->washStepTypeLabel->setText("세제 세척수 만들기"); | |
191 | + ui->washStepTypeLabel->setText("세제 세척수 만들기 진행 중입니다."); | |
182 | 192 | break; |
183 | 193 | case 10: |
184 | - ui->washStepTypeLabel->setText("세제 세척수 헹굼"); | |
194 | + ui->washStepTypeLabel->setText("세제 세척수 헹굼 진행 중입니다."); | |
185 | 195 | break; |
186 | 196 | case 11: |
187 | - ui->washStepTypeLabel->setText("드레인 탱크 헹굼수 채움"); | |
197 | + ui->washStepTypeLabel->setText("하부 탱크 세척수 만들기 진행 중입니다."); | |
188 | 198 | break; |
189 | 199 | } |
190 | 200 | } |
191 | 201 | } |
202 | + else if (canceled) | |
203 | + { | |
204 | + close(); | |
205 | + } | |
192 | 206 | else if (run) |
193 | 207 | { |
194 | - ui->washStepTypeLabel->setText("세척이 종료되었습니다"); | |
208 | + ui->titleLabel->setText("세척이 종료되었습니다"); | |
209 | + ui->descLabel->setText(""); | |
210 | + ui->washStepTypeLabel->setText(""); | |
195 | 211 | ui->washStepCountLabel->setText(""); |
196 | 212 | |
197 | 213 | ui->animation->stop(); |
... | ... | @@ -209,6 +225,8 @@ void WashWindow::onChanged() |
209 | 225 | |
210 | 226 | void WashWindow::on_backButton_clicked() |
211 | 227 | { |
212 | - stop(); | |
213 | - close(); | |
228 | + if (started) | |
229 | + stop(); | |
230 | + else | |
231 | + close(); | |
214 | 232 | } | ... | ... |
app/gui/oven_control/washwindow.h
app/gui/oven_control/washwindow.ui
... | ... | @@ -99,7 +99,7 @@ border: none; |
99 | 99 | </rect> |
100 | 100 | </property> |
101 | 101 | </widget> |
102 | - <widget class="QLabel" name="washStepTypeLabel"> | |
102 | + <widget class="QLabel" name="titleLabel"> | |
103 | 103 | <property name="enabled"> |
104 | 104 | <bool>true</bool> |
105 | 105 | </property> |
... | ... | @@ -157,13 +157,13 @@ border: none; |
157 | 157 | </font> |
158 | 158 | </property> |
159 | 159 | <property name="text"> |
160 | - <string/> | |
160 | + <string>기기의 내부를 세척 중입니다</string> | |
161 | 161 | </property> |
162 | 162 | <property name="alignment"> |
163 | 163 | <set>Qt::AlignCenter</set> |
164 | 164 | </property> |
165 | 165 | </widget> |
166 | - <widget class="QLabel" name="washStepCountLabel"> | |
166 | + <widget class="QLabel" name="descLabel"> | |
167 | 167 | <property name="enabled"> |
168 | 168 | <bool>true</bool> |
169 | 169 | </property> |
... | ... | @@ -172,7 +172,7 @@ border: none; |
172 | 172 | <x>0</x> |
173 | 173 | <y>88</y> |
174 | 174 | <width>900</width> |
175 | - <height>176</height> | |
175 | + <height>88</height> | |
176 | 176 | </rect> |
177 | 177 | </property> |
178 | 178 | <property name="palette"> |
... | ... | @@ -219,7 +219,8 @@ border: none; |
219 | 219 | </font> |
220 | 220 | </property> |
221 | 221 | <property name="text"> |
222 | - <string/> | |
222 | + <string>완료될 때까지 문을 열지 마세요. | |
223 | +기기의 내부의 자동 세척 기능을 실행 중입니다.</string> | |
223 | 224 | </property> |
224 | 225 | <property name="alignment"> |
225 | 226 | <set>Qt::AlignCenter</set> |
... | ... | @@ -302,6 +303,134 @@ border: none; |
302 | 303 | <set>Qt::AlignCenter</set> |
303 | 304 | </property> |
304 | 305 | </widget> |
306 | + <widget class="QLabel" name="washStepTypeLabel"> | |
307 | + <property name="enabled"> | |
308 | + <bool>true</bool> | |
309 | + </property> | |
310 | + <property name="geometry"> | |
311 | + <rect> | |
312 | + <x>249</x> | |
313 | + <y>242</y> | |
314 | + <width>532</width> | |
315 | + <height>58</height> | |
316 | + </rect> | |
317 | + </property> | |
318 | + <property name="palette"> | |
319 | + <palette> | |
320 | + <active> | |
321 | + <colorrole role="WindowText"> | |
322 | + <brush brushstyle="SolidPattern"> | |
323 | + <color alpha="255"> | |
324 | + <red>255</red> | |
325 | + <green>255</green> | |
326 | + <blue>255</blue> | |
327 | + </color> | |
328 | + </brush> | |
329 | + </colorrole> | |
330 | + </active> | |
331 | + <inactive> | |
332 | + <colorrole role="WindowText"> | |
333 | + <brush brushstyle="SolidPattern"> | |
334 | + <color alpha="255"> | |
335 | + <red>255</red> | |
336 | + <green>255</green> | |
337 | + <blue>255</blue> | |
338 | + </color> | |
339 | + </brush> | |
340 | + </colorrole> | |
341 | + </inactive> | |
342 | + <disabled> | |
343 | + <colorrole role="WindowText"> | |
344 | + <brush brushstyle="SolidPattern"> | |
345 | + <color alpha="255"> | |
346 | + <red>123</red> | |
347 | + <green>123</green> | |
348 | + <blue>123</blue> | |
349 | + </color> | |
350 | + </brush> | |
351 | + </colorrole> | |
352 | + </disabled> | |
353 | + </palette> | |
354 | + </property> | |
355 | + <property name="font"> | |
356 | + <font> | |
357 | + <family>Roboto</family> | |
358 | + <pointsize>13</pointsize> | |
359 | + <weight>75</weight> | |
360 | + <bold>true</bold> | |
361 | + </font> | |
362 | + </property> | |
363 | + <property name="text"> | |
364 | + <string/> | |
365 | + </property> | |
366 | + <property name="alignment"> | |
367 | + <set>Qt::AlignCenter</set> | |
368 | + </property> | |
369 | + </widget> | |
370 | + <widget class="QLabel" name="washStepCountLabel"> | |
371 | + <property name="enabled"> | |
372 | + <bool>true</bool> | |
373 | + </property> | |
374 | + <property name="geometry"> | |
375 | + <rect> | |
376 | + <x>119</x> | |
377 | + <y>242</y> | |
378 | + <width>130</width> | |
379 | + <height>58</height> | |
380 | + </rect> | |
381 | + </property> | |
382 | + <property name="palette"> | |
383 | + <palette> | |
384 | + <active> | |
385 | + <colorrole role="WindowText"> | |
386 | + <brush brushstyle="SolidPattern"> | |
387 | + <color alpha="255"> | |
388 | + <red>255</red> | |
389 | + <green>255</green> | |
390 | + <blue>255</blue> | |
391 | + </color> | |
392 | + </brush> | |
393 | + </colorrole> | |
394 | + </active> | |
395 | + <inactive> | |
396 | + <colorrole role="WindowText"> | |
397 | + <brush brushstyle="SolidPattern"> | |
398 | + <color alpha="255"> | |
399 | + <red>255</red> | |
400 | + <green>255</green> | |
401 | + <blue>255</blue> | |
402 | + </color> | |
403 | + </brush> | |
404 | + </colorrole> | |
405 | + </inactive> | |
406 | + <disabled> | |
407 | + <colorrole role="WindowText"> | |
408 | + <brush brushstyle="SolidPattern"> | |
409 | + <color alpha="255"> | |
410 | + <red>123</red> | |
411 | + <green>123</green> | |
412 | + <blue>123</blue> | |
413 | + </color> | |
414 | + </brush> | |
415 | + </colorrole> | |
416 | + </disabled> | |
417 | + </palette> | |
418 | + </property> | |
419 | + <property name="font"> | |
420 | + <font> | |
421 | + <family>Roboto</family> | |
422 | + <pointsize>13</pointsize> | |
423 | + <weight>75</weight> | |
424 | + <bold>true</bold> | |
425 | + </font> | |
426 | + </property> | |
427 | + <property name="text"> | |
428 | + <string/> | |
429 | + </property> | |
430 | + <property name="alignment"> | |
431 | + <set>Qt::AlignCenter</set> | |
432 | + </property> | |
433 | + </widget> | |
305 | 434 | </widget> |
306 | 435 | </widget> |
307 | 436 | <widget class="QLabel" name="label"> | ... | ... |