From 6d5da5fca82da08a9784b59d19c8a960fe95552c Mon Sep 17 00:00:00 2001 From: victor Date: Mon, 22 May 2017 20:58:40 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B2=AD=EA=B2=B0/=EA=B4=80=EB=A6=AC=20?= =?UTF-8?q?=EC=83=81=ED=83=9C=20=EA=B8=B0=EB=8A=A5=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/gui/oven_control/oven.cpp | 5 +++++ app/gui/oven_control/washwindow.cpp | 12 ++++++++++++ app/gui/oven_control/washwindow.h | 1 + app/gui/oven_control/washwindow.ui | 14 ++++++++++---- 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/app/gui/oven_control/oven.cpp b/app/gui/oven_control/oven.cpp index 86e2cd6..ac48f1d 100644 --- a/app/gui/oven_control/oven.cpp +++ b/app/gui/oven_control/oven.cpp @@ -5,6 +5,7 @@ #include #include "soundplayer.h" +#include "dirtylevel.h" Oven *Oven::instance = 0; @@ -358,6 +359,8 @@ void Oven::startCooking() cooking_ = true; cookingTimer.start(); interface->startCooking(); + + DirtyLevel::cookStart(); } emit changed(this); @@ -384,6 +387,8 @@ void Oven::stopCooking() cooking_ = false; interface->stopCooking(); + DirtyLevel::cookEnd(); + emit changed(this); } } diff --git a/app/gui/oven_control/washwindow.cpp b/app/gui/oven_control/washwindow.cpp index fc255f8..b7cf8d6 100644 --- a/app/gui/oven_control/washwindow.cpp +++ b/app/gui/oven_control/washwindow.cpp @@ -4,6 +4,7 @@ #include #include "soundplayer.h" +#include "dirtylevel.h" WashWindow::WashWindow(QWidget *parent) : QMainWindow(parent), @@ -48,6 +49,8 @@ WashWindow::WashWindow(QWidget *parent) : foreach (QPushButton *button, findChildren()) connect(button, &QPushButton::pressed, SoundPlayer::playClick); + + updateGauge(); } WashWindow::~WashWindow() @@ -97,6 +100,12 @@ void WashWindow::returnToClock() ui->upperStack->setCurrentIndex(0); } +void WashWindow::updateGauge() +{ + ui->dirtySlider->setValue(DirtyLevel::dirty()); + ui->stateSlider->setValue(DirtyLevel::state()); +} + void WashWindow::onChanged() { if (!selected) @@ -213,6 +222,7 @@ void WashWindow::onChanged() else if (run) { SoundPlayer::playStop(); + DirtyLevel::wash(type); ui->titleLabel->setText("세척이 종료되었습니다"); ui->descLabel->setText(""); @@ -229,6 +239,8 @@ void WashWindow::onChanged() opened = false; started = false; run = false; + + updateGauge(); } } diff --git a/app/gui/oven_control/washwindow.h b/app/gui/oven_control/washwindow.h index 7b12ade..5913929 100644 --- a/app/gui/oven_control/washwindow.h +++ b/app/gui/oven_control/washwindow.h @@ -22,6 +22,7 @@ private slots: void start(int type); void stop(); void returnToClock(); + void updateGauge(); void onChanged(); void on_backButton_clicked(); diff --git a/app/gui/oven_control/washwindow.ui b/app/gui/oven_control/washwindow.ui index 9ea906b..d554ca7 100644 --- a/app/gui/oven_control/washwindow.ui +++ b/app/gui/oven_control/washwindow.ui @@ -851,7 +851,10 @@ QPushButton:pressed { image: url(:/images/slider_icon/management_ov.png); }Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - + + + false + 185 @@ -861,7 +864,7 @@ QPushButton:pressed { image: url(:/images/slider_icon/management_ov.png); } - 100 + 5 1 @@ -1087,7 +1090,10 @@ QPushButton:pressed { image: url(:/images/slider_icon/clean_ov.png); } Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - + + + false + 185 @@ -1097,7 +1103,7 @@ QPushButton:pressed { image: url(:/images/slider_icon/clean_ov.png); } - 100 + 5 1 -- 2.1.4