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; <property name="styleSheet"> <string notr="true">#closeDoorWidget { background-image: url(:/images/clock/background.png); }</string> </property> - <widget class="AnimatedImageBox" name="openDoorAnimation"> + <widget class="AnimatedImageBox" name="closeDoorAnimation"> <property name="geometry"> <rect> <x>366</x> @@ -160,6 +160,36 @@ height: 33px; </property> </widget> </widget> + <widget class="QWidget" name="openDoorWidget"> + <property name="styleSheet"> + <string notr="true">#openDoorWidget { background-image: url(:/images/clock/background.png); }</string> + </property> + <widget class="QLabel" name="label_7"> + <property name="geometry"> + <rect> + <x>430</x> + <y>170</y> + <width>85</width> + <height>24</height> + </rect> + </property> + <property name="pixmap"> + <pixmap resource="resources.qrc">:/images/animation/open_door_arrow.png</pixmap> + </property> + </widget> + <widget class="AnimatedImageBox" name="openDoorAnimation"> + <property name="geometry"> + <rect> + <x>366</x> + <y>20</y> + <width>251</width> + <height>292</height> + </rect> + </property> + </widget> + <zorder>openDoorAnimation</zorder> + <zorder>label_7</zorder> + </widget> </widget> <widget class="QPushButton" name="combiButton"> <property name="geometry">