From aa40dc8071e269065ae2851ba7ded460f8ff1863 Mon Sep 17 00:00:00 2001 From: victor Date: Tue, 18 Apr 2017 16:53:52 +0900 Subject: [PATCH] =?UTF-8?q?=EC=84=B8=EC=B2=99=20=EB=AA=A8=EB=93=9C=20?= =?UTF-8?q?=EC=A4=91=20=EB=92=A4=EB=A1=9C=20=EA=B0=80=EA=B8=B0=20=EB=B2=84?= =?UTF-8?q?=ED=8A=BC=EC=9D=84=20=EB=88=84=EB=A5=B4=EB=A9=B4=20=EC=84=B8?= =?UTF-8?q?=EC=B2=99=20=EC=A2=85=EB=A3=8C=20=ED=99=94=EB=A9=B4=20=ED=91=9C?= =?UTF-8?q?=EC=8B=9C=20=ED=9B=84=20=EC=84=B8=EC=B2=99=EC=9D=B4=20=EC=A2=85?= =?UTF-8?q?=EB=A3=8C=EB=90=9C=20=EB=92=A4=20=EB=92=A4=EB=A1=9C=EA=B0=80?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/gui/oven_control/washwindow.cpp | 46 ++++++++---- app/gui/oven_control/washwindow.h | 1 + app/gui/oven_control/washwindow.ui | 139 ++++++++++++++++++++++++++++++++++-- 3 files changed, 167 insertions(+), 19 deletions(-) diff --git a/app/gui/oven_control/washwindow.cpp b/app/gui/oven_control/washwindow.cpp index 3920e46..4d00a6f 100644 --- a/app/gui/oven_control/washwindow.cpp +++ b/app/gui/oven_control/washwindow.cpp @@ -11,6 +11,7 @@ WashWindow::WashWindow(QWidget *parent, UdpHandler *udp) : opened(false), started(false), run(false), + canceled(false), type(0) { ui->setupUi(this); @@ -78,6 +79,13 @@ void WashWindow::start(int type) void WashWindow::stop() { + if (!started) + return; + + if (canceled) + return; + + canceled = true; udp->turnOff(TG_CLEANING); } @@ -128,6 +136,8 @@ void WashWindow::onChanged() ui->animation->load(":/images/animation/wash_03.png"); ui->animation->load(":/images/animation/wash_04.png"); ui->washStepGauge->setValue(0); + ui->titleLabel->setText("기기의 내부를 세척 중입니다"); + ui->descLabel->setText("완료될 때까지 문을 열지 마세요.\n기기의 내부의 자동 세척 기능을 실행 중입니다."); ui->washStepTypeLabel->setText(""); ui->washStepCountLabel->setText(""); @@ -154,44 +164,50 @@ void WashWindow::onChanged() switch (control.clean_step_type) { case 1: - ui->washStepTypeLabel->setText("내부 헹굼"); + ui->washStepTypeLabel->setText("내부 헹굼 진행 중입니다."); break; case 2: - ui->washStepTypeLabel->setText("Steam Generator Tank 급수"); + ui->washStepTypeLabel->setText("스팀 급수 진행 중입니다."); break; case 3: - ui->washStepTypeLabel->setText("Inner Tank 팬 사이드 세척"); + ui->washStepTypeLabel->setText("내부 팬 세척 진행 중입니다."); break; case 4: - ui->washStepTypeLabel->setText("Inner Tank 불림"); + ui->washStepTypeLabel->setText("내부 스팀 불림 진행 중입니다."); break; case 5: - ui->washStepTypeLabel->setText("Inner Tank 강 세척"); + ui->washStepTypeLabel->setText("내부 강 세척 진행 중입니다."); break; case 6: - ui->washStepTypeLabel->setText("Inner Tank 상부 세척"); + ui->washStepTypeLabel->setText("내부 상부 세척 진행 중입니다."); break; case 7: - ui->washStepTypeLabel->setText("Inner Tank 스팀 세척"); + ui->washStepTypeLabel->setText("내부 스팀 세척 진행 중입니다."); break; case 8: - ui->washStepTypeLabel->setText("드레인 탱크 헹굼"); + ui->washStepTypeLabel->setText("세척 종료 진행 중입니다."); break; case 9: - ui->washStepTypeLabel->setText("세제 세척수 만들기"); + ui->washStepTypeLabel->setText("세제 세척수 만들기 진행 중입니다."); break; case 10: - ui->washStepTypeLabel->setText("세제 세척수 헹굼"); + ui->washStepTypeLabel->setText("세제 세척수 헹굼 진행 중입니다."); break; case 11: - ui->washStepTypeLabel->setText("드레인 탱크 헹굼수 채움"); + ui->washStepTypeLabel->setText("하부 탱크 세척수 만들기 진행 중입니다."); break; } } } + else if (canceled) + { + close(); + } else if (run) { - ui->washStepTypeLabel->setText("세척이 종료되었습니다"); + ui->titleLabel->setText("세척이 종료되었습니다"); + ui->descLabel->setText(""); + ui->washStepTypeLabel->setText(""); ui->washStepCountLabel->setText(""); ui->animation->stop(); @@ -209,6 +225,8 @@ void WashWindow::onChanged() void WashWindow::on_backButton_clicked() { - stop(); - close(); + if (started) + stop(); + else + close(); } diff --git a/app/gui/oven_control/washwindow.h b/app/gui/oven_control/washwindow.h index c56ec23..d402ded 100644 --- a/app/gui/oven_control/washwindow.h +++ b/app/gui/oven_control/washwindow.h @@ -33,6 +33,7 @@ private: bool opened; bool started; bool run; + bool canceled; int type; QTimer returnToClockTimer; diff --git a/app/gui/oven_control/washwindow.ui b/app/gui/oven_control/washwindow.ui index 6ec30a1..9ea906b 100644 --- a/app/gui/oven_control/washwindow.ui +++ b/app/gui/oven_control/washwindow.ui @@ -99,7 +99,7 @@ border: none; - + true @@ -157,13 +157,13 @@ border: none; - + 기기의 내부를 세척 중입니다 Qt::AlignCenter - + true @@ -172,7 +172,7 @@ border: none; 0 88 900 - 176 + 88 @@ -219,7 +219,8 @@ border: none; - + 완료될 때까지 문을 열지 마세요. +기기의 내부의 자동 세척 기능을 실행 중입니다. Qt::AlignCenter @@ -302,6 +303,134 @@ border: none; Qt::AlignCenter + + + true + + + + 249 + 242 + 532 + 58 + + + + + + + + + 255 + 255 + 255 + + + + + + + + + 255 + 255 + 255 + + + + + + + + + 123 + 123 + 123 + + + + + + + + + Roboto + 13 + 75 + true + + + + + + + Qt::AlignCenter + + + + + true + + + + 119 + 242 + 130 + 58 + + + + + + + + + 255 + 255 + 255 + + + + + + + + + 255 + 255 + 255 + + + + + + + + + 123 + 123 + 123 + + + + + + + + + Roboto + 13 + 75 + true + + + + + + + Qt::AlignCenter + + -- 2.1.4