From e1a76d3eb34d7fb1e935268f37bbc1168fac8d0d Mon Sep 17 00:00:00 2001 From: victor Date: Tue, 22 Jan 2019 17:28:32 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B3=A0=EA=B0=9D=20=EC=9A=94=EC=B2=AD=20?= =?UTF-8?q?=EC=82=AC=ED=95=AD=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 세척 상태 초기화 기능 추가 - 동파 방지 기능 추가 (설정 화면에서 실행하도록 연결해야 함) - 세척 유지/관리 관련 값 변경 - 버너 시험 시 팬도 같이 동작하도록 변경 - 도어 스위치 ON/OFF 표시를 반대로 변경 - 연소 가스 동작 최대 시간 변경 (1분 -> 2분) - 내부 세척 밸브 버튼이 현재 상태에 따라 변하지 않는 문제 수정 --- app/gui/oven_control/.gitignore | 1 + app/gui/oven_control/adjustmentwindow.cpp | 7 + app/gui/oven_control/adjustmentwindow.h | 2 + app/gui/oven_control/adjustmentwindow.ui | 47 +++- app/gui/oven_control/burnertestwindow.cpp | 13 ++ app/gui/oven_control/dirtylevel.cpp | 28 +-- app/gui/oven_control/flushwaterwindow.cpp | 63 ++++++ app/gui/oven_control/flushwaterwindow.h | 28 +++ app/gui/oven_control/flushwaterwindow.ui | 321 +++++++++++++++++++++++++++ app/gui/oven_control/gastestwindow.cpp | 2 +- app/gui/oven_control/notipopupdlg.cpp | 3 +- app/gui/oven_control/notipopupdlg.h | 2 +- app/gui/oven_control/oven_control.pro | 9 +- app/gui/oven_control/realtimepartswindow.cpp | 4 +- app/gui/oven_control/valvetestwindow.cpp | 5 + 15 files changed, 511 insertions(+), 24 deletions(-) create mode 100644 app/gui/oven_control/flushwaterwindow.cpp create mode 100644 app/gui/oven_control/flushwaterwindow.h create mode 100644 app/gui/oven_control/flushwaterwindow.ui diff --git a/app/gui/oven_control/.gitignore b/app/gui/oven_control/.gitignore index 432b0ad..1aa5dfb 100644 --- a/app/gui/oven_control/.gitignore +++ b/app/gui/oven_control/.gitignore @@ -1,2 +1,3 @@ *.pro.user *.autosave +*.pro.user.* diff --git a/app/gui/oven_control/adjustmentwindow.cpp b/app/gui/oven_control/adjustmentwindow.cpp index afcbec3..116f27e 100644 --- a/app/gui/oven_control/adjustmentwindow.cpp +++ b/app/gui/oven_control/adjustmentwindow.cpp @@ -5,6 +5,7 @@ #include "soundplayer.h" #include "notipopupdlg.h" #include "touchtestwindow.h" +#include "dirtylevel.h" AdjustmentWindow::AdjustmentWindow(QWidget *parent) : QMainWindow(parent), @@ -145,3 +146,9 @@ void AdjustmentWindow::on_btnAdjust_LCD_clicked() wnd->show(); wnd->raise(); } + +void AdjustmentWindow::on_btnClearWashData_clicked() +{ + DirtyLevel::setCookingTime(0); + DirtyLevel::setCookingCount(0); +} diff --git a/app/gui/oven_control/adjustmentwindow.h b/app/gui/oven_control/adjustmentwindow.h index 0c9bc19..15d7069 100644 --- a/app/gui/oven_control/adjustmentwindow.h +++ b/app/gui/oven_control/adjustmentwindow.h @@ -29,6 +29,8 @@ private slots: void on_btnAdjust_LCD_clicked(); + void on_btnClearWashData_clicked(); + protected: void keyReleaseEvent(QKeyEvent* event); void keyPressEvent(QKeyEvent* event); diff --git a/app/gui/oven_control/adjustmentwindow.ui b/app/gui/oven_control/adjustmentwindow.ui index 59e939b..abca4be 100644 --- a/app/gui/oven_control/adjustmentwindow.ui +++ b/app/gui/oven_control/adjustmentwindow.ui @@ -266,14 +266,14 @@ QPushButton { 100 606 28 - 151 + 228 - :/images/config/service/realtime_menu_line.png + :/images/config/service/oprationtime_menu_line.png @@ -318,6 +318,48 @@ QPushButton { + + + + 124 + 806 + 379 + 70 + + + + + 0 + 0 + + + + + Roboto + 10 + 75 + true + false + + + + QPushButton { border-image: url(:/images/config/service/089_set_window_all.png); } +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/config/service/089_set_window_all_ov.png); } +QPushButton { + text-align: right; + padding-right : 20px; +} + + + 세척 초기화 + + + + 32 + 32 + + + label upperStack label_15 @@ -325,6 +367,7 @@ QPushButton { gridLayoutWidget btnAdjust btnAdjust_LCD + btnClearWashData diff --git a/app/gui/oven_control/burnertestwindow.cpp b/app/gui/oven_control/burnertestwindow.cpp index 6a6b4b4..7eea6a4 100644 --- a/app/gui/oven_control/burnertestwindow.cpp +++ b/app/gui/oven_control/burnertestwindow.cpp @@ -180,6 +180,9 @@ void BurnerTestWindow::on_backButton_clicked() udp->turnOff(TG_BUNNER1_MANUAL); udp->turnOff(TG_BUNNER2_MANUAL); udp->turnOff(TG_BUNNER3_MANUAL); + udp->turnOff(TG_BUNNER1_FAN); + udp->turnOff(TG_BUNNER2_FAN); + udp->turnOff(TG_BUNNER3_FAN); udp->turnOff(TG_MANUAL_BURNER1); udp->turnOff(TG_MANUAL_BURNER2); udp->turnOff(TG_MANUAL_BURNER3); @@ -207,29 +210,39 @@ void BurnerTestWindow::onEncoderClicked(QWidget *clicked) void BurnerTestWindow::steamOn() { udp->turnOn(TG_BUNNER3_MANUAL); + udp->turnOn(TG_BUNNER3_FAN); } void BurnerTestWindow::steamOff() { udp->turnOff(TG_BUNNER3_MANUAL); + udp->turnOff(TG_BUNNER3_FAN); } void BurnerTestWindow::upperOn() { udp->turnOn(TG_BUNNER1_MANUAL); + udp->turnOn(TG_BUNNER1_FAN); + udp->turnOn(TG_BUNNER2_FAN); } void BurnerTestWindow::upperOff() { udp->turnOff(TG_BUNNER1_MANUAL); + udp->turnOff(TG_BUNNER1_FAN); + udp->turnOff(TG_BUNNER2_FAN); } void BurnerTestWindow::lowerOn() { udp->turnOn(TG_BUNNER2_MANUAL); + udp->turnOn(TG_BUNNER1_FAN); + udp->turnOn(TG_BUNNER2_FAN); } void BurnerTestWindow::lowerOff() { udp->turnOff(TG_BUNNER2_MANUAL); + udp->turnOff(TG_BUNNER1_FAN); + udp->turnOff(TG_BUNNER2_FAN); } diff --git a/app/gui/oven_control/dirtylevel.cpp b/app/gui/oven_control/dirtylevel.cpp index d4acfab..5e3bdf2 100644 --- a/app/gui/oven_control/dirtylevel.cpp +++ b/app/gui/oven_control/dirtylevel.cpp @@ -90,24 +90,24 @@ void DirtyLevel::wash(int type) switch (type) { case 1: - cookingTime = qMax(cookingTime - 2 * 3600, (qint64) 0); - decountState(1); + cookingTime = qMax(cookingTime - 4 * 3600, (qint64) 0); + decountState(2); break; case 2: - cookingTime = qMax(cookingTime - 3 * 3600, (qint64) 0); - decountState(1); + cookingTime = qMax(cookingTime - 6 * 3600, (qint64) 0); + decountState(2); break; case 3: - cookingTime = qMax(cookingTime - 4 * 3600, (qint64) 0); - decountState(2); + cookingTime = qMax(cookingTime - 8 * 3600, (qint64) 0); + decountState(3); break; case 4: - cookingTime = qMax(cookingTime - 10 * 3600, (qint64) 0); - decountState(2); + cookingTime = qMax(cookingTime - 20 * 3600, (qint64) 0); + decountState(3); break; case 5: - cookingTime = qMax(cookingTime - 2 * 3600, (qint64) 0); - decountState(1); + cookingTime = qMax(cookingTime - 4 * 3600, (qint64) 0); + decountState(2); break; } ::setCookingTime(cookingTime); @@ -119,13 +119,13 @@ int DirtyLevel::dirty() return 0; qint64 cookingTime = ::getCookingTime(); - if (cookingTime < 1 * 3600) + if (cookingTime < 2 * 3600) return 1; - if (cookingTime < 3 * 3600) + if (cookingTime < 6 * 3600) return 2; - if (cookingTime < 5 * 3600) + if (cookingTime < 15 * 3600) return 3; - if (cookingTime < 7 * 3600) + if (cookingTime < 30 * 3600) return 4; return 5; } diff --git a/app/gui/oven_control/flushwaterwindow.cpp b/app/gui/oven_control/flushwaterwindow.cpp new file mode 100644 index 0000000..48a68e3 --- /dev/null +++ b/app/gui/oven_control/flushwaterwindow.cpp @@ -0,0 +1,63 @@ +#include "flushwaterwindow.h" +#include "ui_flushwaterwindow.h" + +#include "udphandler.h" +#include "notipopupdlg.h" + +FlushWaterWindow::FlushWaterWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::FlushWaterWindow) +{ + ui->setupUi(this); + + ui->animation->load(":/images/animation/wash_01.png"); + ui->animation->load(":/images/animation/wash_02.png"); + ui->animation->load(":/images/animation/wash_03.png"); + ui->animation->load(":/images/animation/wash_04.png"); + ui->animation->show(); + ui->animation->start(300); + + + UdpHandler *udp = UdpHandler::getInstance(); + udp->set(TG_OVEN_MODE, 4); + udp->turnOn(TG_MANUAL_RELAY); + udp->turnOn(TG_DV); + udp->turnOn(TG_DP); + udp->turnOn(TG_INV); + udp->turnOff(TG_SSV); + + terminator = new QTimer(this); + connect(terminator, SIGNAL(timeout()), SLOT(waitUser())); + terminator->start(60 * 1000); + + QTimer *updater = new QTimer(this); + connect(updater, SIGNAL(timeout()), SLOT(updateGauge())); + updater->start(300); + + ui->progressGauge->setMaximum(terminator->interval()); + ui->progressGauge->setValue(0); +} + +FlushWaterWindow::~FlushWaterWindow() +{ + delete ui; +} + +void FlushWaterWindow::updateGauge() +{ + ui->progressGauge->setValue(terminator->interval() - terminator->remainingTime()); +} + +void FlushWaterWindow::waitUser() +{ + UdpHandler *udp = UdpHandler::getInstance(); + udp->turnOff(TG_DP); + udp->turnOff(TG_INV); + + NotiPopupDlg* notidlg = new NotiPopupDlg(this, tr("동파 방지 실행이 완료되었습니다. 전원을 OFF 해주십시오"), tr("취소")); + notidlg->exec(); + + deleteLater(); + + udp->turnOff(TG_MANUAL_RELAY); +} diff --git a/app/gui/oven_control/flushwaterwindow.h b/app/gui/oven_control/flushwaterwindow.h new file mode 100644 index 0000000..af1d441 --- /dev/null +++ b/app/gui/oven_control/flushwaterwindow.h @@ -0,0 +1,28 @@ +#ifndef FLUSHWATERWINDOW_H +#define FLUSHWATERWINDOW_H + +#include +#include + +namespace Ui { +class FlushWaterWindow; +} + +class FlushWaterWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit FlushWaterWindow(QWidget *parent = nullptr); + ~FlushWaterWindow(); + +private: + Ui::FlushWaterWindow *ui; + QTimer *terminator; + +private slots: + void updateGauge(); + void waitUser(); +}; + +#endif // FLUSHWATERWINDOW_H diff --git a/app/gui/oven_control/flushwaterwindow.ui b/app/gui/oven_control/flushwaterwindow.ui new file mode 100644 index 0000000..b002a6d --- /dev/null +++ b/app/gui/oven_control/flushwaterwindow.ui @@ -0,0 +1,321 @@ + + + FlushWaterWindow + + + + 0 + 0 + 900 + 1600 + + + + MainWindow + + + #centralwidget { background-image: url(:/images/background/original.png); } +#bottomBar { background-image: url(:/images/bottom_bar/background.png); } + +QSlider::groove { +background-image: url(:/images/slider/groove.png); +background-repeat: no-repeat; +background-position: center; +} + +QSlider::sub-page { +background-repeat: no-repeat; +background-position: left center; +margin: 0px 5px; +} + +QSlider[sliderColor="blue"]::sub-page { +background-image: url(:/images/slider/sub_blue.png); +} + +QSlider::handle { +background-image: url(:/images/slider/handle_big.png); +background-repeat: no-repeat; +background-position: center; +width: 23px; +height: 33px; +} + +QPushButton[style="type"] { +background-repeat: no-repeat; +background-position: center; +background-clip: border; +background-origin: border; +margin-bottom: 50px; + +border-top: 140px; +border-bottom: -50px; +border-style: hidden; +color: white; +font-size: 25px; +} + +QPushButton[style="icon"] { +background-image: url(:/images/slider_icon/background.png); +border: none; +} + + + + + + 340 + 460 + 255 + 427 + + + + + + + + + + 0 + 0 + 900 + 426 + + + + #upperContainer { background-image: url(:/images/clock/background.png); } + + + + + 249 + 300 + 532 + 58 + + + + + + true + + + + 0 + 0 + 900 + 88 + + + + + + + + + 255 + 255 + 255 + + + + + + + + + 255 + 255 + 255 + + + + + + + + + 123 + 123 + 123 + + + + + + + + + Roboto + 13 + 75 + true + + + + 동파 방지 실행 중입니다 + + + Qt::AlignCenter + + + + + true + + + + 0 + 88 + 900 + 88 + + + + + + + + + 255 + 255 + 255 + + + + + + + + + 255 + 255 + 255 + + + + + + + + + 123 + 123 + 123 + + + + + + + + + Roboto + 13 + + + + 완료될 때까지 문을 열지 마세요. +동파 방지 기능을 실행 중입니다. + + + Qt::AlignCenter + + + + + + 0 + 88 + 900 + 1 + + + + Qt::Horizontal + + + + + true + + + + 119 + 300 + 130 + 58 + + + + + + + + + 255 + 255 + 255 + + + + + + + + + 255 + 255 + 255 + + + + + + + + + 123 + 123 + 123 + + + + + + + + + Roboto + 13 + 75 + true + + + + 실행 중 + + + Qt::AlignCenter + + + + + + + + WashStepGauge + QWidget +
washstepgauge.h
+ 1 +
+ + AnimatedImageBox + QLabel +
animatedimagebox.h
+
+
+ + +
diff --git a/app/gui/oven_control/gastestwindow.cpp b/app/gui/oven_control/gastestwindow.cpp index 60cf980..af741e5 100644 --- a/app/gui/oven_control/gastestwindow.cpp +++ b/app/gui/oven_control/gastestwindow.cpp @@ -33,7 +33,7 @@ GasTestWindow::GasTestWindow(Target target, QWidget *parent) : udp->set(TG_OVEN_MODE, 4); connect(udp, SIGNAL(changed()), this, SLOT(onDataChanged())); - stopTimer.setInterval(60 * 1000); + stopTimer.setInterval(120 * 1000); connect(&stopTimer, SIGNAL(timeout()), SLOT(stop())); foreach (QPushButton *button, findChildren()) diff --git a/app/gui/oven_control/notipopupdlg.cpp b/app/gui/oven_control/notipopupdlg.cpp index ed296f4..2a80ecb 100644 --- a/app/gui/oven_control/notipopupdlg.cpp +++ b/app/gui/oven_control/notipopupdlg.cpp @@ -5,7 +5,7 @@ #include "soundplayer.h" -NotiPopupDlg::NotiPopupDlg(QWidget *parent, QString strDesc) : +NotiPopupDlg::NotiPopupDlg(QWidget *parent, QString strDesc, QString strBtn) : QDialog(parent), ui(new Ui::NotiPopupDlg) { @@ -18,6 +18,7 @@ NotiPopupDlg::NotiPopupDlg(QWidget *parent, QString strDesc) : this->setFocus(); ui->ctrLbDesc->setText(strDesc); + ui->ctrBtnOk->setText(strBtn); foreach (QPushButton *button, findChildren()) connect(button, &QPushButton::pressed, SoundPlayer::playClick); diff --git a/app/gui/oven_control/notipopupdlg.h b/app/gui/oven_control/notipopupdlg.h index 4acb9f2..cfc2725 100644 --- a/app/gui/oven_control/notipopupdlg.h +++ b/app/gui/oven_control/notipopupdlg.h @@ -12,7 +12,7 @@ class NotiPopupDlg : public QDialog Q_OBJECT public: - explicit NotiPopupDlg(QWidget *parent = 0,QString strDesc=""); + explicit NotiPopupDlg(QWidget *parent = 0,QString strDesc="",QString strBtn=tr("확인")); ~NotiPopupDlg(); private slots: diff --git a/app/gui/oven_control/oven_control.pro b/app/gui/oven_control/oven_control.pro index 35d00e2..1ef22d3 100644 --- a/app/gui/oven_control/oven_control.pro +++ b/app/gui/oven_control/oven_control.pro @@ -145,7 +145,8 @@ SOURCES += main.cpp\ haccp.cpp \ canvas.cpp \ touchtestwindow.cpp \ - haccpdownloaddlg.cpp + haccpdownloaddlg.cpp \ + flushwaterwindow.cpp HEADERS += mainwindow.h \ @@ -281,7 +282,8 @@ HEADERS += mainwindow.h \ haccp.h \ canvas.h \ touchtestwindow.h \ - haccpdownloaddlg.h + haccpdownloaddlg.h \ + flushwaterwindow.h FORMS += mainwindow.ui \ manualcookwindow.ui \ @@ -367,7 +369,8 @@ FORMS += mainwindow.ui \ multicookmanualwindow.ui \ multicookautowindow.ui \ touchtestwindow.ui \ - haccpdownloaddlg.ui + haccpdownloaddlg.ui \ + flushwaterwindow.ui RESOURCES += \ resources.qrc diff --git a/app/gui/oven_control/realtimepartswindow.cpp b/app/gui/oven_control/realtimepartswindow.cpp index 0796232..2cdf3cf 100644 --- a/app/gui/oven_control/realtimepartswindow.cpp +++ b/app/gui/oven_control/realtimepartswindow.cpp @@ -107,8 +107,8 @@ void RealtimePartsWindow::reloadUi(void){ if(realdata.b.wsv_open) ui->m_ctrlLbListState_1_7->setText(tr("ON")); else ui->m_ctrlLbListState_1_7->setText(tr("OFF")); - if(realdata.b.door_open) ui->m_ctrlLbListState_1_8->setText(tr("ON")); - else ui->m_ctrlLbListState_1_8->setText(tr("OFF")); + if(realdata.b.door_open) ui->m_ctrlLbListState_1_8->setText(tr("OFF")); + else ui->m_ctrlLbListState_1_8->setText(tr("ON")); diff --git a/app/gui/oven_control/valvetestwindow.cpp b/app/gui/oven_control/valvetestwindow.cpp index 04de912..3ec929e 100644 --- a/app/gui/oven_control/valvetestwindow.cpp +++ b/app/gui/oven_control/valvetestwindow.cpp @@ -78,6 +78,11 @@ void ValveTestWindow::onDataChanged() else ui->steamPumpButton->setText("START"); + if (udp->inv()) + ui->innerCleanValveButton->setText("STOP"); + else + ui->innerCleanValveButton->setText("START"); + if (udp->qnv()) ui->quenchingValveButton->setText("STOP"); else -- 2.1.4