Commit d66410abd694cc067a7f75c3b32d72211cc77ce0
1 parent
093c536e09
Exists in
master
and in
2 other branches
에러 팝업 형태 변경
- 에러 팝업 모달 형태로 변경 - 엔지니어링 서비스 진입 변경
Showing
5 changed files
with
40 additions
and
37 deletions
Show diff stats
app/gui/oven_control/configwindow.cpp
| @@ -112,11 +112,6 @@ void ConfigWindow::onConfigBtnClicked(uint16_t id){ | @@ -112,11 +112,6 @@ void ConfigWindow::onConfigBtnClicked(uint16_t id){ | ||
| 112 | { | 112 | { |
| 113 | dlg = new ServicePassInputDlg(this); | 113 | dlg = new ServicePassInputDlg(this); |
| 114 | dlg->exec(); | 114 | dlg->exec(); |
| 115 | - if(dlg->result() == QDialog::Accepted){ | ||
| 116 | - EngineerMenuWindow *w = new EngineerMenuWindow(this); | ||
| 117 | - w->setWindowModality(Qt::WindowModal); | ||
| 118 | - w->showFullScreen(); | ||
| 119 | - } | ||
| 120 | break; | 115 | break; |
| 121 | } | 116 | } |
| 122 | case config_software_info: | 117 | case config_software_info: |
app/gui/oven_control/errorpopupdlg.cpp
| 1 | #include "errorpopupdlg.h" | 1 | #include "errorpopupdlg.h" |
| 2 | #include "ui_errorpopupdlg.h" | 2 | #include "ui_errorpopupdlg.h" |
| 3 | +#include <QDebug> | ||
| 3 | 4 | ||
| 4 | ErrorPopupDlg::ErrorPopupDlg(QWidget *parent, const QString &MsgDesc, const QString &MsgTitle) : | 5 | ErrorPopupDlg::ErrorPopupDlg(QWidget *parent, const QString &MsgDesc, const QString &MsgTitle) : |
| 5 | QDialog(parent), | 6 | QDialog(parent), |
| @@ -10,7 +11,7 @@ ErrorPopupDlg::ErrorPopupDlg(QWidget *parent, const QString &MsgDesc, const QStr | @@ -10,7 +11,7 @@ ErrorPopupDlg::ErrorPopupDlg(QWidget *parent, const QString &MsgDesc, const QStr | ||
| 10 | this->setAttribute( Qt::WA_DeleteOnClose); | 11 | this->setAttribute( Qt::WA_DeleteOnClose); |
| 11 | this->setWindowFlags(Qt::FramelessWindowHint); | 12 | this->setWindowFlags(Qt::FramelessWindowHint); |
| 12 | 13 | ||
| 13 | - ui->centralwidget->setWindowFlags(Qt::FramelessWindowHint); | 14 | + //ui->centralwidget->setWindowFlags(Qt::FramelessWindowHint); |
| 14 | ui->ctrlWarnDescription->setText(MsgDesc); | 15 | ui->ctrlWarnDescription->setText(MsgDesc); |
| 15 | ui->ctrlWarnTitle->setText(MsgTitle); | 16 | ui->ctrlWarnTitle->setText(MsgTitle); |
| 16 | m_pParent = parent; | 17 | m_pParent = parent; |
| @@ -23,6 +24,7 @@ ErrorPopupDlg::~ErrorPopupDlg() | @@ -23,6 +24,7 @@ ErrorPopupDlg::~ErrorPopupDlg() | ||
| 23 | 24 | ||
| 24 | void ErrorPopupDlg::on_ctrlOkBtn_clicked() | 25 | void ErrorPopupDlg::on_ctrlOkBtn_clicked() |
| 25 | { | 26 | { |
| 26 | - emit closedPopup(m_pParent); | 27 | + //emit closedPopup(m_pParent); |
| 28 | + this->hide(); | ||
| 27 | close(); | 29 | close(); |
| 28 | } | 30 | } |
app/gui/oven_control/ovenstatics.cpp
| @@ -7,6 +7,7 @@ | @@ -7,6 +7,7 @@ | ||
| 7 | #include "engineermenuwindow.h" | 7 | #include "engineermenuwindow.h" |
| 8 | #include "errorpopupdlg.h" | 8 | #include "errorpopupdlg.h" |
| 9 | #include "historylistwindow.h" | 9 | #include "historylistwindow.h" |
| 10 | +#include "servicepassinputdlg.h" | ||
| 10 | 11 | ||
| 11 | OvenStatistics* OvenStatistics::p_singletonInstance=NULL; | 12 | OvenStatistics* OvenStatistics::p_singletonInstance=NULL; |
| 12 | 13 | ||
| @@ -98,6 +99,11 @@ void OvenStatistics::onDataChanged() | @@ -98,6 +99,11 @@ void OvenStatistics::onDataChanged() | ||
| 98 | } | 99 | } |
| 99 | curSensorErrorState = errstatetemp; | 100 | curSensorErrorState = errstatetemp; |
| 100 | 101 | ||
| 102 | + errstatetemp = state.controller_error; | ||
| 103 | + if(errstatetemp != 0 && errstatetemp != curControlErrorState){ | ||
| 104 | + | ||
| 105 | + } | ||
| 106 | + curControlErrorState = errstatetemp; | ||
| 101 | 107 | ||
| 102 | } | 108 | } |
| 103 | 109 | ||
| @@ -187,32 +193,32 @@ void OvenStatistics::processCommError(uint16_t errflag, time_t ltime){ | @@ -187,32 +193,32 @@ void OvenStatistics::processCommError(uint16_t errflag, time_t ltime){ | ||
| 187 | 193 | ||
| 188 | if(errflag & MAKE_MASK(COMM_ERR_BUNNER1)){ | 194 | if(errflag & MAKE_MASK(COMM_ERR_BUNNER1)){ |
| 189 | item = &(srvdata->err_log.items.upper_pan_fail); | 195 | item = &(srvdata->err_log.items.upper_pan_fail); |
| 190 | - strMsg = tr("상부 송풍기 이상 발생"); | 196 | + strMsg = tr("상부 송풍기 통신 이상 발생"); |
| 191 | strTitle = tr("상부 송풍기 이상 발생"); | 197 | strTitle = tr("상부 송풍기 이상 발생"); |
| 192 | processErrorItems(item,comm_err_type_def[state][COMM_ERR_BUNNER1],strMsg,strTitle, ltime); | 198 | processErrorItems(item,comm_err_type_def[state][COMM_ERR_BUNNER1],strMsg,strTitle, ltime); |
| 193 | } | 199 | } |
| 194 | if(errflag & MAKE_MASK(COMM_ERR_BUNNER2)){ | 200 | if(errflag & MAKE_MASK(COMM_ERR_BUNNER2)){ |
| 195 | item = &(srvdata->err_log.items.lower_pan_fail); | 201 | item = &(srvdata->err_log.items.lower_pan_fail); |
| 196 | - strMsg = tr("하부 송풍기 이상 발생"); | 202 | + strMsg = tr("하부 송풍기 통신 이상 발생"); |
| 197 | strTitle = tr("하부 송풍기 이상 발생"); | 203 | strTitle = tr("하부 송풍기 이상 발생"); |
| 198 | processErrorItems(item,comm_err_type_def[state][COMM_ERR_BUNNER2],strMsg,strTitle, ltime); | 204 | processErrorItems(item,comm_err_type_def[state][COMM_ERR_BUNNER2],strMsg,strTitle, ltime); |
| 199 | } | 205 | } |
| 200 | if(errflag & MAKE_MASK(COMM_ERR_BUNNER3)){ | 206 | if(errflag & MAKE_MASK(COMM_ERR_BUNNER3)){ |
| 201 | item = &(srvdata->err_log.items.steam_pan_fail); | 207 | item = &(srvdata->err_log.items.steam_pan_fail); |
| 202 | - strMsg = tr("스팀 송풍기 이상 발생"); | 208 | + strMsg = tr("스팀 송풍기 통신 이상 발생"); |
| 203 | strTitle = tr("스팀 송풍기 이상 발생"); | 209 | strTitle = tr("스팀 송풍기 이상 발생"); |
| 204 | processErrorItems(item,comm_err_type_def[state][COMM_ERR_BUNNER3],strMsg,strTitle, ltime); | 210 | processErrorItems(item,comm_err_type_def[state][COMM_ERR_BUNNER3],strMsg,strTitle, ltime); |
| 205 | } | 211 | } |
| 206 | if(errflag & MAKE_MASK(COMM_ERR_LOWERFAN)){ | 212 | if(errflag & MAKE_MASK(COMM_ERR_LOWERFAN)){ |
| 207 | item = &(srvdata->err_log.items.lower_motor_fail); | 213 | item = &(srvdata->err_log.items.lower_motor_fail); |
| 208 | - strMsg = tr("하부 모터 컨트롤러 이상 발생"); | ||
| 209 | - strTitle = tr("하부 모터 컨트롤러 이상 발생"); | 214 | + strMsg = tr("하부 FAN 컨트롤러 통신 이상 발생"); |
| 215 | + strTitle = tr("하부 FAN 컨트롤러 이상 발생"); | ||
| 210 | processErrorItems(item,comm_err_type_def[state][COMM_ERR_BUNNER2],strMsg,strTitle, ltime); | 216 | processErrorItems(item,comm_err_type_def[state][COMM_ERR_BUNNER2],strMsg,strTitle, ltime); |
| 211 | } | 217 | } |
| 212 | if(errflag & MAKE_MASK(COMM_ERR_UPPERFAN)){ | 218 | if(errflag & MAKE_MASK(COMM_ERR_UPPERFAN)){ |
| 213 | item = &(srvdata->err_log.items.upper_motor_fail); | 219 | item = &(srvdata->err_log.items.upper_motor_fail); |
| 214 | - strMsg = tr("상부 모터 컨트롤러 이상 발생"); | ||
| 215 | - strTitle = tr("상부 모터 컨트롤러 이상 발생"); | 220 | + strMsg = tr("상부 FAN 컨트롤러 통신 이상 발생"); |
| 221 | + strTitle = tr("상부 FAN 컨트롤러 이상 발생"); | ||
| 216 | processErrorItems(item,comm_err_type_def[state][COMM_ERR_BUNNER2],strMsg,strTitle, ltime); | 222 | processErrorItems(item,comm_err_type_def[state][COMM_ERR_BUNNER2],strMsg,strTitle, ltime); |
| 217 | } | 223 | } |
| 218 | } | 224 | } |
| @@ -274,8 +280,8 @@ void OvenStatistics::processSystemError(uint16_t errflag,time_t ltime){ | @@ -274,8 +280,8 @@ void OvenStatistics::processSystemError(uint16_t errflag,time_t ltime){ | ||
| 274 | } | 280 | } |
| 275 | if(errflag & MAKE_MASK(SYS_ERR_STAM_TEMP_ALARM)){ | 281 | if(errflag & MAKE_MASK(SYS_ERR_STAM_TEMP_ALARM)){ |
| 276 | item = &(srvdata->err_log.items.steam_gen_temp_high_alram); | 282 | item = &(srvdata->err_log.items.steam_gen_temp_high_alram); |
| 277 | - strTitle = tr("스팀제네레이터 온도 과열 발생."); | ||
| 278 | - strMsg = tr("스팀제네레이터 온도 센서 과열이 발생되었습니다."); | 283 | + strTitle = tr("스팀제네레이터 온도 이상 발생."); |
| 284 | + strMsg = tr("스팀제네레이터 온도 센서가 과열 되었습니다."); | ||
| 279 | processErrorItems(item, sys_err_type_def[state][SYS_ERR_STAM_TEMP_ALARM],strMsg,strTitle,ltime); | 285 | processErrorItems(item, sys_err_type_def[state][SYS_ERR_STAM_TEMP_ALARM],strMsg,strTitle,ltime); |
| 280 | } | 286 | } |
| 281 | if(errflag & MAKE_MASK(SYS_ERR_WATER_SPLY_FAIL)){ | 287 | if(errflag & MAKE_MASK(SYS_ERR_WATER_SPLY_FAIL)){ |
| @@ -534,31 +540,20 @@ void OvenStatistics::processErrorItems(error_item *item, error_exe_type errtype, | @@ -534,31 +540,20 @@ void OvenStatistics::processErrorItems(error_item *item, error_exe_type errtype, | ||
| 534 | case error_type_popclr: | 540 | case error_type_popclr: |
| 535 | case error_type_popnonclr: | 541 | case error_type_popnonclr: |
| 536 | { | 542 | { |
| 537 | - if(m_bPopupShow==false){ | ||
| 538 | - m_bPopupShow = true; | ||
| 539 | - ErrorPopupDlg *dlg = new ErrorPopupDlg(QApplication::activeWindow(),MsgDesc,MsgTitle); | ||
| 540 | - //connect(dlg,SIGNAL(destroyed(QObject*)),this, SLOT(onErrorPopupClosed())); | ||
| 541 | - connect(dlg,SIGNAL(closedPopup(QWidget*)),this, SLOT(onErrorPopupClosed(QWidget*))); | ||
| 542 | - dlg->showFullScreen(); | ||
| 543 | - m_nLastPopupidx = erridx; | ||
| 544 | - } | ||
| 545 | - else{ | ||
| 546 | - if(erridx != m_nLastPopupidx && m_mapPopupList.contains(erridx) ==false){ | ||
| 547 | - popup_list_item popitem; | ||
| 548 | - popitem.bNeedClear = bNeedErrorClear; | ||
| 549 | - popitem.strDesc = MsgDesc; | ||
| 550 | - popitem.strTitle = MsgTitle; | ||
| 551 | - m_mapPopupList.insert(erridx,popitem); | ||
| 552 | - } | ||
| 553 | - } | 543 | + ErrorPopupDlg *dlg = new ErrorPopupDlg(QApplication::activeWindow(),MsgDesc,MsgTitle); |
| 544 | + dlg->exec(); | ||
| 554 | break; | 545 | break; |
| 555 | } | 546 | } |
| 556 | case error_type_engclr: | 547 | case error_type_engclr: |
| 557 | case error_type_engnonclr: | 548 | case error_type_engnonclr: |
| 558 | case error_type_onlyeng: | 549 | case error_type_onlyeng: |
| 559 | { | 550 | { |
| 560 | - EngineerMenuWindow *w = new EngineerMenuWindow(0); | ||
| 561 | - w->showFullScreen(); | 551 | + //EngineerMenuWindow *w = new EngineerMenuWindow(0); |
| 552 | + //w->showFullScreen(); | ||
| 553 | + ErrorPopupDlg *dlg = new ErrorPopupDlg(QApplication::activeWindow(),MsgDesc,MsgTitle); | ||
| 554 | + dlg->exec(); | ||
| 555 | + ServicePassInputDlg *w = new ServicePassInputDlg(QApplication::activeWindow()); | ||
| 556 | + w->exec(); | ||
| 562 | break; | 557 | break; |
| 563 | } | 558 | } |
| 564 | default: | 559 | default: |
app/gui/oven_control/ovenstatics.h
| @@ -243,6 +243,7 @@ private: | @@ -243,6 +243,7 @@ private: | ||
| 243 | uint16_t curSysErrorState; | 243 | uint16_t curSysErrorState; |
| 244 | uint16_t curCommErrorState; | 244 | uint16_t curCommErrorState; |
| 245 | uint16_t curSensorErrorState; | 245 | uint16_t curSensorErrorState; |
| 246 | + uint16_t curControlErrorState; | ||
| 246 | bool bNeedErrorClear; | 247 | bool bNeedErrorClear; |
| 247 | bool bDataRefreshed; | 248 | bool bDataRefreshed; |
| 248 | realtime_data realdata; | 249 | realtime_data realdata; |
app/gui/oven_control/servicepassinputdlg.cpp
| 1 | #include "servicepassinputdlg.h" | 1 | #include "servicepassinputdlg.h" |
| 2 | #include "ui_servicepassinputdlg.h" | 2 | #include "ui_servicepassinputdlg.h" |
| 3 | +#include "engineermenuwindow.h" | ||
| 4 | +#include <QDebug> | ||
| 3 | 5 | ||
| 4 | #define PASS_WORD "0000" | 6 | #define PASS_WORD "0000" |
| 5 | 7 | ||
| @@ -12,6 +14,7 @@ ServicePassInputDlg::ServicePassInputDlg(QWidget *parent) : | @@ -12,6 +14,7 @@ ServicePassInputDlg::ServicePassInputDlg(QWidget *parent) : | ||
| 12 | setAttribute(Qt::WA_NoSystemBackground); | 14 | setAttribute(Qt::WA_NoSystemBackground); |
| 13 | setAttribute(Qt::WA_TranslucentBackground); | 15 | setAttribute(Qt::WA_TranslucentBackground); |
| 14 | setAttribute(Qt::WA_DeleteOnClose); | 16 | setAttribute(Qt::WA_DeleteOnClose); |
| 17 | + this->setResult(QDialog::Accepted); | ||
| 15 | } | 18 | } |
| 16 | 19 | ||
| 17 | ServicePassInputDlg::~ServicePassInputDlg() | 20 | ServicePassInputDlg::~ServicePassInputDlg() |
| @@ -22,9 +25,16 @@ ServicePassInputDlg::~ServicePassInputDlg() | @@ -22,9 +25,16 @@ ServicePassInputDlg::~ServicePassInputDlg() | ||
| 22 | void ServicePassInputDlg::on_ctrBtnOk_clicked() | 25 | void ServicePassInputDlg::on_ctrBtnOk_clicked() |
| 23 | { | 26 | { |
| 24 | if(ui->lineEdit->text() == PASS_WORD){ | 27 | if(ui->lineEdit->text() == PASS_WORD){ |
| 25 | - accept(); | 28 | + qDebug() << this->parentWidget() <<this->parent(); |
| 29 | + EngineerMenuWindow *w = new EngineerMenuWindow(this->parentWidget()); | ||
| 30 | + connect(w,SIGNAL(destroyed(QObject*)),this,SLOT(close())); | ||
| 31 | + w->setWindowModality(Qt::WindowModal); | ||
| 32 | + w->show(); | ||
| 33 | + } | ||
| 34 | + else { | ||
| 35 | + qDebug()<< "pass incorrect " << ui->lineEdit->text(); | ||
| 36 | + reject(); | ||
| 26 | } | 37 | } |
| 27 | - else reject(); | ||
| 28 | } | 38 | } |
| 29 | 39 | ||
| 30 | void ServicePassInputDlg::on_ctrBtnCancel_clicked() | 40 | void ServicePassInputDlg::on_ctrBtnCancel_clicked() |