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 | 197 | |
| 198 | 198 | void AutoCookConfigWindow::start() |
| 199 | 199 | { |
| 200 | - close(); | |
| 201 | - | |
| 202 | 200 | AutoCookWindow *w = new AutoCookWindow(parentWidget(), cook); |
| 203 | 201 | w->setWindowModality(Qt::WindowModal); |
| 204 | 202 | w->showFullScreen(); |
| 205 | 203 | w->raise(); |
| 204 | + | |
| 205 | + connect(w, SIGNAL(destroyed(QObject*)), SLOT(startTimer())); | |
| 206 | 206 | } |
| 207 | 207 | |
| 208 | 208 | void AutoCookConfigWindow::addFavorite() | ... | ... |
app/gui/oven_control/autocookwindow.cpp
| ... | ... | @@ -124,6 +124,8 @@ void AutoCookWindow::setupUi() |
| 124 | 124 | lastViewDoorType = Define::Invalid; |
| 125 | 125 | lastViewTime = 0; |
| 126 | 126 | lastViewStepIndex = -1; |
| 127 | + lastViewTemp = 999; | |
| 128 | + lastViewHumidity = 999; | |
| 127 | 129 | selectedStepIndex = 0; |
| 128 | 130 | showingCurrentHumidity = false; |
| 129 | 131 | showingCurrentTemp = false; |
| ... | ... | @@ -669,6 +671,23 @@ void AutoCookWindow::jumpWash() |
| 669 | 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 | 691 | void AutoCookWindow::on_humidityGaugeButton_pressed() |
| 673 | 692 | { |
| 674 | 693 | showCurrentHumidityTimer.start(); | ... | ... |
app/gui/oven_control/autocookwindow.h
| ... | ... | @@ -71,6 +71,9 @@ private slots: |
| 71 | 71 | void jumpConfig(); |
| 72 | 72 | void jumpWash(); |
| 73 | 73 | |
| 74 | + void on_selectCookButton_clicked(); | |
| 75 | + void on_homeButton_clicked(); | |
| 76 | + void on_configCookButton_clicked(); | |
| 74 | 77 | void on_humidityGaugeButton_pressed(); |
| 75 | 78 | void on_humidityGaugeButton_released(); |
| 76 | 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 | 268 | <string>Preheat</string> |
| 269 | 269 | </property> |
| 270 | 270 | </widget> |
| 271 | - <widget class="QPushButton" name="autoCookButton"> | |
| 271 | + <widget class="QPushButton" name="homeButton"> | |
| 272 | 272 | <property name="geometry"> |
| 273 | 273 | <rect> |
| 274 | 274 | <x>559</x> |
| ... | ... | @@ -1330,7 +1330,7 @@ QPushButton:pressed { border-image: url(:/images/button/152_ov.png); }</string> |
| 1330 | 1330 | <zorder>bottomBar</zorder> |
| 1331 | 1331 | <zorder>configCookButton</zorder> |
| 1332 | 1332 | <zorder>doorStepLabel</zorder> |
| 1333 | - <zorder>autoCookButton</zorder> | |
| 1333 | + <zorder>homeButton</zorder> | |
| 1334 | 1334 | <zorder>cookModeIcon</zorder> |
| 1335 | 1335 | <zorder>humidityGauge</zorder> |
| 1336 | 1336 | <zorder>humidityLabel</zorder> |
| ... | ... | @@ -1367,14 +1367,14 @@ QPushButton:pressed { border-image: url(:/images/button/152_ov.png); }</string> |
| 1367 | 1367 | <container>1</container> |
| 1368 | 1368 | </customwidget> |
| 1369 | 1369 | <customwidget> |
| 1370 | - <class>AnimatedImageBox</class> | |
| 1370 | + <class>WashWarnIcon</class> | |
| 1371 | 1371 | <extends>QLabel</extends> |
| 1372 | - <header>animatedimagebox.h</header> | |
| 1372 | + <header>washwarnicon.h</header> | |
| 1373 | 1373 | </customwidget> |
| 1374 | 1374 | <customwidget> |
| 1375 | - <class>WashWarnIcon</class> | |
| 1375 | + <class>AnimatedImageBox</class> | |
| 1376 | 1376 | <extends>QLabel</extends> |
| 1377 | - <header>washwarnicon.h</header> | |
| 1377 | + <header>animatedimagebox.h</header> | |
| 1378 | 1378 | </customwidget> |
| 1379 | 1379 | <customwidget> |
| 1380 | 1380 | <class>BulletIndicator</class> | ... | ... |
app/gui/oven_control/mainwindow.cpp
| ... | ... | @@ -51,6 +51,14 @@ void MainWindow::jump(QMainWindow *newChild) |
| 51 | 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 | 62 | static QPushButton *pushedChild = NULL; |
| 55 | 63 | |
| 56 | 64 | void MainWindow::keyPressEvent(QKeyEvent *event) | ... | ... |
app/gui/oven_control/mainwindow.h