Commit 6d5da5fca82da08a9784b59d19c8a960fe95552c
1 parent
f4f894f09b
Exists in
master
and in
2 other branches
청결/관리 상태 기능 반영
Showing
4 changed files
with
28 additions
and
4 deletions
Show diff stats
app/gui/oven_control/oven.cpp
... | ... | @@ -5,6 +5,7 @@ |
5 | 5 | #include <cmath> |
6 | 6 | |
7 | 7 | #include "soundplayer.h" |
8 | +#include "dirtylevel.h" | |
8 | 9 | |
9 | 10 | Oven *Oven::instance = 0; |
10 | 11 | |
... | ... | @@ -358,6 +359,8 @@ void Oven::startCooking() |
358 | 359 | cooking_ = true; |
359 | 360 | cookingTimer.start(); |
360 | 361 | interface->startCooking(); |
362 | + | |
363 | + DirtyLevel::cookStart(); | |
361 | 364 | } |
362 | 365 | |
363 | 366 | emit changed(this); |
... | ... | @@ -384,6 +387,8 @@ void Oven::stopCooking() |
384 | 387 | cooking_ = false; |
385 | 388 | interface->stopCooking(); |
386 | 389 | |
390 | + DirtyLevel::cookEnd(); | |
391 | + | |
387 | 392 | emit changed(this); |
388 | 393 | } |
389 | 394 | } | ... | ... |
app/gui/oven_control/washwindow.cpp
... | ... | @@ -4,6 +4,7 @@ |
4 | 4 | #include <QSignalMapper> |
5 | 5 | |
6 | 6 | #include "soundplayer.h" |
7 | +#include "dirtylevel.h" | |
7 | 8 | |
8 | 9 | WashWindow::WashWindow(QWidget *parent) : |
9 | 10 | QMainWindow(parent), |
... | ... | @@ -48,6 +49,8 @@ WashWindow::WashWindow(QWidget *parent) : |
48 | 49 | |
49 | 50 | foreach (QPushButton *button, findChildren<QPushButton *>()) |
50 | 51 | connect(button, &QPushButton::pressed, SoundPlayer::playClick); |
52 | + | |
53 | + updateGauge(); | |
51 | 54 | } |
52 | 55 | |
53 | 56 | WashWindow::~WashWindow() |
... | ... | @@ -97,6 +100,12 @@ void WashWindow::returnToClock() |
97 | 100 | ui->upperStack->setCurrentIndex(0); |
98 | 101 | } |
99 | 102 | |
103 | +void WashWindow::updateGauge() | |
104 | +{ | |
105 | + ui->dirtySlider->setValue(DirtyLevel::dirty()); | |
106 | + ui->stateSlider->setValue(DirtyLevel::state()); | |
107 | +} | |
108 | + | |
100 | 109 | void WashWindow::onChanged() |
101 | 110 | { |
102 | 111 | if (!selected) |
... | ... | @@ -213,6 +222,7 @@ void WashWindow::onChanged() |
213 | 222 | else if (run) |
214 | 223 | { |
215 | 224 | SoundPlayer::playStop(); |
225 | + DirtyLevel::wash(type); | |
216 | 226 | |
217 | 227 | ui->titleLabel->setText("세척이 종료되었습니다"); |
218 | 228 | ui->descLabel->setText(""); |
... | ... | @@ -229,6 +239,8 @@ void WashWindow::onChanged() |
229 | 239 | opened = false; |
230 | 240 | started = false; |
231 | 241 | run = false; |
242 | + | |
243 | + updateGauge(); | |
232 | 244 | } |
233 | 245 | } |
234 | 246 | ... | ... |
app/gui/oven_control/washwindow.h
app/gui/oven_control/washwindow.ui
... | ... | @@ -851,7 +851,10 @@ QPushButton:pressed { image: url(:/images/slider_icon/management_ov.png); }</str |
851 | 851 | <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> |
852 | 852 | </property> |
853 | 853 | </widget> |
854 | - <widget class="QSlider" name="configSlider_4"> | |
854 | + <widget class="QSlider" name="stateSlider"> | |
855 | + <property name="enabled"> | |
856 | + <bool>false</bool> | |
857 | + </property> | |
855 | 858 | <property name="geometry"> |
856 | 859 | <rect> |
857 | 860 | <x>185</x> |
... | ... | @@ -861,7 +864,7 @@ QPushButton:pressed { image: url(:/images/slider_icon/management_ov.png); }</str |
861 | 864 | </rect> |
862 | 865 | </property> |
863 | 866 | <property name="maximum"> |
864 | - <number>100</number> | |
867 | + <number>5</number> | |
865 | 868 | </property> |
866 | 869 | <property name="pageStep"> |
867 | 870 | <number>1</number> |
... | ... | @@ -1087,7 +1090,10 @@ QPushButton:pressed { image: url(:/images/slider_icon/clean_ov.png); }</string> |
1087 | 1090 | <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> |
1088 | 1091 | </property> |
1089 | 1092 | </widget> |
1090 | - <widget class="QSlider" name="configSlider_5"> | |
1093 | + <widget class="QSlider" name="dirtySlider"> | |
1094 | + <property name="enabled"> | |
1095 | + <bool>false</bool> | |
1096 | + </property> | |
1091 | 1097 | <property name="geometry"> |
1092 | 1098 | <rect> |
1093 | 1099 | <x>185</x> |
... | ... | @@ -1097,7 +1103,7 @@ QPushButton:pressed { image: url(:/images/slider_icon/clean_ov.png); }</string> |
1097 | 1103 | </rect> |
1098 | 1104 | </property> |
1099 | 1105 | <property name="maximum"> |
1100 | - <number>100</number> | |
1106 | + <number>5</number> | |
1101 | 1107 | </property> |
1102 | 1108 | <property name="pageStep"> |
1103 | 1109 | <number>1</number> | ... | ... |