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
+
+