From 0fbf1932cd18beeac363f311fd3a49f1e731d2ce Mon Sep 17 00:00:00 2001 From: taehoon Date: Fri, 13 Dec 2019 17:30:25 +0900 Subject: [PATCH] V1.5.0.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 요청 사항 반영 - OFF 문자열 표시가 잘리는 문제 수정 - 쿨다운 팝업에서 조작할 때도 상태 변경 알림이 나오도록 수정 --- app/gui/oven_control/cooldownpopup.cpp | 7 ++--- app/gui/oven_control/define.h | 2 +- app/gui/oven_control/manualcookwindow.cpp | 50 +++++++++++++++---------------- app/gui/oven_control/manualcookwindow.ui | 4 +-- 4 files changed, 31 insertions(+), 32 deletions(-) diff --git a/app/gui/oven_control/cooldownpopup.cpp b/app/gui/oven_control/cooldownpopup.cpp index ffca7b8..897bda2 100644 --- a/app/gui/oven_control/cooldownpopup.cpp +++ b/app/gui/oven_control/cooldownpopup.cpp @@ -44,6 +44,8 @@ CooldownPopup::CooldownPopup(QWidget *parent, int target) : if (needCookStarting) oven->stopCooking(); + oven->setFan(expectingFanLevel); + connect(oven, SIGNAL(changed(Oven*)), SLOT(updateView())); cooldownStartTimer.setSingleShot(true); @@ -272,10 +274,7 @@ void CooldownPopup::on_fanButton_clicked() if (expectingFanLevel < oven->minFan()) expectingFanLevel = oven->maxFan(); - if (oven->cooldown()) - oven->setFan(expectingFanLevel); - else - updateView(); + oven->setFan(expectingFanLevel); if (cooldownStartTimer.isActive()) cooldownStartTimer.start(); diff --git a/app/gui/oven_control/define.h b/app/gui/oven_control/define.h index 68bded0..dc1f870 100644 --- a/app/gui/oven_control/define.h +++ b/app/gui/oven_control/define.h @@ -5,7 +5,7 @@ #define MAJOR_VER 1 #define MINOR_VER 5 -#define HOTFIX_VER 01 +#define HOTFIX_VER 02 // 0 for normal // 1 for premium diff --git a/app/gui/oven_control/manualcookwindow.cpp b/app/gui/oven_control/manualcookwindow.cpp index 990e7cb..87c8ea1 100644 --- a/app/gui/oven_control/manualcookwindow.cpp +++ b/app/gui/oven_control/manualcookwindow.cpp @@ -487,6 +487,31 @@ QPushButton:focus { background-image: url(%2); }"); int fan = oven->fan(); if (fan != lastViewFan) { + if (lastViewFan != -1) + { + switch (fan) + { + case 1: + showInfoText("1", ":/images/manual_button/fan_1.png"); + break; + case 2: + showInfoText("2", ":/images/manual_button/fan_2.png"); + break; + case 3: + showInfoText("3", ":/images/manual_button/fan_3.png"); + break; + case 4: + showInfoText("4", ":/images/manual_button/fan_4.png"); + break; + case 5: + showInfoText("5", ":/images/manual_button/fan_5.png"); + break; + default: + showInfoText("6", ":/images/manual_button/fan_6.png"); + break; + } + } + lastViewFan = fan; switch (fan) @@ -1034,31 +1059,6 @@ void ManualCookWindow::on_fanButton_clicked() fan = oven->minFan(); oven->setFan(fan); - - QString text = QString("%1").arg(fan); - QString icon; - switch (fan) - { - case 1: - icon = ":/images/manual_button/fan_1.png"; - break; - case 2: - icon = ":/images/manual_button/fan_2.png"; - break; - case 3: - icon = ":/images/manual_button/fan_3.png"; - break; - case 4: - icon = ":/images/manual_button/fan_4.png"; - break; - case 5: - icon = ":/images/manual_button/fan_5.png"; - break; - default: - break; - } - - showInfoText(text, icon); } void ManualCookWindow::on_preheatButton_clicked() diff --git a/app/gui/oven_control/manualcookwindow.ui b/app/gui/oven_control/manualcookwindow.ui index 8d43884..7a66f38 100644 --- a/app/gui/oven_control/manualcookwindow.ui +++ b/app/gui/oven_control/manualcookwindow.ui @@ -1322,10 +1322,10 @@ background-repeat: no-repeat; background-position: center center; border-radius: 40px; color: rgba(255, 255, 255, 255); -margin: 200px 300px; +margin: 200px 200px; - <img src=":/images/manual_button/fan_1.png"/><span>1</span> + <img src=":/images/manual_button/fan_1.png"/><span> OFF</span> Qt::AlignCenter -- 2.1.4