Commit c12e09d9ad83be590d7a1b1e1caa6b30273ca205
1 parent
1bb5ed9dc0
Exists in
master
and in
2 other branches
교정 UI 및 팝업 추가
- 교정 UI 화면 구현 - Yes, No 선택 팝업 화면 구현(return value)
Showing
11 changed files
with
472 additions
and
12 deletions
Show diff stats
app/gui/oven_control/adjustmentwindow.cpp
1 | +#include <qdebug.h> | |
1 | 2 | #include "adjustmentwindow.h" |
2 | 3 | #include "ui_adjustmentwindow.h" |
4 | +#include "yesnopopupdlg.h" | |
3 | 5 | |
4 | 6 | AdjustmentWindow::AdjustmentWindow(QWidget *parent) : |
5 | 7 | QMainWindow(parent), |
... | ... | @@ -12,3 +14,16 @@ AdjustmentWindow::~AdjustmentWindow() |
12 | 14 | { |
13 | 15 | delete ui; |
14 | 16 | } |
17 | + | |
18 | +void AdjustmentWindow::on_btnAdjust_clicked() | |
19 | +{ | |
20 | + YesNoPopupDlg* w = new YesNoPopupDlg(this,tr("모든 설정 값을 공장(출고)초기화\n값으로 변경 하시겠습니까?")); | |
21 | + w->raise(); | |
22 | + int dlgrst = w->exec(); | |
23 | + dlgrst = w->result(); | |
24 | + if(dlgrst == QDialog::Accepted) { | |
25 | + //Process Init Value; | |
26 | + qDebug() << "Accepted"; | |
27 | + } | |
28 | + else qDebug() <<"Rejected"; | |
29 | +} | ... | ... |
app/gui/oven_control/adjustmentwindow.h
app/gui/oven_control/adjustmentwindow.ui
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
1 | 2 | <ui version="4.0"> |
2 | - <author/> | |
3 | - <comment/> | |
4 | - <exportmacro/> | |
5 | 3 | <class>AdjustmentWindow</class> |
6 | 4 | <widget class="QMainWindow" name="AdjustmentWindow"> |
7 | 5 | <property name="geometry"> |
8 | 6 | <rect> |
9 | 7 | <x>0</x> |
10 | 8 | <y>0</y> |
11 | - <width>800</width> | |
12 | - <height>600</height> | |
9 | + <width>900</width> | |
10 | + <height>1600</height> | |
13 | 11 | </rect> |
14 | 12 | </property> |
15 | 13 | <property name="windowTitle"> |
16 | 14 | <string>MainWindow</string> |
17 | 15 | </property> |
18 | - <widget class="QMenuBar" name="menubar"/> | |
19 | - <widget class="QWidget" name="centralwidget"/> | |
20 | - <widget class="QStatusBar" name="statusbar"/> | |
16 | + <property name="styleSheet"> | |
17 | + <string notr="true">#centralwidget { background-image: url(:/images/background/config_service.png); } | |
18 | +#bottomBar { background-image: url(:/images/bottom_bar/background.png); }</string> | |
19 | + </property> | |
20 | + <widget class="QWidget" name="centralwidget"> | |
21 | + <property name="styleSheet"> | |
22 | + <string notr="true"/> | |
23 | + </property> | |
24 | + <widget class="QStackedWidget" name="upperStack"> | |
25 | + <property name="geometry"> | |
26 | + <rect> | |
27 | + <x>0</x> | |
28 | + <y>0</y> | |
29 | + <width>900</width> | |
30 | + <height>426</height> | |
31 | + </rect> | |
32 | + </property> | |
33 | + <widget class="QWidget" name="clockContainer"> | |
34 | + <property name="styleSheet"> | |
35 | + <string notr="true">#clockContainer { background-image: url(:/images/clock/background.png); }</string> | |
36 | + </property> | |
37 | + <widget class="Clock" name="clock" native="true"> | |
38 | + <property name="geometry"> | |
39 | + <rect> | |
40 | + <x>272</x> | |
41 | + <y>36</y> | |
42 | + <width>356</width> | |
43 | + <height>355</height> | |
44 | + </rect> | |
45 | + </property> | |
46 | + </widget> | |
47 | + </widget> | |
48 | + <widget class="QWidget" name="page_2"/> | |
49 | + </widget> | |
50 | + <widget class="QLabel" name="label_15"> | |
51 | + <property name="geometry"> | |
52 | + <rect> | |
53 | + <x>55</x> | |
54 | + <y>426</y> | |
55 | + <width>900</width> | |
56 | + <height>84</height> | |
57 | + </rect> | |
58 | + </property> | |
59 | + <property name="font"> | |
60 | + <font> | |
61 | + <family>Malgun Gothic</family> | |
62 | + <pointsize>11</pointsize> | |
63 | + </font> | |
64 | + </property> | |
65 | + <property name="styleSheet"> | |
66 | + <string notr="true">color: rgb(255, 255, 255);</string> | |
67 | + </property> | |
68 | + <property name="text"> | |
69 | + <string>서비스단계(엔지니어모드) > 교정</string> | |
70 | + </property> | |
71 | + </widget> | |
72 | + <widget class="QWidget" name="bottomBar" native="true"> | |
73 | + <property name="geometry"> | |
74 | + <rect> | |
75 | + <x>0</x> | |
76 | + <y>1450</y> | |
77 | + <width>900</width> | |
78 | + <height>150</height> | |
79 | + </rect> | |
80 | + </property> | |
81 | + <widget class="QPushButton" name="backButton"> | |
82 | + <property name="geometry"> | |
83 | + <rect> | |
84 | + <x>401</x> | |
85 | + <y>26</y> | |
86 | + <width>97</width> | |
87 | + <height>97</height> | |
88 | + </rect> | |
89 | + </property> | |
90 | + <property name="sizePolicy"> | |
91 | + <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> | |
92 | + <horstretch>0</horstretch> | |
93 | + <verstretch>0</verstretch> | |
94 | + </sizepolicy> | |
95 | + </property> | |
96 | + <property name="styleSheet"> | |
97 | + <string notr="true">QPushButton { border-image: url(:/images/bottom_bar/back.png); } | |
98 | +QPushButton:pressed { border-image: url(:/images/bottom_bar/back_ov.png); }</string> | |
99 | + </property> | |
100 | + <property name="text"> | |
101 | + <string/> | |
102 | + </property> | |
103 | + </widget> | |
104 | + </widget> | |
105 | + <widget class="QWidget" name="gridLayoutWidget"> | |
106 | + <property name="geometry"> | |
107 | + <rect> | |
108 | + <x>40</x> | |
109 | + <y>545</y> | |
110 | + <width>821</width> | |
111 | + <height>66</height> | |
112 | + </rect> | |
113 | + </property> | |
114 | + <layout class="QGridLayout" name="gridLayout" columnstretch="67,33"> | |
115 | + <property name="spacing"> | |
116 | + <number>0</number> | |
117 | + </property> | |
118 | + <item row="0" column="0" colspan="2"> | |
119 | + <widget class="QPushButton" name="button"> | |
120 | + <property name="enabled"> | |
121 | + <bool>false</bool> | |
122 | + </property> | |
123 | + <property name="sizePolicy"> | |
124 | + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> | |
125 | + <horstretch>0</horstretch> | |
126 | + <verstretch>0</verstretch> | |
127 | + </sizepolicy> | |
128 | + </property> | |
129 | + <property name="font"> | |
130 | + <font> | |
131 | + <family>Roboto</family> | |
132 | + <pointsize>10</pointsize> | |
133 | + <weight>75</weight> | |
134 | + <bold>true</bold> | |
135 | + <underline>false</underline> | |
136 | + </font> | |
137 | + </property> | |
138 | + <property name="styleSheet"> | |
139 | + <string notr="true">QPushButton { border-image: url(:/images/config/pannel.png);color: rgb(255, 255, 255); } | |
140 | +QPushButton:pressed { border-image: url(:/images/config/pannel_ov.png); } | |
141 | +QPushButton { text-align: left;} | |
142 | +</string> | |
143 | + </property> | |
144 | + <property name="text"> | |
145 | + <string> 교정</string> | |
146 | + </property> | |
147 | + </widget> | |
148 | + </item> | |
149 | + <item row="0" column="1"> | |
150 | + <widget class="QLabel" name="label_17"> | |
151 | + <property name="enabled"> | |
152 | + <bool>true</bool> | |
153 | + </property> | |
154 | + <property name="font"> | |
155 | + <font> | |
156 | + <family>Malgun Gothic</family> | |
157 | + <pointsize>11</pointsize> | |
158 | + <weight>75</weight> | |
159 | + <bold>true</bold> | |
160 | + </font> | |
161 | + </property> | |
162 | + <property name="styleSheet"> | |
163 | + <string notr="true">color: rgb(255, 255, 255);</string> | |
164 | + </property> | |
165 | + <property name="text"> | |
166 | + <string>EM-1</string> | |
167 | + </property> | |
168 | + <property name="alignment"> | |
169 | + <set>Qt::AlignCenter</set> | |
170 | + </property> | |
171 | + <property name="margin"> | |
172 | + <number>0</number> | |
173 | + </property> | |
174 | + </widget> | |
175 | + </item> | |
176 | + </layout> | |
177 | + </widget> | |
178 | + <widget class="QPushButton" name="btnAdjust"> | |
179 | + <property name="geometry"> | |
180 | + <rect> | |
181 | + <x>124</x> | |
182 | + <y>630</y> | |
183 | + <width>379</width> | |
184 | + <height>70</height> | |
185 | + </rect> | |
186 | + </property> | |
187 | + <property name="sizePolicy"> | |
188 | + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> | |
189 | + <horstretch>0</horstretch> | |
190 | + <verstretch>0</verstretch> | |
191 | + </sizepolicy> | |
192 | + </property> | |
193 | + <property name="font"> | |
194 | + <font> | |
195 | + <family>Roboto</family> | |
196 | + <pointsize>10</pointsize> | |
197 | + <weight>75</weight> | |
198 | + <bold>true</bold> | |
199 | + <underline>false</underline> | |
200 | + </font> | |
201 | + </property> | |
202 | + <property name="styleSheet"> | |
203 | + <string notr="true">QPushButton { border-image: url(:/images/config/service/089_set_window_all.png); } | |
204 | +QPushButton:pressed { border-image: url(:/images/config/service/089_set_window_all_ov.png); } | |
205 | +QPushButton { | |
206 | + text-align: right; | |
207 | + padding-right : 20px; | |
208 | +}</string> | |
209 | + </property> | |
210 | + <property name="text"> | |
211 | + <string>0/ 00:00</string> | |
212 | + </property> | |
213 | + <property name="iconSize"> | |
214 | + <size> | |
215 | + <width>32</width> | |
216 | + <height>32</height> | |
217 | + </size> | |
218 | + </property> | |
219 | + </widget> | |
220 | + <widget class="QLabel" name="label"> | |
221 | + <property name="geometry"> | |
222 | + <rect> | |
223 | + <x>100</x> | |
224 | + <y>606</y> | |
225 | + <width>28</width> | |
226 | + <height>61</height> | |
227 | + </rect> | |
228 | + </property> | |
229 | + <property name="text"> | |
230 | + <string/> | |
231 | + </property> | |
232 | + <property name="pixmap"> | |
233 | + <pixmap resource="resources.qrc">:/images/config/service/adjustment_line.png</pixmap> | |
234 | + </property> | |
235 | + </widget> | |
236 | + <zorder>label</zorder> | |
237 | + <zorder>upperStack</zorder> | |
238 | + <zorder>label_15</zorder> | |
239 | + <zorder>bottomBar</zorder> | |
240 | + <zorder>gridLayoutWidget</zorder> | |
241 | + <zorder>btnAdjust</zorder> | |
242 | + </widget> | |
21 | 243 | </widget> |
22 | - <pixmapfunction/> | |
244 | + <customwidgets> | |
245 | + <customwidget> | |
246 | + <class>Clock</class> | |
247 | + <extends>QWidget</extends> | |
248 | + <header>clock.h</header> | |
249 | + <container>1</container> | |
250 | + </customwidget> | |
251 | + </customwidgets> | |
252 | + <resources> | |
253 | + <include location="resources.qrc"/> | |
254 | + </resources> | |
23 | 255 | <connections/> |
24 | 256 | </ui> | ... | ... |
app/gui/oven_control/engineermenuwindow.cpp
... | ... | @@ -5,6 +5,7 @@ |
5 | 5 | #include "realtimemain.h" |
6 | 6 | #include "functiontestwindow.h" |
7 | 7 | #include "ovenstatics.h" |
8 | +#include "adjustmentwindow.h" | |
8 | 9 | |
9 | 10 | EngineerMenuWindow::EngineerMenuWindow(QWidget *parent) : |
10 | 11 | QMainWindow(parent), |
... | ... | @@ -52,3 +53,11 @@ void EngineerMenuWindow::on_functionTestButton_clicked() |
52 | 53 | w->showFullScreen(); |
53 | 54 | w->raise(); |
54 | 55 | } |
56 | + | |
57 | +void EngineerMenuWindow::on_engAdjustButton_clicked() | |
58 | +{ | |
59 | + AdjustmentWindow *w = new AdjustmentWindow(this); | |
60 | + w->setWindowModality(Qt::WindowModal); | |
61 | + w->showFullScreen(); | |
62 | + w->raise(); | |
63 | +} | ... | ... |
app/gui/oven_control/engineermenuwindow.h
app/gui/oven_control/images/config/service/adjustment_line.png
172 Bytes
app/gui/oven_control/oven_control.pro
... | ... | @@ -61,7 +61,8 @@ SOURCES += main.cpp\ |
61 | 61 | bulletindicator.cpp \ |
62 | 62 | soundplayer.cpp \ |
63 | 63 | servicedata.cpp \ |
64 | - adjustmentwindow.cpp | |
64 | + adjustmentwindow.cpp \ | |
65 | + yesnopopupdlg.cpp | |
65 | 66 | |
66 | 67 | HEADERS += mainwindow.h \ |
67 | 68 | cook.h \ |
... | ... | @@ -112,7 +113,8 @@ HEADERS += mainwindow.h \ |
112 | 113 | bulletindicator.h \ |
113 | 114 | soundplayer.h \ |
114 | 115 | servicedata.h \ |
115 | - adjustmentwindow.h | |
116 | + adjustmentwindow.h \ | |
117 | + yesnopopupdlg.h | |
116 | 118 | |
117 | 119 | FORMS += mainwindow.ui \ |
118 | 120 | manualcookwindow.ui \ |
... | ... | @@ -142,7 +144,8 @@ FORMS += mainwindow.ui \ |
142 | 144 | realtimemain.ui \ |
143 | 145 | realtimepartswindow.ui \ |
144 | 146 | realtimesensorwindow.ui \ |
145 | - adjustmentwindow.ui | |
147 | + adjustmentwindow.ui \ | |
148 | + yesnopopupdlg.ui | |
146 | 149 | |
147 | 150 | RESOURCES += \ |
148 | 151 | resources.qrc | ... | ... |
app/gui/oven_control/resources.qrc
... | ... | @@ -431,5 +431,6 @@ |
431 | 431 | <file>images/config/service/realtime_menu_line.png</file> |
432 | 432 | <file>images/config/service/realtime_parts_bgnd.png</file> |
433 | 433 | <file>images/config/service/realtime_sensor_bgnd.png</file> |
434 | + <file>images/config/service/adjustment_line.png</file> | |
434 | 435 | </qresource> |
435 | 436 | </RCC> | ... | ... |
app/gui/oven_control/yesnopopupdlg.cpp
... | ... | @@ -0,0 +1,32 @@ |
1 | +#include "yesnopopupdlg.h" | |
2 | +#include "ui_yesnopopupdlg.h" | |
3 | + | |
4 | +YesNoPopupDlg::YesNoPopupDlg(QWidget *parent, QString strDesc) : | |
5 | + QDialog(parent), | |
6 | + ui(new Ui::YesNoPopupDlg) | |
7 | +{ | |
8 | + ui->setupUi(this); | |
9 | + this->setAttribute( Qt::WA_TranslucentBackground); | |
10 | + this->setAttribute( Qt::WA_DeleteOnClose); | |
11 | + this->setWindowFlags(Qt::FramelessWindowHint); | |
12 | + | |
13 | + ui->ctrLbDesc->setText(strDesc); | |
14 | + | |
15 | +} | |
16 | + | |
17 | +YesNoPopupDlg::~YesNoPopupDlg() | |
18 | +{ | |
19 | + delete ui; | |
20 | +} | |
21 | + | |
22 | +void YesNoPopupDlg::on_ctrBtnYes_clicked() | |
23 | +{ | |
24 | + this->accept(); | |
25 | + | |
26 | +} | |
27 | + | |
28 | +void YesNoPopupDlg::on_ctrBtnNo_clicked() | |
29 | +{ | |
30 | + this->reject(); | |
31 | + | |
32 | +} | ... | ... |
app/gui/oven_control/yesnopopupdlg.h
... | ... | @@ -0,0 +1,27 @@ |
1 | +#ifndef YESNOPOPUPDLG_H | |
2 | +#define YESNOPOPUPDLG_H | |
3 | + | |
4 | +#include <QDialog> | |
5 | + | |
6 | +namespace Ui { | |
7 | +class YesNoPopupDlg; | |
8 | +} | |
9 | + | |
10 | +class YesNoPopupDlg : public QDialog | |
11 | +{ | |
12 | + Q_OBJECT | |
13 | + | |
14 | +public: | |
15 | + explicit YesNoPopupDlg(QWidget *parent = 0, QString strDesc=""); | |
16 | + ~YesNoPopupDlg(); | |
17 | + | |
18 | +private slots: | |
19 | + void on_ctrBtnYes_clicked(); | |
20 | + | |
21 | + void on_ctrBtnNo_clicked(); | |
22 | + | |
23 | +private: | |
24 | + Ui::YesNoPopupDlg *ui; | |
25 | +}; | |
26 | + | |
27 | +#endif // YESNOPOPUPDLG_H | ... | ... |
app/gui/oven_control/yesnopopupdlg.ui
... | ... | @@ -0,0 +1,136 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<ui version="4.0"> | |
3 | + <class>YesNoPopupDlg</class> | |
4 | + <widget class="QDialog" name="YesNoPopupDlg"> | |
5 | + <property name="geometry"> | |
6 | + <rect> | |
7 | + <x>0</x> | |
8 | + <y>0</y> | |
9 | + <width>900</width> | |
10 | + <height>503</height> | |
11 | + </rect> | |
12 | + </property> | |
13 | + <property name="windowTitle"> | |
14 | + <string>Dialog</string> | |
15 | + </property> | |
16 | + <property name="styleSheet"> | |
17 | + <string notr="true">#centralWidget { background-image: url(:/images/background/popup/503.png); | |
18 | +}</string> | |
19 | + </property> | |
20 | + <widget class="QWidget" name="centralWidget" native="true"> | |
21 | + <property name="geometry"> | |
22 | + <rect> | |
23 | + <x>0</x> | |
24 | + <y>0</y> | |
25 | + <width>900</width> | |
26 | + <height>503</height> | |
27 | + </rect> | |
28 | + </property> | |
29 | + <property name="styleSheet"> | |
30 | + <string notr="true"/> | |
31 | + </property> | |
32 | + <widget class="QPushButton" name="ctrBtnYes"> | |
33 | + <property name="geometry"> | |
34 | + <rect> | |
35 | + <x>422</x> | |
36 | + <y>362</y> | |
37 | + <width>128</width> | |
38 | + <height>70</height> | |
39 | + </rect> | |
40 | + </property> | |
41 | + <property name="font"> | |
42 | + <font> | |
43 | + <weight>75</weight> | |
44 | + <bold>true</bold> | |
45 | + <underline>true</underline> | |
46 | + </font> | |
47 | + </property> | |
48 | + <property name="styleSheet"> | |
49 | + <string notr="true">QPushButton{ | |
50 | +border : none; | |
51 | +color : white; | |
52 | +} | |
53 | +QPushButton::pressed {color : yellow}</string> | |
54 | + </property> | |
55 | + <property name="text"> | |
56 | + <string>예</string> | |
57 | + </property> | |
58 | + </widget> | |
59 | + <widget class="QPushButton" name="ctrBtnNo"> | |
60 | + <property name="geometry"> | |
61 | + <rect> | |
62 | + <x>572</x> | |
63 | + <y>362</y> | |
64 | + <width>128</width> | |
65 | + <height>70</height> | |
66 | + </rect> | |
67 | + </property> | |
68 | + <property name="font"> | |
69 | + <font> | |
70 | + <weight>75</weight> | |
71 | + <bold>true</bold> | |
72 | + <underline>true</underline> | |
73 | + </font> | |
74 | + </property> | |
75 | + <property name="styleSheet"> | |
76 | + <string notr="true">QPushButton{ | |
77 | +border : none; | |
78 | +color : white; | |
79 | +} | |
80 | +QPushButton::pressed {color : yellow}</string> | |
81 | + </property> | |
82 | + <property name="text"> | |
83 | + <string>아니오</string> | |
84 | + </property> | |
85 | + </widget> | |
86 | + <widget class="QLabel" name="label"> | |
87 | + <property name="geometry"> | |
88 | + <rect> | |
89 | + <x>415</x> | |
90 | + <y>99</y> | |
91 | + <width>61</width> | |
92 | + <height>51</height> | |
93 | + </rect> | |
94 | + </property> | |
95 | + <property name="text"> | |
96 | + <string/> | |
97 | + </property> | |
98 | + <property name="pixmap"> | |
99 | + <pixmap resource="resources.qrc">:/images/symbol/warning.png</pixmap> | |
100 | + </property> | |
101 | + </widget> | |
102 | + <widget class="QLabel" name="ctrLbDesc"> | |
103 | + <property name="geometry"> | |
104 | + <rect> | |
105 | + <x>0</x> | |
106 | + <y>150</y> | |
107 | + <width>900</width> | |
108 | + <height>201</height> | |
109 | + </rect> | |
110 | + </property> | |
111 | + <property name="font"> | |
112 | + <font> | |
113 | + <family>나눔고딕</family> | |
114 | + <pointsize>14</pointsize> | |
115 | + </font> | |
116 | + </property> | |
117 | + <property name="styleSheet"> | |
118 | + <string notr="true">QLabel { | |
119 | + color : white; | |
120 | + border : none; | |
121 | +}</string> | |
122 | + </property> | |
123 | + <property name="text"> | |
124 | + <string>TextLabel</string> | |
125 | + </property> | |
126 | + <property name="alignment"> | |
127 | + <set>Qt::AlignCenter</set> | |
128 | + </property> | |
129 | + </widget> | |
130 | + </widget> | |
131 | + </widget> | |
132 | + <resources> | |
133 | + <include location="resources.qrc"/> | |
134 | + </resources> | |
135 | + <connections/> | |
136 | +</ui> | ... | ... |