diff --git a/app/gui/oven_control/autocookconfigwindow.cpp b/app/gui/oven_control/autocookconfigwindow.cpp index a78a78b..2ab0fba 100644 --- a/app/gui/oven_control/autocookconfigwindow.cpp +++ b/app/gui/oven_control/autocookconfigwindow.cpp @@ -197,12 +197,12 @@ void AutoCookConfigWindow::stopTimer() void AutoCookConfigWindow::start() { - close(); - AutoCookWindow *w = new AutoCookWindow(parentWidget(), cook); w->setWindowModality(Qt::WindowModal); w->showFullScreen(); w->raise(); + + connect(w, SIGNAL(destroyed(QObject*)), SLOT(startTimer())); } void AutoCookConfigWindow::addFavorite() diff --git a/app/gui/oven_control/autocookwindow.cpp b/app/gui/oven_control/autocookwindow.cpp index e2dc5d7..ea4fa11 100644 --- a/app/gui/oven_control/autocookwindow.cpp +++ b/app/gui/oven_control/autocookwindow.cpp @@ -124,6 +124,8 @@ void AutoCookWindow::setupUi() lastViewDoorType = Define::Invalid; lastViewTime = 0; lastViewStepIndex = -1; + lastViewTemp = 999; + lastViewHumidity = 999; selectedStepIndex = 0; showingCurrentHumidity = false; showingCurrentTemp = false; @@ -669,6 +671,23 @@ void AutoCookWindow::jumpWash() MainWindow::jump(w); } +void AutoCookWindow::on_selectCookButton_clicked() +{ + +} + +void AutoCookWindow::on_homeButton_clicked() +{ + Oven::getInstance()->stop(); + + MainWindow::killChild(); +} + +void AutoCookWindow::on_configCookButton_clicked() +{ + +} + void AutoCookWindow::on_humidityGaugeButton_pressed() { showCurrentHumidityTimer.start(); diff --git a/app/gui/oven_control/autocookwindow.h b/app/gui/oven_control/autocookwindow.h index dafb7f5..56d01ed 100644 --- a/app/gui/oven_control/autocookwindow.h +++ b/app/gui/oven_control/autocookwindow.h @@ -71,6 +71,9 @@ private slots: void jumpConfig(); void jumpWash(); + void on_selectCookButton_clicked(); + void on_homeButton_clicked(); + void on_configCookButton_clicked(); void on_humidityGaugeButton_pressed(); void on_humidityGaugeButton_released(); void on_heatGaugeButton_pressed(); diff --git a/app/gui/oven_control/autocookwindow.ui b/app/gui/oven_control/autocookwindow.ui index 9be5756..606447a 100644 --- a/app/gui/oven_control/autocookwindow.ui +++ b/app/gui/oven_control/autocookwindow.ui @@ -268,7 +268,7 @@ QPushButton::pressed { border-image: url(:/images/button/152_ov.png); } Preheat - + 559 @@ -1330,7 +1330,7 @@ QPushButton:pressed { border-image: url(:/images/button/152_ov.png); } bottomBar configCookButton doorStepLabel - autoCookButton + homeButton cookModeIcon humidityGauge humidityLabel @@ -1367,14 +1367,14 @@ QPushButton:pressed { border-image: url(:/images/button/152_ov.png); } 1 - AnimatedImageBox + WashWarnIcon QLabel -
animatedimagebox.h
+
washwarnicon.h
- WashWarnIcon + AnimatedImageBox QLabel -
washwarnicon.h
+
animatedimagebox.h
BulletIndicator diff --git a/app/gui/oven_control/mainwindow.cpp b/app/gui/oven_control/mainwindow.cpp index 1b4325f..22e7600 100644 --- a/app/gui/oven_control/mainwindow.cpp +++ b/app/gui/oven_control/mainwindow.cpp @@ -51,6 +51,14 @@ void MainWindow::jump(QMainWindow *newChild) instance->child = newChild; } +void MainWindow::killChild() +{ + if (instance->child) + instance->child->deleteLater(); + + instance->child = NULL; +} + static QPushButton *pushedChild = NULL; void MainWindow::keyPressEvent(QKeyEvent *event) diff --git a/app/gui/oven_control/mainwindow.h b/app/gui/oven_control/mainwindow.h index 3c5ab85..d45cefe 100644 --- a/app/gui/oven_control/mainwindow.h +++ b/app/gui/oven_control/mainwindow.h @@ -22,6 +22,7 @@ public: static MainWindow *getInstance() { return instance; } static void jump(QMainWindow *newChild); + static void killChild(); protected: void keyPressEvent(QKeyEvent *event);