From 663943a3754cb52a8e54d841a077f07f4b9f51be Mon Sep 17 00:00:00 2001 From: byloveletter <byloveletter@falinux.com> Date: Fri, 2 Jun 2017 15:14:17 +0900 Subject: [PATCH] =?UTF-8?q?=EC=84=A4=EC=A0=95=20=EA=B8=B0=EB=8A=A5=20?= =?UTF-8?q?=EB=A7=88=EB=AC=B4=EB=A6=AC=20=EC=A7=84=ED=96=89=20=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - HACCP 데이터 다운로드 메뉴 추가 - 적재중, 요리중 시간 모니터링 설정 기능 추가 - IP 값 오기 디버깅 --- app/gui/oven_control/config.cpp | 14 + app/gui/oven_control/config.h | 2 +- .../config1digitsetandenablesetdlg.cpp | 51 ++ .../oven_control/config1digitsetandenablesetdlg.h | 42 ++ .../oven_control/config1digitsetandenablesetdlg.ui | 322 ++++++++++++ app/gui/oven_control/configdoormonitoring.cpp | 153 ++++++ app/gui/oven_control/configdoormonitoring.h | 38 ++ app/gui/oven_control/configdoormonitoring.ui | 538 +++++++++++++++++++++ app/gui/oven_control/configlanguagedlg.cpp | 40 ++ app/gui/oven_control/configlanguagedlg.h | 6 + app/gui/oven_control/configwindow.cpp | 10 + app/gui/oven_control/configwindow.h | 12 +- app/gui/oven_control/fileprocessdlg.cpp | 9 + app/gui/oven_control/fileprocessdlg.h | 1 + app/gui/oven_control/oven_control.pro | 12 +- 15 files changed, 1240 insertions(+), 10 deletions(-) create mode 100644 app/gui/oven_control/config1digitsetandenablesetdlg.cpp create mode 100644 app/gui/oven_control/config1digitsetandenablesetdlg.h create mode 100644 app/gui/oven_control/config1digitsetandenablesetdlg.ui create mode 100644 app/gui/oven_control/configdoormonitoring.cpp create mode 100644 app/gui/oven_control/configdoormonitoring.h create mode 100644 app/gui/oven_control/configdoormonitoring.ui diff --git a/app/gui/oven_control/config.cpp b/app/gui/oven_control/config.cpp index 4ae6b98..0392354 100644 --- a/app/gui/oven_control/config.cpp +++ b/app/gui/oven_control/config.cpp @@ -267,6 +267,7 @@ QString Config::getValueString(Define::ConfigType idx){ break; case config_ip: qstrTemp.sprintf("%3d.%3d.%3d.%3d", configlist.items.ip.d8.d8_0,configlist.items.ip.d8.d8_1,configlist.items.ip.d8.d8_2,configlist.items.ip.d8.d8_3); + break; case config_set_half_energy: if(configlist.items.set_half_energy.d32 >=2) configlist.items.set_half_energy.d32 = 0; qstrTemp = tr(on_off_menu[configlist.items.set_half_energy.d32]); @@ -276,6 +277,12 @@ QString Config::getValueString(Define::ConfigType idx){ qDebug() << "duty wash is "<<configlist.items.duty_wash.d32; qstrTemp = tr(active_on_off_menu[configlist.items.duty_wash.d32]); break; + case config_cooking_door_monitoring: + qstrTemp.sprintf(config_format[(uint32_t)idx],configlist.items.cooking_door_monitoring.d8.d8_0); + break; + case config_loading_door_monitoring: + qstrTemp.sprintf(config_format[(uint32_t)idx ], configlist.items.loading_door_monitoring.d8.d8_0); + break; default: qstrTemp = ""; break; @@ -414,6 +421,7 @@ void Config::execConfigWindow(QWidget *parent, Define::ConfigType idx){ case config_ip: dlg=new ConfigIpDlg(parent); break; + case config_haccp_data_download: case config_info_data_download: case config_service_data_download: case config_program_download: @@ -439,6 +447,9 @@ void Config::execConfigWindow(QWidget *parent, Define::ConfigType idx){ dlg->exec(); } return; + case config_program_initialize: + dlg = new YesNoPopupDlg(parent, tr("모든 프로그램을\r삭제하시겠습니까?")); + break; case config_set_half_energy: dlg = new ConfigHalfEnergyDlg(parent); break; @@ -461,6 +472,9 @@ void Config::execConfigWindow(QWidget *parent, Define::ConfigType idx){ soundConfigReset(); qDebug() << "Process Sound Config Reset"; } + else if(idx==config_program_initialize){ + qDebug() << "All Program Reset"; + } } else{ qDebug() << "rejected"; diff --git a/app/gui/oven_control/config.h b/app/gui/oven_control/config.h index 41d6765..1c51b2b 100644 --- a/app/gui/oven_control/config.h +++ b/app/gui/oven_control/config.h @@ -278,7 +278,7 @@ class Config : public QObject 0x00, 0x03, 0x00, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02,0x02, 0x02,0x02, 0x80, 0x80, 0x80, 0x02, 0x02, 0x80, 0x00, 0x00,0x00, - 0x80, 0x00, 0x00, + 0x80, 0x80, 0x80, 0x7F,0x7F,0x7F,0x7F,0x7F,0x7F }; diff --git a/app/gui/oven_control/config1digitsetandenablesetdlg.cpp b/app/gui/oven_control/config1digitsetandenablesetdlg.cpp new file mode 100644 index 0000000..96e3ff6 --- /dev/null +++ b/app/gui/oven_control/config1digitsetandenablesetdlg.cpp @@ -0,0 +1,51 @@ +#include "config1digitsetandenablesetdlg.h" +#include "ui_config1digitsetandenablesetdlg.h" +#include "soundplayer.h" + +Config1DigitSetAndEnableSetDlg::Config1DigitSetAndEnableSetDlg(QWidget *parent, uint16_t val) : + QDialog(parent), + ui(new Ui::Config1DigitSetAndEnableSetDlg) +{ + ui->setupUi(this); + this->setWindowFlags(Qt::FramelessWindowHint); + + foreach (QPushButton *button, findChildren<QPushButton *>()) + connect(button, &QPushButton::pressed, SoundPlayer::playClick); + + if(val < MIN_MONITORING_VALUE) val = MIN_MONITORING_VALUE; + + ui->ctrSpBxValue->setMaximum(MAX_MONITORING_VALUE); + ui->ctrSpBxValue->setMinimum(MIN_MONITORING_VALUE); + ui->ctrSpBxValue->setValue(val); + + ui->ctrSpBxValue->installEventFilter(this); +} + +Config1DigitSetAndEnableSetDlg::~Config1DigitSetAndEnableSetDlg() +{ + delete ui; +} + +void Config1DigitSetAndEnableSetDlg::on_ctrBtnOk_clicked() +{ + m_nResult = result_ok; + close(); +} + + + +void Config1DigitSetAndEnableSetDlg::on_ctrBtnOk_2_clicked() +{ + m_nResult = result_disable; + close(); +} + +void Config1DigitSetAndEnableSetDlg::on_ctrBtnCancel_clicked() +{ + m_nResult = result_rejected; + close(); +} + +int Config1DigitSetAndEnableSetDlg::getValue(){ + return ui->ctrSpBxValue->value(); +} diff --git a/app/gui/oven_control/config1digitsetandenablesetdlg.h b/app/gui/oven_control/config1digitsetandenablesetdlg.h new file mode 100644 index 0000000..665bb01 --- /dev/null +++ b/app/gui/oven_control/config1digitsetandenablesetdlg.h @@ -0,0 +1,42 @@ +#ifndef CONFIG1DIGITSETANDENABLESETDLG_H +#define CONFIG1DIGITSETANDENABLESETDLG_H + +#include <QDialog> + +enum custom_result{ + result_rejected=0, + result_disable, + result_ok +}; + +#define MAX_MONITORING_VALUE 180 +#define MIN_MONITORING_VALUE 5 + +namespace Ui { +class Config1DigitSetAndEnableSetDlg; +} + +class Config1DigitSetAndEnableSetDlg : public QDialog +{ + Q_OBJECT + +public: + explicit Config1DigitSetAndEnableSetDlg(QWidget *parent = 0, uint16_t val = 5); + ~Config1DigitSetAndEnableSetDlg(); + + custom_result getResult(){return m_nResult;}; + int getValue(); + +private slots: + void on_ctrBtnOk_clicked(); + + void on_ctrBtnOk_2_clicked(); + + void on_ctrBtnCancel_clicked(); + +private: + Ui::Config1DigitSetAndEnableSetDlg *ui; + custom_result m_nResult; +}; + +#endif // CONFIG1DIGITSETANDENABLESETDLG_H diff --git a/app/gui/oven_control/config1digitsetandenablesetdlg.ui b/app/gui/oven_control/config1digitsetandenablesetdlg.ui new file mode 100644 index 0000000..23f1d2e --- /dev/null +++ b/app/gui/oven_control/config1digitsetandenablesetdlg.ui @@ -0,0 +1,322 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>Config1DigitSetAndEnableSetDlg</class> + <widget class="QDialog" name="Config1DigitSetAndEnableSetDlg"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>900</width> + <height>1600</height> + </rect> + </property> + <property name="windowTitle"> + <string>Dialog</string> + </property> + <property name="styleSheet"> + <string notr="true">#ConfigDateTimeDlg{ + /*background-color : transparent;*/ +} + +#centralwidget{ + background-image : url(:/images/background/popup/913.png); +} + +QLabel { + color : white; +} +QLineEdit{ + background-color : transparent; + color : white; +} + +QSpinBox{ + background-color : transparent; + color : white; +} + +QPushButton{ + border-color : transparent; + background-color : transparent; + color : white; +} +QPushButton::pressed, QPushButton::focus{ + color : yellow; +}</string> + </property> + <widget class="QWidget" name="centralwidget" native="true"> + <property name="geometry"> + <rect> + <x>0</x> + <y>425</y> + <width>900</width> + <height>1025</height> + </rect> + </property> + <widget class="QWidget" name="verticalLayoutWidget"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>901</width> + <height>441</height> + </rect> + </property> + <layout class="QVBoxLayout" name="verticalLayout" stretch="10,0,10,4"> + <property name="spacing"> + <number>0</number> + </property> + <property name="sizeConstraint"> + <enum>QLayout::SetDefaultConstraint</enum> + </property> + <item> + <widget class="QLabel" name="ctrLbTitle"> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>94</height> + </size> + </property> + <property name="font"> + <font> + <family>나눔고딕</family> + <pointsize>18</pointsize> + <weight>75</weight> + <bold>true</bold> + </font> + </property> + <property name="styleSheet"> + <string notr="true">color : white;</string> + </property> + <property name="text"> + <string>단계 설정값 입력</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <widget class="Line" name="line"> + <property name="styleSheet"> + <string notr="true">color: rgb(255, 255, 255);</string> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item> + <layout class="QGridLayout" name="gridLayout_2" columnstretch="94,100"> + <property name="leftMargin"> + <number>20</number> + </property> + <property name="topMargin"> + <number>35</number> + </property> + <property name="rightMargin"> + <number>20</number> + </property> + <property name="horizontalSpacing"> + <number>13</number> + </property> + <property name="verticalSpacing"> + <number>0</number> + </property> + <item row="0" column="1"> + <widget class="QLabel" name="label_2"> + <property name="font"> + <font> + <family>나눔고딕</family> + <pointsize>21</pointsize> + <weight>75</weight> + <bold>true</bold> + </font> + </property> + <property name="text"> + <string>s</string> + </property> + <property name="alignment"> + <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set> + </property> + </widget> + </item> + <item row="0" column="0"> + <widget class="QSpinBox" name="ctrSpBxValue"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>80</height> + </size> + </property> + <property name="font"> + <font> + <family>나눔고딕</family> + <pointsize>21</pointsize> + <weight>75</weight> + <bold>true</bold> + <underline>true</underline> + </font> + </property> + <property name="focusPolicy"> + <enum>Qt::StrongFocus</enum> + </property> + <property name="frame"> + <bool>false</bool> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + <property name="buttonSymbols"> + <enum>QAbstractSpinBox::NoButtons</enum> + </property> + <property name="minimum"> + <number>0</number> + </property> + <property name="maximum"> + <number>2100</number> + </property> + <property name="value"> + <number>5</number> + </property> + </widget> + </item> + <item row="1" column="0" colspan="2"> + <widget class="QLabel" name="ctrLbRange"> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>50</height> + </size> + </property> + <property name="font"> + <font> + <family>나눔고딕</family> + <pointsize>13</pointsize> + <weight>50</weight> + <bold>false</bold> + </font> + </property> + <property name="text"> + <string>(05 ~ 180 s 사이의 설정값 입력)</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QGridLayout" name="gridLayout" columnstretch="1,1,1,1,1,1"> + <property name="leftMargin"> + <number>10</number> + </property> + <property name="rightMargin"> + <number>10</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item row="0" column="5"> + <widget class="QPushButton" name="ctrBtnCancel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="font"> + <font> + <family>나눔고딕</family> + <pointsize>12</pointsize> + <underline>true</underline> + </font> + </property> + <property name="text"> + <string>취소</string> + </property> + <property name="flat"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="0" column="3"> + <widget class="QPushButton" name="ctrBtnOk"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="font"> + <font> + <family>나눔고딕</family> + <pointsize>12</pointsize> + <underline>true</underline> + </font> + </property> + <property name="text"> + <string>확인</string> + </property> + <property name="flat"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="0" column="4"> + <widget class="QPushButton" name="ctrBtnOk_2"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="font"> + <font> + <family>나눔고딕</family> + <pointsize>12</pointsize> + <underline>true</underline> + </font> + </property> + <property name="text"> + <string>비활성</string> + </property> + <property name="flat"> + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + <widget class="KeyboardWidget" name="keyboardwidget" native="true"> + <property name="geometry"> + <rect> + <x>0</x> + <y>425</y> + <width>900</width> + <height>600</height> + </rect> + </property> + </widget> + </widget> + </widget> + <customwidgets> + <customwidget> + <class>KeyboardWidget</class> + <extends>QWidget</extends> + <header>keyboardwidget.h</header> + <container>1</container> + </customwidget> + </customwidgets> + <resources/> + <connections/> +</ui> diff --git a/app/gui/oven_control/configdoormonitoring.cpp b/app/gui/oven_control/configdoormonitoring.cpp new file mode 100644 index 0000000..50efedf --- /dev/null +++ b/app/gui/oven_control/configdoormonitoring.cpp @@ -0,0 +1,153 @@ +#include <QDebug> +#include "configdoormonitoring.h" +#include "ui_configdoormonitoring.h" +#include "config1digitsetandenablesetdlg.h" + + + +ConfigDoorMonitoring::ConfigDoorMonitoring(QWidget *parent, ConfigType idx) : + QMainWindow(parent), + ui(new Ui::ConfigDoorMonitoring) +{ + ui->setupUi(this); + ui->clockContainer->setParent(ui->upperStack); + setAttribute(Qt::WA_DeleteOnClose); + m_nCfgType = idx; + + if(m_nCfgType == config_cooking_door_monitoring){ + ui->ctrLbTitle->setText(tr("전문가설정 > 조리중 문열림 시간 모니터링")); + } + + Config *cfg = Config::getInstance(); + config_item item; + item = cfg->getConfigValue(m_nCfgType); + m_nSetStage = item.d8.d8_0; + m_n1Stage = item.d8.d8_1; + m_n2Stage = item.d8.d8_2; + m_n3Stage = item.d8.d8_3; + + m_pSignalMapper = new QSignalMapper(this); + m_pSignalMapper->setMapping(ui->ctrBtn_1,1); + m_pSignalMapper->setMapping(ui->ctrBtn_2,2); + m_pSignalMapper->setMapping(ui->ctrBtn_3,3); + + connect(ui->ctrBtn_1, SIGNAL(clicked(bool)),m_pSignalMapper, SLOT(map())); + connect(ui->ctrBtn_2, SIGNAL(clicked(bool)),m_pSignalMapper, SLOT(map())); + connect(ui->ctrBtn_3, SIGNAL(clicked(bool)),m_pSignalMapper, SLOT(map())); + connect(m_pSignalMapper, SIGNAL(mapped(int)), this, SLOT(onBtnClicked(int))); + + reloadUi(); +} + +ConfigDoorMonitoring::~ConfigDoorMonitoring() +{ + delete ui; +} + +void ConfigDoorMonitoring::on_backButton_clicked() +{ + Config* cfg = Config::getInstance(); + config_item item; + item.d8.d8_0 = m_nSetStage; + item.d8.d8_1 = m_n1Stage; + item.d8.d8_2 = m_n2Stage; + item.d8.d8_3 = m_n3Stage; + cfg->setConfigValue(m_nCfgType, item); + close(); +} + + +void ConfigDoorMonitoring::reloadUi(){ + switch(m_nSetStage){ + case 0: + m_n1Stage = 0; + m_n2Stage = 0; + m_n3Stage = 0; + ui->ctrBtn_1->setEnabled(true); + ui->ctrBtn_2->setEnabled(false); + ui->ctrBtn_3->setEnabled(false); + ui->ctrLbSet_1->setText("-"); + ui->ctrLbSet_2->setText("-"); + ui->ctrLbSet_3->setText("-"); + qDebug() << "0 stage"; + break; + case 1: + m_n2Stage = 0; + m_n3Stage = 0; + ui->ctrBtn_1->setEnabled(true); + ui->ctrBtn_2->setEnabled(true); + ui->ctrBtn_3->setEnabled(false); + ui->ctrLbSet_1->setText(QString("%1 s").arg(m_n1Stage)); + ui->ctrLbSet_2->setText("-"); + ui->ctrLbSet_3->setText("-"); + break; + case 2: + m_n3Stage = 0; + ui->ctrBtn_1->setEnabled(true); + ui->ctrBtn_2->setEnabled(true); + ui->ctrBtn_3->setEnabled(true); + ui->ctrLbSet_1->setText(QString("%1 s").arg(m_n1Stage)); + ui->ctrLbSet_2->setText(QString("%1 s").arg(m_n2Stage)); + ui->ctrLbSet_3->setText("-"); + break; + case 3: + ui->ctrBtn_1->setEnabled(true); + ui->ctrBtn_2->setEnabled(true); + ui->ctrBtn_3->setEnabled(true); + ui->ctrLbSet_1->setText(QString("%1 s").arg(m_n1Stage)); + ui->ctrLbSet_2->setText(QString("%1 s").arg(m_n2Stage)); + ui->ctrLbSet_3->setText(QString("%1 s").arg(m_n3Stage)); + break; + } +} + + +void ConfigDoorMonitoring::onBtnClicked(const int sel){ + Config1DigitSetAndEnableSetDlg* dlg; + switch(sel){ + case 1: + dlg = new Config1DigitSetAndEnableSetDlg(this, m_n1Stage); + dlg->exec(); + if(dlg->getResult() == result_disable){ + m_nSetStage = 0; + m_n1Stage = 0; + } + else if(dlg->getResult() == result_ok){ + m_nSetStage = 1; + m_n1Stage = dlg->getValue(); + } + dlg->deleteLater(); + reloadUi(); + break; + case 2: + dlg = new Config1DigitSetAndEnableSetDlg(this, m_n2Stage); + dlg->exec(); + if(dlg->getResult() == result_disable){ + m_nSetStage = 1; + m_n2Stage = 0; + } + else if(dlg->getResult() == result_ok){ + m_nSetStage = 2; + m_n2Stage = dlg->getValue(); + } + dlg->deleteLater(); + reloadUi(); + break; + case 3: + dlg = new Config1DigitSetAndEnableSetDlg(this, m_n3Stage); + dlg->exec(); + if(dlg->getResult() == result_disable){ + m_nSetStage = 2; + m_n3Stage = 0; + } + else if(dlg->getResult() == result_ok){ + m_nSetStage = 3; + m_n3Stage = dlg->getValue(); + } + dlg->deleteLater(); + reloadUi(); + break; + default: + break; + } +} diff --git a/app/gui/oven_control/configdoormonitoring.h b/app/gui/oven_control/configdoormonitoring.h new file mode 100644 index 0000000..0c05798 --- /dev/null +++ b/app/gui/oven_control/configdoormonitoring.h @@ -0,0 +1,38 @@ +#ifndef CONFIGDOORMONITORING_H +#define CONFIGDOORMONITORING_H + +#include <QMainWindow> +#include <QSignalMapper> +#include "config.h" + + +using namespace Define; + +namespace Ui { +class ConfigDoorMonitoring; +} + +class ConfigDoorMonitoring : public QMainWindow +{ + Q_OBJECT + + void reloadUi(); +public: + explicit ConfigDoorMonitoring(QWidget *parent = 0, ConfigType idx=config_invalid); + ~ConfigDoorMonitoring(); + +private slots: + void on_backButton_clicked(); + void onBtnClicked(const int sel); + +private: + Ui::ConfigDoorMonitoring *ui; + ConfigType m_nCfgType; + int m_nSetStage; + int m_n1Stage; + int m_n2Stage; + int m_n3Stage; + QSignalMapper* m_pSignalMapper; +}; + +#endif // CONFIGDOORMONITORING_H diff --git a/app/gui/oven_control/configdoormonitoring.ui b/app/gui/oven_control/configdoormonitoring.ui new file mode 100644 index 0000000..75889c7 --- /dev/null +++ b/app/gui/oven_control/configdoormonitoring.ui @@ -0,0 +1,538 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>ConfigDoorMonitoring</class> + <widget class="QMainWindow" name="ConfigDoorMonitoring"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>900</width> + <height>1600</height> + </rect> + </property> + <property name="windowTitle"> + <string>MainWindow</string> + </property> + <property name="styleSheet"> + <string notr="true">#centralwidget { background-image: url(:/images/background/config_service.png); } +#bottomBar { background-image: url(:/images/bottom_bar/background.png); } +#midwidget { background-image: url(:/images/config/service/realtime_parts_bgnd.png); }</string> + </property> + <widget class="QWidget" name="centralwidget"> + <property name="styleSheet"> + <string notr="true"/> + </property> + <widget class="QStackedWidget" name="upperStack"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>900</width> + <height>426</height> + </rect> + </property> + <widget class="QWidget" name="clockContainer"> + <property name="styleSheet"> + <string notr="true">#clockContainer { background-image: url(:/images/clock/background.png); }</string> + </property> + <widget class="Clock" name="clock" native="true"> + <property name="geometry"> + <rect> + <x>272</x> + <y>36</y> + <width>356</width> + <height>355</height> + </rect> + </property> + </widget> + <widget class="WashWarnIcon" name="label"> + <property name="geometry"> + <rect> + <x>800</x> + <y>320</y> + <width>80</width> + <height>84</height> + </rect> + </property> + </widget> + <zorder>clock</zorder> + <zorder>label</zorder> + <zorder>gridLayoutWidget</zorder> + </widget> + <widget class="QWidget" name="page_2"/> + </widget> + <widget class="QLabel" name="ctrLbTitle"> + <property name="geometry"> + <rect> + <x>55</x> + <y>426</y> + <width>1500</width> + <height>84</height> + </rect> + </property> + <property name="font"> + <font> + <family>Malgun Gothic</family> + <pointsize>11</pointsize> + </font> + </property> + <property name="styleSheet"> + <string notr="true">color: rgb(255, 255, 255);</string> + </property> + <property name="text"> + <string>전문가 설정 > 적재 중 문열림 시간 모니터</string> + </property> + </widget> + <widget class="QWidget" name="bottomBar" native="true"> + <property name="geometry"> + <rect> + <x>0</x> + <y>1450</y> + <width>900</width> + <height>150</height> + </rect> + </property> + <widget class="QPushButton" name="backButton"> + <property name="geometry"> + <rect> + <x>343</x> + <y>26</y> + <width>97</width> + <height>97</height> + </rect> + </property> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="styleSheet"> + <string notr="true">QPushButton { border-image: url(:/images/bottom_bar/back.png); } +QPushButton:pressed { border-image: url(:/images/bottom_bar/back_ov.png); }</string> + </property> + <property name="text"> + <string/> + </property> + </widget> + <widget class="QPushButton" name="helpButton"> + <property name="geometry"> + <rect> + <x>457</x> + <y>26</y> + <width>97</width> + <height>97</height> + </rect> + </property> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="styleSheet"> + <string notr="true">QPushButton { border-image: url(:/images/bottom_bar/help.png); } +QPushButton:pressed { border-image: url(:/images/bottom_bar/help_ov.png); }</string> + </property> + <property name="text"> + <string/> + </property> + </widget> + </widget> + <widget class="QWidget" name="midWidget" native="true"> + <property name="geometry"> + <rect> + <x>0</x> + <y>510</y> + <width>901</width> + <height>931</height> + </rect> + </property> + <property name="styleSheet"> + <string notr="true">QLabel { + color : white; +}</string> + </property> + <widget class="QWidget" name="gridLayoutWidget"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>901</width> + <height>941</height> + </rect> + </property> + <layout class="QGridLayout" name="gridLayout" rowstretch="2,0,2,0,2,0,2,21" columnstretch="1,0,7,0,1,0,2"> + <property name="leftMargin"> + <number>20</number> + </property> + <property name="topMargin"> + <number>20</number> + </property> + <property name="rightMargin"> + <number>20</number> + </property> + <property name="bottomMargin"> + <number>20</number> + </property> + <property name="spacing"> + <number>10</number> + </property> + <item row="4" column="2"> + <widget class="QLabel" name="label_9"> + <property name="font"> + <font> + <family>나눔고딕</family> + <pointsize>12</pointsize> + </font> + </property> + <property name="text"> + <string>문을 닫고 다이얼을 사용하여 경고가 + 울리거나 꺼질 때까지 시간</string> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="label_6"> + <property name="font"> + <font> + <family>나눔고딕</family> + <pointsize>10</pointsize> + </font> + </property> + <property name="text"> + <string>1단계</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item row="0" column="2"> + <widget class="QLabel" name="label_3"> + <property name="font"> + <font> + <family>나눔고딕</family> + </font> + </property> + <property name="text"> + <string>항목</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item row="2" column="2"> + <widget class="QLabel" name="label_7"> + <property name="font"> + <font> + <family>나눔고딕</family> + <pointsize>12</pointsize> + </font> + </property> + <property name="text"> + <string>문을 닫고 다이얼을 사용하여 경고가 + 울리거나 꺼질 때까지 시간</string> + </property> + </widget> + </item> + <item row="0" column="0"> + <widget class="QLabel" name="label_2"> + <property name="font"> + <font> + <family>나눔고딕</family> + </font> + </property> + <property name="text"> + <string>구분</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item row="2" column="4"> + <widget class="QLabel" name="ctrLbSet_1"> + <property name="font"> + <font> + <family>나눔고딕</family> + <pointsize>10</pointsize> + </font> + </property> + <property name="text"> + <string>180 s</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item row="2" column="6"> + <widget class="QPushButton" name="ctrBtn_1"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="font"> + <font> + <family>나눔고딕</family> + </font> + </property> + <property name="text"> + <string>설정</string> + </property> + </widget> + </item> + <item row="4" column="4"> + <widget class="QLabel" name="ctrLbSet_2"> + <property name="font"> + <font> + <family>나눔고딕</family> + <pointsize>10</pointsize> + </font> + </property> + <property name="text"> + <string>180 s</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item row="0" column="4"> + <widget class="QLabel" name="label_4"> + <property name="font"> + <font> + <family>나눔고딕</family> + </font> + </property> + <property name="text"> + <string>설정값</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item row="6" column="0"> + <widget class="QLabel" name="label_10"> + <property name="font"> + <font> + <family>나눔고딕</family> + <pointsize>10</pointsize> + </font> + </property> + <property name="text"> + <string>3단계</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item row="6" column="2"> + <widget class="QLabel" name="label_11"> + <property name="font"> + <font> + <family>나눔고딕</family> + <pointsize>12</pointsize> + </font> + </property> + <property name="text"> + <string>문을 닫고 다이얼을 사용하여 경고가 + 울리거나 꺼질 때까지 시간</string> + </property> + </widget> + </item> + <item row="4" column="6"> + <widget class="QPushButton" name="ctrBtn_2"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="font"> + <font> + <family>나눔고딕</family> + </font> + </property> + <property name="text"> + <string>설정</string> + </property> + </widget> + </item> + <item row="6" column="4"> + <widget class="QLabel" name="ctrLbSet_3"> + <property name="font"> + <font> + <family>나눔고딕</family> + </font> + </property> + <property name="text"> + <string>180 s</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item row="6" column="6"> + <widget class="QPushButton" name="ctrBtn_3"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="font"> + <font> + <family>나눔고딕</family> + </font> + </property> + <property name="text"> + <string>설정</string> + </property> + </widget> + </item> + <item row="7" column="0"> + <widget class="QLabel" name="label_12"> + <property name="font"> + <font> + <family>나눔고딕</family> + </font> + </property> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item row="5" column="0" colspan="7"> + <widget class="Line" name="hline_5"> + <property name="font"> + <font> + <family>나눔고딕</family> + </font> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="3" column="0" colspan="7"> + <widget class="Line" name="hline_2"> + <property name="font"> + <font> + <family>나눔고딕</family> + </font> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="0" column="6"> + <widget class="QLabel" name="label_5"> + <property name="font"> + <font> + <family>나눔고딕</family> + </font> + </property> + <property name="text"> + <string>설정</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item row="1" column="0" colspan="7"> + <widget class="Line" name="hline"> + <property name="font"> + <font> + <family>나눔고딕</family> + </font> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="4" column="0"> + <widget class="QLabel" name="label_8"> + <property name="font"> + <font> + <family>나눔고딕</family> + <pointsize>10</pointsize> + </font> + </property> + <property name="text"> + <string>2단계</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item row="0" column="1" rowspan="7"> + <widget class="Line" name="vline_1"> + <property name="font"> + <font> + <family>나눔고딕</family> + </font> + </property> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + </widget> + </item> + <item row="0" column="3" rowspan="7"> + <widget class="Line" name="vline_10"> + <property name="font"> + <font> + <family>나눔고딕</family> + </font> + </property> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + </widget> + </item> + <item row="0" column="5" rowspan="7"> + <widget class="Line" name="vline_11"> + <property name="font"> + <font> + <family>나눔고딕</family> + </font> + </property> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + </widget> + </item> + </layout> + </widget> + <zorder>ctrLbTitle</zorder> + <zorder>gridLayoutWidget</zorder> + </widget> + </widget> + </widget> + <customwidgets> + <customwidget> + <class>Clock</class> + <extends>QWidget</extends> + <header>clock.h</header> + <container>1</container> + </customwidget> + <customwidget> + <class>WashWarnIcon</class> + <extends>QLabel</extends> + <header>washwarnicon.h</header> + </customwidget> + </customwidgets> + <resources/> + <connections/> +</ui> diff --git a/app/gui/oven_control/configlanguagedlg.cpp b/app/gui/oven_control/configlanguagedlg.cpp index 832a6be..c45a670 100644 --- a/app/gui/oven_control/configlanguagedlg.cpp +++ b/app/gui/oven_control/configlanguagedlg.cpp @@ -22,6 +22,22 @@ ConfigLanguageDlg::ConfigLanguageDlg(QWidget *parent) : ui->pushButton_2->setText(tr(language_menu[1])); ui->pushButton_3->setText(tr(language_menu[2])); + Config *cfg = Config::getInstance(); + config_item item; + cfg->getConfigValue(config_language); + m_nCurSelLang = item.d32; + + m_pSignalMapper = new QSignalMapper(this); + m_pSignalMapper->setMapping(ui->pushButton_1,0); + m_pSignalMapper->setMapping(ui->pushButton_2,1); + m_pSignalMapper->setMapping(ui->pushButton_3,2); + + connect(ui->pushButton_1,SIGNAL(clicked(bool)),m_pSignalMapper,SLOT(map())); + connect(ui->pushButton_2,SIGNAL(clicked(bool)),m_pSignalMapper,SLOT(map())); + connect(ui->pushButton_3,SIGNAL(clicked(bool)),m_pSignalMapper,SLOT(map())); + + connect(m_pSignalMapper,SIGNAL(mapped(int)),this,SLOT(onConfigBtnClicked(int))); + } ConfigLanguageDlg::~ConfigLanguageDlg() @@ -31,6 +47,10 @@ ConfigLanguageDlg::~ConfigLanguageDlg() void ConfigLanguageDlg::on_ctrBtnOk_clicked() { + Config* cfg = Config::getInstance(); + config_item item; + item.d32 = m_nCurSelLang; + cfg->setConfigValue(config_language, item); this->accept(); } @@ -38,3 +58,23 @@ void ConfigLanguageDlg::on_ctrBtnCancel_clicked() { this->reject(); } + +void ConfigLanguageDlg::onConfigBtnClicked(const int sel){ + m_nCurSelLang = sel; +} + +void ConfigLanguageDlg::reloadUi(){ + switch(m_nCurSelLang){ + case 0: + ui->pushButton_1->setChecked(true); + break; + case 1: + ui->pushButton_2->setChecked(true); + break; + case 2: + ui->pushButton_3->setChecked(true); + break; + default: + break; + } +} diff --git a/app/gui/oven_control/configlanguagedlg.h b/app/gui/oven_control/configlanguagedlg.h index 119301f..f641a04 100644 --- a/app/gui/oven_control/configlanguagedlg.h +++ b/app/gui/oven_control/configlanguagedlg.h @@ -2,6 +2,7 @@ #define CONFIGLANGUAGEDLG_H #include <QDialog> +#include <QSignalMapper> namespace Ui { class ConfigLanguageDlg; @@ -10,6 +11,7 @@ class ConfigLanguageDlg; class ConfigLanguageDlg : public QDialog { Q_OBJECT + void reloadUi(); public: explicit ConfigLanguageDlg(QWidget *parent = 0); @@ -20,8 +22,12 @@ private slots: void on_ctrBtnCancel_clicked(); + void onConfigBtnClicked(const int sel); + private: Ui::ConfigLanguageDlg *ui; + QSignalMapper *m_pSignalMapper; + int m_nCurSelLang; }; #endif // CONFIGLANGUAGEDLG_H diff --git a/app/gui/oven_control/configwindow.cpp b/app/gui/oven_control/configwindow.cpp index a0984a9..93dc392 100644 --- a/app/gui/oven_control/configwindow.cpp +++ b/app/gui/oven_control/configwindow.cpp @@ -13,6 +13,7 @@ #include "soundplayer.h" #include "washwindow.h" #include "mainwindow.h" +#include "configdoormonitoring.h" ConfigWindow::ConfigWindow(QWidget *parent) : QMainWindow(parent), @@ -109,6 +110,15 @@ void ConfigWindow::onConfigBtnClicked(uint16_t id){ Config *cfg = Config::getInstance(); QDialog* dlg; switch(id){ + case config_loading_door_monitoring: + case config_cooking_door_monitoring: + ConfigDoorMonitoring* wnd; + wnd = new ConfigDoorMonitoring(this,(ConfigType) id); + connect(wnd,SIGNAL(destroyed(QObject*)),this,SLOT(reloadValue())); + wnd->setWindowModality(Qt::WindowModal); + wnd->showFullScreen(); + qDebug() << "closed window"; + break; case config_datetime: dlg = new ConfigDateTimeDlg(this); dlg->exec(); diff --git a/app/gui/oven_control/configwindow.h b/app/gui/oven_control/configwindow.h index 6180ade..4437611 100644 --- a/app/gui/oven_control/configwindow.h +++ b/app/gui/oven_control/configwindow.h @@ -32,19 +32,17 @@ class ConfigWindow : public QMainWindow private: const uint16_t m_arrMaxMenuCount[7] ={ - 5,8,7,2,1,0,5 + 6,8,9,2,3,0,5 }; const Define::ConfigType m_arrConfigListInfos[7][20] = { - {config_datetime, config_temptype,config_backlight, config_time_type,config_resttime_format,}, + {config_language,config_datetime, config_temptype,config_backlight, config_time_type,config_resttime_format,}, {config_marster_vol,config_keypad_sound1,config_keypad_sound2,config_request_loadexec,config_programstep_finish,config_cooktime_finish,config_stoperror_distinguish,config_sound_factory_reset}, - {config_info_data_download,config_service_data_download,config_program_download,config_program_upload ,config_ip,config_set_download,config_set_upload}, + {config_haccp_data_download,config_info_data_download,config_service_data_download,config_program_download,config_program_upload ,config_program_initialize,config_ip,config_set_download,config_set_upload}, {config_set_half_energy,config_set_auto_darkness,}, - {config_duty_wash,}, + {config_duty_wash,config_loading_door_monitoring,config_cooking_door_monitoring}, {config_invalid,}, {config_software_info,config_hotline_chef,config_hotline_service,config_steam_wash,config_enter_engineer_mode} }; - void reloadUi(void); - void reloadValue(void); public: explicit ConfigWindow(QWidget *parent = 0); @@ -71,6 +69,8 @@ private slots: void on_washButton_clicked(); void on_helpButton_clicked(); + void reloadValue(void); + void reloadUi(void); public slots: void onConfigBtnClicked(uint16_t id); diff --git a/app/gui/oven_control/fileprocessdlg.cpp b/app/gui/oven_control/fileprocessdlg.cpp index 5c03e4b..6324613 100644 --- a/app/gui/oven_control/fileprocessdlg.cpp +++ b/app/gui/oven_control/fileprocessdlg.cpp @@ -220,6 +220,9 @@ FileProcessDlg::FileProcessDlg(QWidget *parent, ConfigType type, bool isDown) : } switch(type){ + case config_haccp_data_download: + QTimer::singleShot(100,this,SLOT(haccpdataDownload())); + break; case config_info_data_download: QTimer::singleShot(100,this,SLOT(infodataDownload())); break; @@ -696,3 +699,9 @@ void FileProcessDlg::configUpload(){ QTimer::singleShot(1000,this,SLOT(close())); } } + +void FileProcessDlg::haccpdataDownload(){ + ui->ctrWjProcess->setValue(100); + ui->ctrLbRemainTime->setText(tr("남은 예상 시간 : 완료")); + QTimer::singleShot(1000,this,SLOT(close())); +} diff --git a/app/gui/oven_control/fileprocessdlg.h b/app/gui/oven_control/fileprocessdlg.h index e9f64e5..848c5cb 100644 --- a/app/gui/oven_control/fileprocessdlg.h +++ b/app/gui/oven_control/fileprocessdlg.h @@ -64,6 +64,7 @@ private slots: void programUpload(); void configDownload(); void configUpload(); + void haccpdataDownload(); signals: void stopcopy(); diff --git a/app/gui/oven_control/oven_control.pro b/app/gui/oven_control/oven_control.pro index d8764ca..636b42d 100644 --- a/app/gui/oven_control/oven_control.pro +++ b/app/gui/oven_control/oven_control.pro @@ -115,7 +115,9 @@ SOURCES += main.cpp\ programmingautoconfigwindow.cpp \ programmingnamepopup.cpp \ reservetimepopup.cpp \ - reservedtimepopup.cpp + reservedtimepopup.cpp \ + configdoormonitoring.cpp \ + config1digitsetandenablesetdlg.cpp HEADERS += mainwindow.h \ cook.h \ @@ -220,7 +222,9 @@ HEADERS += mainwindow.h \ programmingautoconfigwindow.h \ programmingnamepopup.h \ reservetimepopup.h \ - reservedtimepopup.h + reservedtimepopup.h \ + configdoormonitoring.h \ + config1digitsetandenablesetdlg.h FORMS += mainwindow.ui \ manualcookwindow.ui \ @@ -292,7 +296,9 @@ FORMS += mainwindow.ui \ programmingautoconfigwindow.ui \ programmingnamepopup.ui \ reservetimepopup.ui \ - reservedtimepopup.ui + reservedtimepopup.ui \ + configdoormonitoring.ui \ + config1digitsetandenablesetdlg.ui RESOURCES += \ resources.qrc -- 2.1.4