From c12e09d9ad83be590d7a1b1e1caa6b30273ca205 Mon Sep 17 00:00:00 2001 From: byloveletter Date: Fri, 21 Apr 2017 17:17:47 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B5=90=EC=A0=95=20UI=20=EB=B0=8F=20=ED=8C=9D?= =?UTF-8?q?=EC=97=85=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 교정 UI 화면 구현 - Yes, No 선택 팝업 화면 구현(return value) --- app/gui/oven_control/adjustmentwindow.cpp | 15 ++ app/gui/oven_control/adjustmentwindow.h | 3 + app/gui/oven_control/adjustmentwindow.ui | 250 ++++++++++++++++++++- app/gui/oven_control/engineermenuwindow.cpp | 9 + app/gui/oven_control/engineermenuwindow.h | 2 + .../images/config/service/adjustment_line.png | Bin 0 -> 172 bytes app/gui/oven_control/oven_control.pro | 9 +- app/gui/oven_control/resources.qrc | 1 + app/gui/oven_control/yesnopopupdlg.cpp | 32 +++ app/gui/oven_control/yesnopopupdlg.h | 27 +++ app/gui/oven_control/yesnopopupdlg.ui | 136 +++++++++++ 11 files changed, 472 insertions(+), 12 deletions(-) create mode 100644 app/gui/oven_control/images/config/service/adjustment_line.png create mode 100644 app/gui/oven_control/yesnopopupdlg.cpp create mode 100644 app/gui/oven_control/yesnopopupdlg.h create mode 100644 app/gui/oven_control/yesnopopupdlg.ui diff --git a/app/gui/oven_control/adjustmentwindow.cpp b/app/gui/oven_control/adjustmentwindow.cpp index 3df378d..cb87045 100644 --- a/app/gui/oven_control/adjustmentwindow.cpp +++ b/app/gui/oven_control/adjustmentwindow.cpp @@ -1,5 +1,7 @@ +#include #include "adjustmentwindow.h" #include "ui_adjustmentwindow.h" +#include "yesnopopupdlg.h" AdjustmentWindow::AdjustmentWindow(QWidget *parent) : QMainWindow(parent), @@ -12,3 +14,16 @@ AdjustmentWindow::~AdjustmentWindow() { delete ui; } + +void AdjustmentWindow::on_btnAdjust_clicked() +{ + YesNoPopupDlg* w = new YesNoPopupDlg(this,tr("모든 설정 값을 공장(출고)초기화\n값으로 변경 하시겠습니까?")); + w->raise(); + int dlgrst = w->exec(); + dlgrst = w->result(); + if(dlgrst == QDialog::Accepted) { + //Process Init Value; + qDebug() << "Accepted"; + } + else qDebug() <<"Rejected"; +} diff --git a/app/gui/oven_control/adjustmentwindow.h b/app/gui/oven_control/adjustmentwindow.h index 1b70686..e704ffa 100644 --- a/app/gui/oven_control/adjustmentwindow.h +++ b/app/gui/oven_control/adjustmentwindow.h @@ -15,6 +15,9 @@ public: explicit AdjustmentWindow(QWidget *parent = 0); ~AdjustmentWindow(); +private slots: + void on_btnAdjust_clicked(); + private: Ui::AdjustmentWindow *ui; }; diff --git a/app/gui/oven_control/adjustmentwindow.ui b/app/gui/oven_control/adjustmentwindow.ui index 0e0d312..76a1fd5 100644 --- a/app/gui/oven_control/adjustmentwindow.ui +++ b/app/gui/oven_control/adjustmentwindow.ui @@ -1,24 +1,256 @@ + - - - AdjustmentWindow 0 0 - 800 - 600 + 900 + 1600 MainWindow - - - + + #centralwidget { background-image: url(:/images/background/config_service.png); } +#bottomBar { background-image: url(:/images/bottom_bar/background.png); } + + + + + + + + + 0 + 0 + 900 + 426 + + + + + #clockContainer { background-image: url(:/images/clock/background.png); } + + + + + 272 + 36 + 356 + 355 + + + + + + + + + + 55 + 426 + 900 + 84 + + + + + Malgun Gothic + 11 + + + + color: rgb(255, 255, 255); + + + 서비스단계(엔지니어모드) > 교정 + + + + + + 0 + 1450 + 900 + 150 + + + + + + 401 + 26 + 97 + 97 + + + + + 0 + 0 + + + + QPushButton { border-image: url(:/images/bottom_bar/back.png); } +QPushButton:pressed { border-image: url(:/images/bottom_bar/back_ov.png); } + + + + + + + + + + 40 + 545 + 821 + 66 + + + + + 0 + + + + + false + + + + 0 + 0 + + + + + Roboto + 10 + 75 + true + false + + + + QPushButton { border-image: url(:/images/config/pannel.png);color: rgb(255, 255, 255); } +QPushButton:pressed { border-image: url(:/images/config/pannel_ov.png); } +QPushButton { text-align: left;} + + + + 교정 + + + + + + + true + + + + Malgun Gothic + 11 + 75 + true + + + + color: rgb(255, 255, 255); + + + EM-1 + + + Qt::AlignCenter + + + 0 + + + + + + + + + 124 + 630 + 379 + 70 + + + + + 0 + 0 + + + + + Roboto + 10 + 75 + true + false + + + + QPushButton { border-image: url(:/images/config/service/089_set_window_all.png); } +QPushButton:pressed { border-image: url(:/images/config/service/089_set_window_all_ov.png); } +QPushButton { + text-align: right; + padding-right : 20px; +} + + + 0/ 00:00 + + + + 32 + 32 + + + + + + + 100 + 606 + 28 + 61 + + + + + + + :/images/config/service/adjustment_line.png + + + label + upperStack + label_15 + bottomBar + gridLayoutWidget + btnAdjust + - + + + Clock + QWidget +
clock.h
+ 1 +
+
+ + +
diff --git a/app/gui/oven_control/engineermenuwindow.cpp b/app/gui/oven_control/engineermenuwindow.cpp index 845e9cc..671d195 100644 --- a/app/gui/oven_control/engineermenuwindow.cpp +++ b/app/gui/oven_control/engineermenuwindow.cpp @@ -5,6 +5,7 @@ #include "realtimemain.h" #include "functiontestwindow.h" #include "ovenstatics.h" +#include "adjustmentwindow.h" EngineerMenuWindow::EngineerMenuWindow(QWidget *parent) : QMainWindow(parent), @@ -52,3 +53,11 @@ void EngineerMenuWindow::on_functionTestButton_clicked() w->showFullScreen(); w->raise(); } + +void EngineerMenuWindow::on_engAdjustButton_clicked() +{ + AdjustmentWindow *w = new AdjustmentWindow(this); + w->setWindowModality(Qt::WindowModal); + w->showFullScreen(); + w->raise(); +} diff --git a/app/gui/oven_control/engineermenuwindow.h b/app/gui/oven_control/engineermenuwindow.h index 1f208bb..71073c8 100644 --- a/app/gui/oven_control/engineermenuwindow.h +++ b/app/gui/oven_control/engineermenuwindow.h @@ -24,6 +24,8 @@ private slots: void on_functionTestButton_clicked(); + void on_engAdjustButton_clicked(); + private: Ui::EngineerMenuWindow *ui; }; diff --git a/app/gui/oven_control/images/config/service/adjustment_line.png b/app/gui/oven_control/images/config/service/adjustment_line.png new file mode 100644 index 0000000000000000000000000000000000000000..2c4758dfab89d14f5dad4b1e082b7319891dde0d GIT binary patch literal 172 zcmeAS@N?(olHy`uVBq!ia0vp^GC*v}!3HE%bG!wC6kC$Fy9>jA5L~c#`DCC7XMsm# zF#`j)FbFd;%$g$s6l5>)^mS!_$Rf(hXX;zvu?8q)>FMGa5^?zLO-5b@1%|^Ln(NOW zKPo)woCB*)?(9VK#|;h&0vs$%jmXqLrg>ktSM)CA$hgQI&I>ez!PC{xWt~$(6961} BER_HN literal 0 HcmV?d00001 diff --git a/app/gui/oven_control/oven_control.pro b/app/gui/oven_control/oven_control.pro index 11fb72d..b7c4052 100644 --- a/app/gui/oven_control/oven_control.pro +++ b/app/gui/oven_control/oven_control.pro @@ -61,7 +61,8 @@ SOURCES += main.cpp\ bulletindicator.cpp \ soundplayer.cpp \ servicedata.cpp \ - adjustmentwindow.cpp + adjustmentwindow.cpp \ + yesnopopupdlg.cpp HEADERS += mainwindow.h \ cook.h \ @@ -112,7 +113,8 @@ HEADERS += mainwindow.h \ bulletindicator.h \ soundplayer.h \ servicedata.h \ - adjustmentwindow.h + adjustmentwindow.h \ + yesnopopupdlg.h FORMS += mainwindow.ui \ manualcookwindow.ui \ @@ -142,7 +144,8 @@ FORMS += mainwindow.ui \ realtimemain.ui \ realtimepartswindow.ui \ realtimesensorwindow.ui \ - adjustmentwindow.ui + adjustmentwindow.ui \ + yesnopopupdlg.ui RESOURCES += \ resources.qrc diff --git a/app/gui/oven_control/resources.qrc b/app/gui/oven_control/resources.qrc index 85ff0f3..5d8a35f 100644 --- a/app/gui/oven_control/resources.qrc +++ b/app/gui/oven_control/resources.qrc @@ -431,5 +431,6 @@ images/config/service/realtime_menu_line.png images/config/service/realtime_parts_bgnd.png images/config/service/realtime_sensor_bgnd.png + images/config/service/adjustment_line.png diff --git a/app/gui/oven_control/yesnopopupdlg.cpp b/app/gui/oven_control/yesnopopupdlg.cpp new file mode 100644 index 0000000..05ea5a6 --- /dev/null +++ b/app/gui/oven_control/yesnopopupdlg.cpp @@ -0,0 +1,32 @@ +#include "yesnopopupdlg.h" +#include "ui_yesnopopupdlg.h" + +YesNoPopupDlg::YesNoPopupDlg(QWidget *parent, QString strDesc) : + QDialog(parent), + ui(new Ui::YesNoPopupDlg) +{ + ui->setupUi(this); + this->setAttribute( Qt::WA_TranslucentBackground); + this->setAttribute( Qt::WA_DeleteOnClose); + this->setWindowFlags(Qt::FramelessWindowHint); + + ui->ctrLbDesc->setText(strDesc); + +} + +YesNoPopupDlg::~YesNoPopupDlg() +{ + delete ui; +} + +void YesNoPopupDlg::on_ctrBtnYes_clicked() +{ + this->accept(); + +} + +void YesNoPopupDlg::on_ctrBtnNo_clicked() +{ + this->reject(); + +} diff --git a/app/gui/oven_control/yesnopopupdlg.h b/app/gui/oven_control/yesnopopupdlg.h new file mode 100644 index 0000000..ce92bfc --- /dev/null +++ b/app/gui/oven_control/yesnopopupdlg.h @@ -0,0 +1,27 @@ +#ifndef YESNOPOPUPDLG_H +#define YESNOPOPUPDLG_H + +#include + +namespace Ui { +class YesNoPopupDlg; +} + +class YesNoPopupDlg : public QDialog +{ + Q_OBJECT + +public: + explicit YesNoPopupDlg(QWidget *parent = 0, QString strDesc=""); + ~YesNoPopupDlg(); + +private slots: + void on_ctrBtnYes_clicked(); + + void on_ctrBtnNo_clicked(); + +private: + Ui::YesNoPopupDlg *ui; +}; + +#endif // YESNOPOPUPDLG_H diff --git a/app/gui/oven_control/yesnopopupdlg.ui b/app/gui/oven_control/yesnopopupdlg.ui new file mode 100644 index 0000000..09a7038 --- /dev/null +++ b/app/gui/oven_control/yesnopopupdlg.ui @@ -0,0 +1,136 @@ + + + YesNoPopupDlg + + + + 0 + 0 + 900 + 503 + + + + Dialog + + + #centralWidget { background-image: url(:/images/background/popup/503.png); +} + + + + + 0 + 0 + 900 + 503 + + + + + + + + + 422 + 362 + 128 + 70 + + + + + 75 + true + true + + + + QPushButton{ +border : none; +color : white; +} +QPushButton::pressed {color : yellow} + + + + + + + + + 572 + 362 + 128 + 70 + + + + + 75 + true + true + + + + QPushButton{ +border : none; +color : white; +} +QPushButton::pressed {color : yellow} + + + 아니오 + + + + + + 415 + 99 + 61 + 51 + + + + + + + :/images/symbol/warning.png + + + + + + 0 + 150 + 900 + 201 + + + + + 나눔고딕 + 14 + + + + QLabel { + color : white; + border : none; +} + + + TextLabel + + + Qt::AlignCenter + + + + + + + + + -- 2.1.4