diff --git a/app/gui/oven_control/manualcookwindow.cpp b/app/gui/oven_control/manualcookwindow.cpp index e8a73c4..6b2e383 100644 --- a/app/gui/oven_control/manualcookwindow.cpp +++ b/app/gui/oven_control/manualcookwindow.cpp @@ -240,15 +240,26 @@ void ManualCookWindow::keyReleaseEvent(QKeyEvent *event) void ManualCookWindow::setupAnimation() { - ui->openDoorAnimation->load(":/images/animation/door_big_09.png"); - ui->openDoorAnimation->load(":/images/animation/door_big_08.png"); - ui->openDoorAnimation->load(":/images/animation/door_big_07.png"); - ui->openDoorAnimation->load(":/images/animation/door_big_06.png"); - ui->openDoorAnimation->load(":/images/animation/door_big_05.png"); - ui->openDoorAnimation->load(":/images/animation/door_big_04.png"); - ui->openDoorAnimation->load(":/images/animation/door_big_03.png"); - ui->openDoorAnimation->load(":/images/animation/door_big_02.png"); + ui->closeDoorAnimation->load(":/images/animation/door_big_09.png"); + ui->closeDoorAnimation->load(":/images/animation/door_big_08.png"); + ui->closeDoorAnimation->load(":/images/animation/door_big_07.png"); + ui->closeDoorAnimation->load(":/images/animation/door_big_06.png"); + ui->closeDoorAnimation->load(":/images/animation/door_big_05.png"); + ui->closeDoorAnimation->load(":/images/animation/door_big_04.png"); + ui->closeDoorAnimation->load(":/images/animation/door_big_03.png"); + ui->closeDoorAnimation->load(":/images/animation/door_big_02.png"); + ui->closeDoorAnimation->load(":/images/animation/door_big_01.png"); + ui->closeDoorAnimation->start(300); + ui->openDoorAnimation->load(":/images/animation/door_big_01.png"); + ui->openDoorAnimation->load(":/images/animation/door_big_02.png"); + ui->openDoorAnimation->load(":/images/animation/door_big_03.png"); + ui->openDoorAnimation->load(":/images/animation/door_big_04.png"); + ui->openDoorAnimation->load(":/images/animation/door_big_05.png"); + ui->openDoorAnimation->load(":/images/animation/door_big_06.png"); + ui->openDoorAnimation->load(":/images/animation/door_big_07.png"); + ui->openDoorAnimation->load(":/images/animation/door_big_08.png"); + ui->openDoorAnimation->load(":/images/animation/door_big_09.png"); ui->openDoorAnimation->start(300); } @@ -475,10 +486,20 @@ QPushButton:focus { background-image: url(%2); }"); ui->repeatButton->setChecked(repeat); - if (oven->paused() && !oven->cooldown() && oven->door()) - ui->upperStack->setCurrentIndex(1); + if (done) + { + if (oven->door()) + ui->upperStack->setCurrentIndex(0); // Clock + else + ui->upperStack->setCurrentIndex(2); // Open Door + } else - ui->upperStack->setCurrentIndex(0); + { + if (oven->paused() && !oven->cooldown() && oven->door()) + ui->upperStack->setCurrentIndex(1); // Close Door + else + ui->upperStack->setCurrentIndex(0); // Clock + } } void ManualCookWindow::showCurrentHumidity() @@ -510,7 +531,10 @@ void ManualCookWindow::onOvenUpdated(Oven *oven) updateView(); if (oven->interTempEnabled() && oven->currentInterTemp() >= oven->interTemp()) + { + done = true; stop(); + } if (repeat && !oven->cooking()) { @@ -530,10 +554,13 @@ void ManualCookWindow::onOvenUpdated(Oven *oven) || oven->time() == 0) { lastCheckedCooking = oven->cooking(); - emit done(); + done = true; } } + if (done && oven->door()) + done = false; + lastCheckedCooking = oven->cooking(); if (oven->paused() && oven->door()) @@ -568,6 +595,8 @@ void ManualCookWindow::start() if (oven->time() > 0) { + done = false; + SoundPlayer::playStart(); if (startCookingTimer.isActive()) diff --git a/app/gui/oven_control/manualcookwindow.h b/app/gui/oven_control/manualcookwindow.h index 8f26b21..fce1bd5 100644 --- a/app/gui/oven_control/manualcookwindow.h +++ b/app/gui/oven_control/manualcookwindow.h @@ -27,7 +27,6 @@ protected: signals: void cookStopRequested(); - void done(); public slots: @@ -135,6 +134,7 @@ private: QTimer monitor3; bool monitorTriggered; + bool done; ManualCookSetting repeatSetting; bool repeat; diff --git a/app/gui/oven_control/manualcookwindow.ui b/app/gui/oven_control/manualcookwindow.ui index bf00900..19e857f 100644 --- a/app/gui/oven_control/manualcookwindow.ui +++ b/app/gui/oven_control/manualcookwindow.ui @@ -136,7 +136,7 @@ height: 33px; #closeDoorWidget { background-image: url(:/images/clock/background.png); } - + 366 @@ -160,6 +160,36 @@ height: 33px; + + + #openDoorWidget { background-image: url(:/images/clock/background.png); } + + + + + 430 + 170 + 85 + 24 + + + + :/images/animation/open_door_arrow.png + + + + + + 366 + 20 + 251 + 292 + + + + openDoorAnimation + label_7 +