Commit 003971acb6ccd8d9bc2b05eccf006ef8c9aa15ed
1 parent
cc2cf54b42
Exists in
master
and in
2 other branches
에러 발생시 패스워드 인풋 윈도우 및 엔지니어링 윈도우 중복 실행 방지
Showing
4 changed files
with
30 additions
and
10 deletions
Show diff stats
app/gui/oven_control/configwindow.cpp
| @@ -47,7 +47,7 @@ ConfigWindow::ConfigWindow(QWidget *parent) : | @@ -47,7 +47,7 @@ ConfigWindow::ConfigWindow(QWidget *parent) : | ||
| 47 | dlg->setModal(true); | 47 | dlg->setModal(true); |
| 48 | dlg->showFullScreen(); | 48 | dlg->showFullScreen(); |
| 49 | dlg->raise(); | 49 | dlg->raise(); |
| 50 | - connect(dlg, SIGNAL(rejected()), SLOT(close())); | 50 | + connect(dlg, SIGNAL(rejected()), SLOT(deleteLater())); |
| 51 | } | 51 | } |
| 52 | } | 52 | } |
| 53 | 53 |
app/gui/oven_control/ovenstatics.cpp
| @@ -47,6 +47,7 @@ OvenStatistics::OvenStatistics(QObject* parent) :QObject(parent) | @@ -47,6 +47,7 @@ OvenStatistics::OvenStatistics(QObject* parent) :QObject(parent) | ||
| 47 | realdata.d32 = 0; | 47 | realdata.d32 = 0; |
| 48 | m_bPopupShow = false; | 48 | m_bPopupShow = false; |
| 49 | m_nLastPopupidx = MAX_ERROR_TYPE_CNT; | 49 | m_nLastPopupidx = MAX_ERROR_TYPE_CNT; |
| 50 | + m_wndSrvpassdlg = NULL; | ||
| 50 | 51 | ||
| 51 | for(i=0;i<MAX_LOG_SENSOR;i++){ | 52 | for(i=0;i<MAX_LOG_SENSOR;i++){ |
| 52 | curSensorValue[i].utemp = 0; | 53 | curSensorValue[i].utemp = 0; |
| @@ -675,9 +676,11 @@ void OvenStatistics::processErrorItems(error_item *item, error_exe_type errtype, | @@ -675,9 +676,11 @@ void OvenStatistics::processErrorItems(error_item *item, error_exe_type errtype, | ||
| 675 | m_mapPopupList.insert(erridx,dlg); | 676 | m_mapPopupList.insert(erridx,dlg); |
| 676 | dlg->showFullScreen(); | 677 | dlg->showFullScreen(); |
| 677 | 678 | ||
| 678 | - ServicePassInputDlg *w = new ServicePassInputDlg(pParent, NORMAL_SERVICE_PASS_MODE, (errtype > error_type_clrsplit)); | ||
| 679 | - //w->exec(); | ||
| 680 | - connect(dlg, SIGNAL(destroyed(QObject*)), w, SLOT(showFullScreen())); | 679 | + if(m_wndSrvpassdlg == NULL){ |
| 680 | + m_wndSrvpassdlg = new ServicePassInputDlg(pParent, NORMAL_SERVICE_PASS_MODE, (errtype > error_type_clrsplit)); | ||
| 681 | + connect(dlg, SIGNAL(destroyed(QObject*)), m_wndSrvpassdlg, SLOT(showFullScreen())); | ||
| 682 | + connect(m_wndSrvpassdlg, SIGNAL(destroyed(QObject*)), SLOT(setWndPassInputNull())); | ||
| 683 | + } | ||
| 681 | } | 684 | } |
| 682 | break; | 685 | break; |
| 683 | } | 686 | } |
app/gui/oven_control/ovenstatics.h
| @@ -9,6 +9,7 @@ | @@ -9,6 +9,7 @@ | ||
| 9 | #include "oven.h" | 9 | #include "oven.h" |
| 10 | #include "servicedata.h" | 10 | #include "servicedata.h" |
| 11 | #include "config.h" | 11 | #include "config.h" |
| 12 | +#include "servicepassinputdlg.h" | ||
| 12 | 13 | ||
| 13 | 14 | ||
| 14 | #define MAX_MODEL_COUNT 12 | 15 | #define MAX_MODEL_COUNT 12 |
| @@ -486,6 +487,7 @@ private: | @@ -486,6 +487,7 @@ private: | ||
| 486 | bool bNeedErrorClear; | 487 | bool bNeedErrorClear; |
| 487 | bool bDataRefreshed; | 488 | bool bDataRefreshed; |
| 488 | realtime_data realdata; | 489 | realtime_data realdata; |
| 490 | + ServicePassInputDlg *m_wndSrvpassdlg; | ||
| 489 | 491 | ||
| 490 | explicit OvenStatistics(QObject* parent); | 492 | explicit OvenStatistics(QObject* parent); |
| 491 | ~OvenStatistics(); | 493 | ~OvenStatistics(); |
| @@ -509,6 +511,7 @@ public slots: | @@ -509,6 +511,7 @@ public slots: | ||
| 509 | void onDataChanged(); | 511 | void onDataChanged(); |
| 510 | void oneSecTimerFired(void); | 512 | void oneSecTimerFired(void); |
| 511 | void onErrorPopupClosed(int erridx); | 513 | void onErrorPopupClosed(int erridx); |
| 514 | + void setWndPassInputNull(void){m_wndSrvpassdlg = NULL;} | ||
| 512 | 515 | ||
| 513 | signals: | 516 | signals: |
| 514 | void onErrorFired(int erridx); | 517 | void onErrorFired(int erridx); |
app/gui/oven_control/servicepassinputdlg.cpp
| @@ -4,6 +4,7 @@ | @@ -4,6 +4,7 @@ | ||
| 4 | #include <QDebug> | 4 | #include <QDebug> |
| 5 | #include "soundplayer.h" | 5 | #include "soundplayer.h" |
| 6 | #include "udphandler.h" | 6 | #include "udphandler.h" |
| 7 | +#include "mainwindow.h" | ||
| 7 | 8 | ||
| 8 | 9 | ||
| 9 | ServicePassInputDlg::ServicePassInputDlg(QWidget *parent, service_pass_type mode, bool sendClrCmd) : | 10 | ServicePassInputDlg::ServicePassInputDlg(QWidget *parent, service_pass_type mode, bool sendClrCmd) : |
| @@ -33,10 +34,12 @@ ServicePassInputDlg::ServicePassInputDlg(QWidget *parent, service_pass_type mode | @@ -33,10 +34,12 @@ ServicePassInputDlg::ServicePassInputDlg(QWidget *parent, service_pass_type mode | ||
| 33 | ui->keyboardwidget->focusInKeyboard(); | 34 | ui->keyboardwidget->focusInKeyboard(); |
| 34 | m_nMode = mode; | 35 | m_nMode = mode; |
| 35 | m_bSendClrCmd = sendClrCmd; | 36 | m_bSendClrCmd = sendClrCmd; |
| 37 | + qDebug() << __func__; | ||
| 36 | } | 38 | } |
| 37 | 39 | ||
| 38 | ServicePassInputDlg::~ServicePassInputDlg() | 40 | ServicePassInputDlg::~ServicePassInputDlg() |
| 39 | { | 41 | { |
| 42 | + qDebug() << __func__; | ||
| 40 | delete ui; | 43 | delete ui; |
| 41 | } | 44 | } |
| 42 | 45 | ||
| @@ -46,12 +49,23 @@ void ServicePassInputDlg::on_ctrBtnOk_clicked() | @@ -46,12 +49,23 @@ void ServicePassInputDlg::on_ctrBtnOk_clicked() | ||
| 46 | if( QString(m_strInputPass) == QString(NORMAL_PASS_WORD) && m_nMode == NORMAL_SERVICE_PASS_MODE){ | 49 | if( QString(m_strInputPass) == QString(NORMAL_PASS_WORD) && m_nMode == NORMAL_SERVICE_PASS_MODE){ |
| 47 | qDebug() << this->parentWidget() <<this->parent(); | 50 | qDebug() << this->parentWidget() <<this->parent(); |
| 48 | if(m_bSendClrCmd) UdpHandler::getInstance()->set(TG_ERROR_CLEAR,0xCECE); | 51 | if(m_bSendClrCmd) UdpHandler::getInstance()->set(TG_ERROR_CLEAR,0xCECE); |
| 49 | - EngineerMenuWindow *w = new EngineerMenuWindow(this->parentWidget()); | ||
| 50 | - connect(w,SIGNAL(destroyed(QObject*)),this,SLOT(close())); | ||
| 51 | - w->setWindowModality(Qt::WindowModal); | ||
| 52 | - w->showFullScreen(); | ||
| 53 | - w->raise(); | ||
| 54 | - this->hide(); | 52 | + if(MainWindow::getEngineerMenuWindow()==NULL){ |
| 53 | + EngineerMenuWindow *w = new EngineerMenuWindow(this->parentWidget()); | ||
| 54 | + w->setWindowModality(Qt::WindowModal); | ||
| 55 | + w->showFullScreen(); | ||
| 56 | + w->raise(); | ||
| 57 | + hide(); | ||
| 58 | + deleteLater(); | ||
| 59 | + } | ||
| 60 | + else{ | ||
| 61 | + EngineerMenuWindow *w = MainWindow::getEngineerMenuWindow(); | ||
| 62 | + w->killChild(); | ||
| 63 | + w->raise(); | ||
| 64 | + hide(); | ||
| 65 | + deleteLater(); | ||
| 66 | + } | ||
| 67 | + //connect(w,SIGNAL(destroyed(QObject*)),this,SLOT(close())); | ||
| 68 | + | ||
| 55 | } | 69 | } |
| 56 | else if(QString(m_strInputPass) == QString(DEMO_PASS_WORD) && m_nMode == DEMO_SERVICE_PASS_MODE){ | 70 | else if(QString(m_strInputPass) == QString(DEMO_PASS_WORD) && m_nMode == DEMO_SERVICE_PASS_MODE){ |
| 57 | accept(); | 71 | accept(); |