Commit 7d02881729c05a99b120d907b555dfc96ef07bbf
1 parent
161fae67b7
Exists in
master
and in
2 other branches
기능 추가 구현
- 자동 요리에 홈 버튼 기능 추가
Showing
6 changed files
with
39 additions
and
8 deletions
Show diff stats
app/gui/oven_control/autocookconfigwindow.cpp
@@ -197,12 +197,12 @@ void AutoCookConfigWindow::stopTimer() | @@ -197,12 +197,12 @@ void AutoCookConfigWindow::stopTimer() | ||
197 | 197 | ||
198 | void AutoCookConfigWindow::start() | 198 | void AutoCookConfigWindow::start() |
199 | { | 199 | { |
200 | - close(); | ||
201 | - | ||
202 | AutoCookWindow *w = new AutoCookWindow(parentWidget(), cook); | 200 | AutoCookWindow *w = new AutoCookWindow(parentWidget(), cook); |
203 | w->setWindowModality(Qt::WindowModal); | 201 | w->setWindowModality(Qt::WindowModal); |
204 | w->showFullScreen(); | 202 | w->showFullScreen(); |
205 | w->raise(); | 203 | w->raise(); |
204 | + | ||
205 | + connect(w, SIGNAL(destroyed(QObject*)), SLOT(startTimer())); | ||
206 | } | 206 | } |
207 | 207 | ||
208 | void AutoCookConfigWindow::addFavorite() | 208 | void AutoCookConfigWindow::addFavorite() |
app/gui/oven_control/autocookwindow.cpp
@@ -124,6 +124,8 @@ void AutoCookWindow::setupUi() | @@ -124,6 +124,8 @@ void AutoCookWindow::setupUi() | ||
124 | lastViewDoorType = Define::Invalid; | 124 | lastViewDoorType = Define::Invalid; |
125 | lastViewTime = 0; | 125 | lastViewTime = 0; |
126 | lastViewStepIndex = -1; | 126 | lastViewStepIndex = -1; |
127 | + lastViewTemp = 999; | ||
128 | + lastViewHumidity = 999; | ||
127 | selectedStepIndex = 0; | 129 | selectedStepIndex = 0; |
128 | showingCurrentHumidity = false; | 130 | showingCurrentHumidity = false; |
129 | showingCurrentTemp = false; | 131 | showingCurrentTemp = false; |
@@ -669,6 +671,23 @@ void AutoCookWindow::jumpWash() | @@ -669,6 +671,23 @@ void AutoCookWindow::jumpWash() | ||
669 | MainWindow::jump(w); | 671 | MainWindow::jump(w); |
670 | } | 672 | } |
671 | 673 | ||
674 | +void AutoCookWindow::on_selectCookButton_clicked() | ||
675 | +{ | ||
676 | + | ||
677 | +} | ||
678 | + | ||
679 | +void AutoCookWindow::on_homeButton_clicked() | ||
680 | +{ | ||
681 | + Oven::getInstance()->stop(); | ||
682 | + | ||
683 | + MainWindow::killChild(); | ||
684 | +} | ||
685 | + | ||
686 | +void AutoCookWindow::on_configCookButton_clicked() | ||
687 | +{ | ||
688 | + | ||
689 | +} | ||
690 | + | ||
672 | void AutoCookWindow::on_humidityGaugeButton_pressed() | 691 | void AutoCookWindow::on_humidityGaugeButton_pressed() |
673 | { | 692 | { |
674 | showCurrentHumidityTimer.start(); | 693 | showCurrentHumidityTimer.start(); |
app/gui/oven_control/autocookwindow.h
@@ -71,6 +71,9 @@ private slots: | @@ -71,6 +71,9 @@ private slots: | ||
71 | void jumpConfig(); | 71 | void jumpConfig(); |
72 | void jumpWash(); | 72 | void jumpWash(); |
73 | 73 | ||
74 | + void on_selectCookButton_clicked(); | ||
75 | + void on_homeButton_clicked(); | ||
76 | + void on_configCookButton_clicked(); | ||
74 | void on_humidityGaugeButton_pressed(); | 77 | void on_humidityGaugeButton_pressed(); |
75 | void on_humidityGaugeButton_released(); | 78 | void on_humidityGaugeButton_released(); |
76 | void on_heatGaugeButton_pressed(); | 79 | void on_heatGaugeButton_pressed(); |
app/gui/oven_control/autocookwindow.ui
@@ -268,7 +268,7 @@ QPushButton::pressed { border-image: url(:/images/button/152_ov.png); }</string> | @@ -268,7 +268,7 @@ QPushButton::pressed { border-image: url(:/images/button/152_ov.png); }</string> | ||
268 | <string>Preheat</string> | 268 | <string>Preheat</string> |
269 | </property> | 269 | </property> |
270 | </widget> | 270 | </widget> |
271 | - <widget class="QPushButton" name="autoCookButton"> | 271 | + <widget class="QPushButton" name="homeButton"> |
272 | <property name="geometry"> | 272 | <property name="geometry"> |
273 | <rect> | 273 | <rect> |
274 | <x>559</x> | 274 | <x>559</x> |
@@ -1330,7 +1330,7 @@ QPushButton:pressed { border-image: url(:/images/button/152_ov.png); }</string> | @@ -1330,7 +1330,7 @@ QPushButton:pressed { border-image: url(:/images/button/152_ov.png); }</string> | ||
1330 | <zorder>bottomBar</zorder> | 1330 | <zorder>bottomBar</zorder> |
1331 | <zorder>configCookButton</zorder> | 1331 | <zorder>configCookButton</zorder> |
1332 | <zorder>doorStepLabel</zorder> | 1332 | <zorder>doorStepLabel</zorder> |
1333 | - <zorder>autoCookButton</zorder> | 1333 | + <zorder>homeButton</zorder> |
1334 | <zorder>cookModeIcon</zorder> | 1334 | <zorder>cookModeIcon</zorder> |
1335 | <zorder>humidityGauge</zorder> | 1335 | <zorder>humidityGauge</zorder> |
1336 | <zorder>humidityLabel</zorder> | 1336 | <zorder>humidityLabel</zorder> |
@@ -1367,14 +1367,14 @@ QPushButton:pressed { border-image: url(:/images/button/152_ov.png); }</string> | @@ -1367,14 +1367,14 @@ QPushButton:pressed { border-image: url(:/images/button/152_ov.png); }</string> | ||
1367 | <container>1</container> | 1367 | <container>1</container> |
1368 | </customwidget> | 1368 | </customwidget> |
1369 | <customwidget> | 1369 | <customwidget> |
1370 | - <class>AnimatedImageBox</class> | 1370 | + <class>WashWarnIcon</class> |
1371 | <extends>QLabel</extends> | 1371 | <extends>QLabel</extends> |
1372 | - <header>animatedimagebox.h</header> | 1372 | + <header>washwarnicon.h</header> |
1373 | </customwidget> | 1373 | </customwidget> |
1374 | <customwidget> | 1374 | <customwidget> |
1375 | - <class>WashWarnIcon</class> | 1375 | + <class>AnimatedImageBox</class> |
1376 | <extends>QLabel</extends> | 1376 | <extends>QLabel</extends> |
1377 | - <header>washwarnicon.h</header> | 1377 | + <header>animatedimagebox.h</header> |
1378 | </customwidget> | 1378 | </customwidget> |
1379 | <customwidget> | 1379 | <customwidget> |
1380 | <class>BulletIndicator</class> | 1380 | <class>BulletIndicator</class> |
app/gui/oven_control/mainwindow.cpp
@@ -51,6 +51,14 @@ void MainWindow::jump(QMainWindow *newChild) | @@ -51,6 +51,14 @@ void MainWindow::jump(QMainWindow *newChild) | ||
51 | instance->child = newChild; | 51 | instance->child = newChild; |
52 | } | 52 | } |
53 | 53 | ||
54 | +void MainWindow::killChild() | ||
55 | +{ | ||
56 | + if (instance->child) | ||
57 | + instance->child->deleteLater(); | ||
58 | + | ||
59 | + instance->child = NULL; | ||
60 | +} | ||
61 | + | ||
54 | static QPushButton *pushedChild = NULL; | 62 | static QPushButton *pushedChild = NULL; |
55 | 63 | ||
56 | void MainWindow::keyPressEvent(QKeyEvent *event) | 64 | void MainWindow::keyPressEvent(QKeyEvent *event) |
app/gui/oven_control/mainwindow.h
@@ -22,6 +22,7 @@ public: | @@ -22,6 +22,7 @@ public: | ||
22 | 22 | ||
23 | static MainWindow *getInstance() { return instance; } | 23 | static MainWindow *getInstance() { return instance; } |
24 | static void jump(QMainWindow *newChild); | 24 | static void jump(QMainWindow *newChild); |
25 | + static void killChild(); | ||
25 | 26 | ||
26 | protected: | 27 | protected: |
27 | void keyPressEvent(QKeyEvent *event); | 28 | void keyPressEvent(QKeyEvent *event); |