diff --git a/app/gui/oven_control/configwindow.cpp b/app/gui/oven_control/configwindow.cpp index ea0fc38..64766d9 100644 --- a/app/gui/oven_control/configwindow.cpp +++ b/app/gui/oven_control/configwindow.cpp @@ -112,11 +112,6 @@ void ConfigWindow::onConfigBtnClicked(uint16_t id){ { dlg = new ServicePassInputDlg(this); dlg->exec(); - if(dlg->result() == QDialog::Accepted){ - EngineerMenuWindow *w = new EngineerMenuWindow(this); - w->setWindowModality(Qt::WindowModal); - w->showFullScreen(); - } break; } case config_software_info: diff --git a/app/gui/oven_control/errorpopupdlg.cpp b/app/gui/oven_control/errorpopupdlg.cpp index de060ec..e885377 100644 --- a/app/gui/oven_control/errorpopupdlg.cpp +++ b/app/gui/oven_control/errorpopupdlg.cpp @@ -1,5 +1,6 @@ #include "errorpopupdlg.h" #include "ui_errorpopupdlg.h" +#include ErrorPopupDlg::ErrorPopupDlg(QWidget *parent, const QString &MsgDesc, const QString &MsgTitle) : QDialog(parent), @@ -10,7 +11,7 @@ ErrorPopupDlg::ErrorPopupDlg(QWidget *parent, const QString &MsgDesc, const QStr this->setAttribute( Qt::WA_DeleteOnClose); this->setWindowFlags(Qt::FramelessWindowHint); - ui->centralwidget->setWindowFlags(Qt::FramelessWindowHint); + //ui->centralwidget->setWindowFlags(Qt::FramelessWindowHint); ui->ctrlWarnDescription->setText(MsgDesc); ui->ctrlWarnTitle->setText(MsgTitle); m_pParent = parent; @@ -23,6 +24,7 @@ ErrorPopupDlg::~ErrorPopupDlg() void ErrorPopupDlg::on_ctrlOkBtn_clicked() { - emit closedPopup(m_pParent); + //emit closedPopup(m_pParent); + this->hide(); close(); } diff --git a/app/gui/oven_control/ovenstatics.cpp b/app/gui/oven_control/ovenstatics.cpp index 645ab43..d51a525 100644 --- a/app/gui/oven_control/ovenstatics.cpp +++ b/app/gui/oven_control/ovenstatics.cpp @@ -7,6 +7,7 @@ #include "engineermenuwindow.h" #include "errorpopupdlg.h" #include "historylistwindow.h" +#include "servicepassinputdlg.h" OvenStatistics* OvenStatistics::p_singletonInstance=NULL; @@ -98,6 +99,11 @@ void OvenStatistics::onDataChanged() } curSensorErrorState = errstatetemp; + errstatetemp = state.controller_error; + if(errstatetemp != 0 && errstatetemp != curControlErrorState){ + + } + curControlErrorState = errstatetemp; } @@ -187,32 +193,32 @@ void OvenStatistics::processCommError(uint16_t errflag, time_t ltime){ if(errflag & MAKE_MASK(COMM_ERR_BUNNER1)){ item = &(srvdata->err_log.items.upper_pan_fail); - strMsg = tr("상부 송풍기 이상 발생"); + strMsg = tr("상부 송풍기 통신 이상 발생"); strTitle = tr("상부 송풍기 이상 발생"); processErrorItems(item,comm_err_type_def[state][COMM_ERR_BUNNER1],strMsg,strTitle, ltime); } if(errflag & MAKE_MASK(COMM_ERR_BUNNER2)){ item = &(srvdata->err_log.items.lower_pan_fail); - strMsg = tr("하부 송풍기 이상 발생"); + strMsg = tr("하부 송풍기 통신 이상 발생"); strTitle = tr("하부 송풍기 이상 발생"); processErrorItems(item,comm_err_type_def[state][COMM_ERR_BUNNER2],strMsg,strTitle, ltime); } if(errflag & MAKE_MASK(COMM_ERR_BUNNER3)){ item = &(srvdata->err_log.items.steam_pan_fail); - strMsg = tr("스팀 송풍기 이상 발생"); + strMsg = tr("스팀 송풍기 통신 이상 발생"); strTitle = tr("스팀 송풍기 이상 발생"); processErrorItems(item,comm_err_type_def[state][COMM_ERR_BUNNER3],strMsg,strTitle, ltime); } if(errflag & MAKE_MASK(COMM_ERR_LOWERFAN)){ item = &(srvdata->err_log.items.lower_motor_fail); - strMsg = tr("하부 모터 컨트롤러 이상 발생"); - strTitle = tr("하부 모터 컨트롤러 이상 발생"); + strMsg = tr("하부 FAN 컨트롤러 통신 이상 발생"); + strTitle = tr("하부 FAN 컨트롤러 이상 발생"); processErrorItems(item,comm_err_type_def[state][COMM_ERR_BUNNER2],strMsg,strTitle, ltime); } if(errflag & MAKE_MASK(COMM_ERR_UPPERFAN)){ item = &(srvdata->err_log.items.upper_motor_fail); - strMsg = tr("상부 모터 컨트롤러 이상 발생"); - strTitle = tr("상부 모터 컨트롤러 이상 발생"); + strMsg = tr("상부 FAN 컨트롤러 통신 이상 발생"); + strTitle = tr("상부 FAN 컨트롤러 이상 발생"); processErrorItems(item,comm_err_type_def[state][COMM_ERR_BUNNER2],strMsg,strTitle, ltime); } } @@ -274,8 +280,8 @@ void OvenStatistics::processSystemError(uint16_t errflag,time_t ltime){ } if(errflag & MAKE_MASK(SYS_ERR_STAM_TEMP_ALARM)){ item = &(srvdata->err_log.items.steam_gen_temp_high_alram); - strTitle = tr("스팀제네레이터 온도 과열 발생."); - strMsg = tr("스팀제네레이터 온도 센서 과열이 발생되었습니다."); + strTitle = tr("스팀제네레이터 온도 이상 발생."); + strMsg = tr("스팀제네레이터 온도 센서가 과열 되었습니다."); processErrorItems(item, sys_err_type_def[state][SYS_ERR_STAM_TEMP_ALARM],strMsg,strTitle,ltime); } if(errflag & MAKE_MASK(SYS_ERR_WATER_SPLY_FAIL)){ @@ -534,31 +540,20 @@ void OvenStatistics::processErrorItems(error_item *item, error_exe_type errtype, case error_type_popclr: case error_type_popnonclr: { - if(m_bPopupShow==false){ - m_bPopupShow = true; - ErrorPopupDlg *dlg = new ErrorPopupDlg(QApplication::activeWindow(),MsgDesc,MsgTitle); - //connect(dlg,SIGNAL(destroyed(QObject*)),this, SLOT(onErrorPopupClosed())); - connect(dlg,SIGNAL(closedPopup(QWidget*)),this, SLOT(onErrorPopupClosed(QWidget*))); - dlg->showFullScreen(); - m_nLastPopupidx = erridx; - } - else{ - if(erridx != m_nLastPopupidx && m_mapPopupList.contains(erridx) ==false){ - popup_list_item popitem; - popitem.bNeedClear = bNeedErrorClear; - popitem.strDesc = MsgDesc; - popitem.strTitle = MsgTitle; - m_mapPopupList.insert(erridx,popitem); - } - } + ErrorPopupDlg *dlg = new ErrorPopupDlg(QApplication::activeWindow(),MsgDesc,MsgTitle); + dlg->exec(); break; } case error_type_engclr: case error_type_engnonclr: case error_type_onlyeng: { - EngineerMenuWindow *w = new EngineerMenuWindow(0); - w->showFullScreen(); + //EngineerMenuWindow *w = new EngineerMenuWindow(0); + //w->showFullScreen(); + ErrorPopupDlg *dlg = new ErrorPopupDlg(QApplication::activeWindow(),MsgDesc,MsgTitle); + dlg->exec(); + ServicePassInputDlg *w = new ServicePassInputDlg(QApplication::activeWindow()); + w->exec(); break; } default: diff --git a/app/gui/oven_control/ovenstatics.h b/app/gui/oven_control/ovenstatics.h index b729f94..aa06136 100644 --- a/app/gui/oven_control/ovenstatics.h +++ b/app/gui/oven_control/ovenstatics.h @@ -243,6 +243,7 @@ private: uint16_t curSysErrorState; uint16_t curCommErrorState; uint16_t curSensorErrorState; + uint16_t curControlErrorState; bool bNeedErrorClear; bool bDataRefreshed; realtime_data realdata; diff --git a/app/gui/oven_control/servicepassinputdlg.cpp b/app/gui/oven_control/servicepassinputdlg.cpp index 5bd3dfa..0e63d3d 100644 --- a/app/gui/oven_control/servicepassinputdlg.cpp +++ b/app/gui/oven_control/servicepassinputdlg.cpp @@ -1,5 +1,7 @@ #include "servicepassinputdlg.h" #include "ui_servicepassinputdlg.h" +#include "engineermenuwindow.h" +#include #define PASS_WORD "0000" @@ -12,6 +14,7 @@ ServicePassInputDlg::ServicePassInputDlg(QWidget *parent) : setAttribute(Qt::WA_NoSystemBackground); setAttribute(Qt::WA_TranslucentBackground); setAttribute(Qt::WA_DeleteOnClose); + this->setResult(QDialog::Accepted); } ServicePassInputDlg::~ServicePassInputDlg() @@ -22,9 +25,16 @@ ServicePassInputDlg::~ServicePassInputDlg() void ServicePassInputDlg::on_ctrBtnOk_clicked() { if(ui->lineEdit->text() == PASS_WORD){ - accept(); + qDebug() << this->parentWidget() <parent(); + EngineerMenuWindow *w = new EngineerMenuWindow(this->parentWidget()); + connect(w,SIGNAL(destroyed(QObject*)),this,SLOT(close())); + w->setWindowModality(Qt::WindowModal); + w->show(); + } + else { + qDebug()<< "pass incorrect " << ui->lineEdit->text(); + reject(); } - else reject(); } void ServicePassInputDlg::on_ctrBtnCancel_clicked()