Commit 93740918678bd050c5076f69754c06a3ff0a368c
1 parent
f588aa273e
Exists in
master
and in
2 other branches
config enum 설정 진행 중 요청으로 푸시
Showing
16 changed files
with
406 additions
and
49 deletions
Show diff stats
app/gui/oven_control/adjustmentwindow.cpp
... | ... | @@ -21,7 +21,7 @@ AdjustmentWindow::~AdjustmentWindow() |
21 | 21 | void AdjustmentWindow::on_btnAdjust_clicked() |
22 | 22 | { |
23 | 23 | YesNoPopupDlg* w = new YesNoPopupDlg(this,tr("모든 설정 값을 공장(출고)초기화\n값으로 변경 하시겠습니까?")); |
24 | - w->raise(); | |
24 | + //w->raise(); | |
25 | 25 | int dlgrst = w->exec(); |
26 | 26 | dlgrst = w->result(); |
27 | 27 | if(dlgrst == QDialog::Accepted) { | ... | ... |
app/gui/oven_control/config.cpp
... | ... | @@ -8,6 +8,8 @@ |
8 | 8 | #include "configtimeformatdlg.h" |
9 | 9 | #include "configresttimeformatdlg.h" |
10 | 10 | #include "configmastervolumedlg.h" |
11 | +#include "configsoundselelectdlg.h" | |
12 | +#include "yesnopopupdlg.h" | |
11 | 13 | |
12 | 14 | using namespace Define; |
13 | 15 | |
... | ... | @@ -73,6 +75,9 @@ QString Config::getValueString(Define::ConfigType idx){ |
73 | 75 | break; |
74 | 76 | case 2: |
75 | 77 | qstrTemp = tr(config_format[(uint32_t)idx]); |
78 | + case 3: | |
79 | + qstrTemp.sprintf(config_format[(uint32_t)idx], configlist.values[(uint32_t)idx].d32+1); | |
80 | + break; | |
76 | 81 | } |
77 | 82 | return qstrTemp; |
78 | 83 | } |
... | ... | @@ -109,6 +114,9 @@ QString Config::getValueString(Define::ConfigType idx){ |
109 | 114 | if(configlist.items.resttime_format.d32 >=2) configlist.items.resttime_format.d32 = 0; |
110 | 115 | qstrTemp = tr(rest_time_type_menu[configlist.items.resttime_format.d32]); |
111 | 116 | break; |
117 | + case config_ip: | |
118 | + qstrTemp.sprintf("%3d.%3d.%3d.%3d", configlist.items.ip.d8.d8_0,configlist.items.ip.d8.d8_1,configlist.items.ip.d8.d8_2,configlist.items.ip.d8.d8_3); | |
119 | + break; | |
112 | 120 | default: |
113 | 121 | break; |
114 | 122 | } |
... | ... | @@ -188,11 +196,27 @@ void Config::execConfigWindow(QWidget *parent, Define::ConfigType idx){ |
188 | 196 | case config_marster_vol: |
189 | 197 | dlg = new ConfigMasterVolumeDlg(parent); |
190 | 198 | break; |
199 | + case config_keypad_sound1: | |
200 | + case config_keypad_sound2: | |
201 | + case config_request_loadexec: | |
202 | + case config_programstep_finish: | |
203 | + case config_cooktime_finish: | |
204 | + case config_stoperror_distinguish: | |
205 | + dlg = new ConfigSoundSelelectDlg(parent,idx); | |
206 | + break; | |
207 | + case config_sound_factory_reset: | |
208 | + dlg = new YesNoPopupDlg(parent, tr("모든 음향설정 값을 공장초기화\r하시겠습니까?")); | |
209 | + break; | |
191 | 210 | } |
192 | - dlg->setWindowModality(Qt::ApplicationModal); | |
211 | + if(dlg == NULL) return; | |
212 | + dlg->setWindowModality(Qt::WindowModal); | |
193 | 213 | dlg->exec(); |
194 | 214 | if(dlg->result() == QDialog::Accepted){ |
195 | 215 | qDebug()<<"Accepted"; |
216 | + if(idx == config_sound_factory_reset){ | |
217 | + //Sound Fatory Reset | |
218 | + qDebug() << "Process Sound Config Reset"; | |
219 | + } | |
196 | 220 | } |
197 | 221 | else{ |
198 | 222 | qDebug() << "rejected"; | ... | ... |
app/gui/oven_control/config.h
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 | #define STRUCT_PACK __attribute__ ((packed)) |
9 | 9 | |
10 | 10 | |
11 | -#define MAX_CONFIG_COUNT 21 | |
11 | +#define MAX_CONFIG_COUNT 32 | |
12 | 12 | |
13 | 13 | namespace Define |
14 | 14 | { |
... | ... | @@ -34,6 +34,17 @@ namespace Define |
34 | 34 | config_cooktime_finish, |
35 | 35 | config_stoperror_distinguish, |
36 | 36 | config_sound_factory_reset, |
37 | + config_haccp_data_download, | |
38 | + config_info_data_download, | |
39 | + config_service_data_download, | |
40 | + config_program_download, | |
41 | + config_program_upload, | |
42 | + config_program_initialize, | |
43 | + config_ip, | |
44 | + config_gateway, | |
45 | + config_netmask, | |
46 | + config_set_download, | |
47 | + config_set_upload, | |
37 | 48 | config_invalid = 65535 |
38 | 49 | }; |
39 | 50 | |
... | ... | @@ -73,6 +84,17 @@ namespace Define |
73 | 84 | config_item cooktime_finish; |
74 | 85 | config_item stoperror_distinguish; |
75 | 86 | config_item sound_factory_reset; |
87 | + config_item haccp_data_download; | |
88 | + config_item info_data_download; | |
89 | + config_item service_data_download; | |
90 | + config_item program_download; | |
91 | + config_item program_upload; | |
92 | + config_item program_initialize; | |
93 | + config_item ip; | |
94 | + config_item gateway; | |
95 | + config_item netmask; | |
96 | + config_item set_download; | |
97 | + config_item set_upload; | |
76 | 98 | }items; |
77 | 99 | }STRUCT_PACK config_lists; |
78 | 100 | |
... | ... | @@ -87,6 +109,11 @@ namespace Define |
87 | 109 | "am/pm\0" |
88 | 110 | }; |
89 | 111 | |
112 | + enum temp_type{ | |
113 | + temp_type_c=0, | |
114 | + temp_type_f, | |
115 | + }; | |
116 | + | |
90 | 117 | const char temptype_menu[2][16]{ |
91 | 118 | "섭씨(℃)\0", |
92 | 119 | "화씨(℉)\0" |
... | ... | @@ -99,7 +126,10 @@ namespace Define |
99 | 126 | "1100g" |
100 | 127 | }; |
101 | 128 | |
102 | - | |
129 | + enum rest_time_type{ | |
130 | + rest_time_rest=0, | |
131 | + rest_time_target | |
132 | + }; | |
103 | 133 | |
104 | 134 | const char rest_time_type_menu[2][16] = { |
105 | 135 | "잔여시간\0", |
... | ... | @@ -129,10 +159,12 @@ class Config : public QObject |
129 | 159 | * 0 = int |
130 | 160 | * 1 = float |
131 | 161 | * 2 = only String, |
162 | + * 3 = int +1 | |
132 | 163 | */ |
133 | 164 | const uint8_t config_data_type[MAX_CONFIG_COUNT] = { |
134 | 165 | 0x80, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, 0x80, 0x80, 0x80, //Settings |
135 | - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02 | |
166 | + 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, | |
167 | + 0x02, 0x02, 0x02,0x02, 0x02,0x02, 0x80, 0x80, 0x80, 0x02, 0x02 | |
136 | 168 | }; |
137 | 169 | |
138 | 170 | const char config_format_kr[MAX_CONFIG_COUNT][64]={ |
... | ... | @@ -156,7 +188,18 @@ class Config : public QObject |
156 | 188 | "%d번", |
157 | 189 | "%d번", |
158 | 190 | "%d번", |
159 | - "공장초기화" | |
191 | + "공장초기화", | |
192 | + "USB 삽입", //config_haccp_data_download, | |
193 | + "USB 삽입", //config_info_data_download, | |
194 | + "USB 삽입", //config_service_data_download, | |
195 | + "USB 삽입", //config_program_download, | |
196 | + "USB 삽입", //config_program_upload, | |
197 | + "초기화", //config_program_initialize, | |
198 | + "%d.%d.%d.%d", //config_ip, | |
199 | + "%d.%d.%d.%d", //config_gateway, | |
200 | + "%d.%d.%d.%d", //config_netmask, | |
201 | + "USB 삽입", //config_set_download, | |
202 | + "USB 삽입", //config_set_upload, | |
160 | 203 | }; |
161 | 204 | |
162 | 205 | |
... | ... | @@ -179,11 +222,22 @@ class Config : public QObject |
179 | 222 | "마스터 볼륨", //13 |
180 | 223 | "키패드 소리 - 1", |
181 | 224 | "키패드 소리 - 2 ", //15 |
182 | - "프로그램 단계 종료", | |
183 | 225 | "적재/실행 요청", |
226 | + "프로그램 단계 종료", | |
184 | 227 | "조리시간 종료", |
185 | 228 | "과정 중단/오류 식별", //19 |
186 | - "음향설정 초기화" //20 | |
229 | + "음향설정 초기화", //20 | |
230 | + "HACCP 데이터 다운로드", //config_haccp_data_download, | |
231 | + "인포 데이터 다운로드", //config_info_data_download, | |
232 | + "서비스 데이터 다운로드", //config_service_data_download, | |
233 | + "프로그램 다운로드", //config_program_download, | |
234 | + "프로그램 업로드", //25 config_program_upload, | |
235 | + "모든 프로그램 삭제", //config_program_initialize, | |
236 | + "IP 주소", //config_ip, | |
237 | + "IP 게이트웨이", //config_gateway, | |
238 | + "IP 넷마스크", //config_netmask, | |
239 | + "기본설정 다운로드", //30 config_set_download, | |
240 | + "기본설정 업로드", //31 end of system config config_set_upload, | |
187 | 241 | }; |
188 | 242 | |
189 | 243 | QSet<uint32_t> m_setFavorite; | ... | ... |
app/gui/oven_control/configsoundselelectdlg.cpp
1 | +#include <QDebug> | |
1 | 2 | #include "configsoundselelectdlg.h" |
2 | 3 | #include "ui_configsoundselelectdlg.h" |
3 | 4 | |
5 | + | |
4 | 6 | ConfigSoundSelelectDlg::ConfigSoundSelelectDlg(QWidget *parent, ConfigType cfgtype) : |
5 | 7 | QDialog(parent), |
6 | 8 | ui(new Ui::ConfigSoundSelelectDlg) |
7 | 9 | { |
10 | + QString strTemp; | |
8 | 11 | Config* cfg = Config::getInstance(); |
9 | 12 | config_item item; |
10 | 13 | ui->setupUi(this); |
14 | + setWindowFlags(Qt::Widget | Qt::FramelessWindowHint); | |
15 | + setAttribute(Qt::WA_NoSystemBackground); | |
16 | + setAttribute(Qt::WA_TranslucentBackground); | |
17 | + setAttribute(Qt::WA_PaintOnScreen); | |
11 | 18 | |
12 | - switch(cfgtype){ | |
19 | + this->setAttribute( Qt::WA_DeleteOnClose); | |
20 | + | |
21 | + | |
22 | + m_nCfgType = cfgtype; | |
23 | + | |
24 | + ui->pushButton_1->setText(tr("Media 01")); | |
25 | + ui->pushButton_2->setText(tr("Media 02")); | |
26 | + ui->pushButton_3->setText(tr("Media 03")); | |
27 | + ui->pushButton_4->setText(tr("Media 04")); | |
28 | + ui->pushButton_5->setText(tr("Media 05")); | |
29 | + ui->pushButton_6->setText(tr("Media 06")); | |
30 | + ui->pushButton_7->setText(tr("Media 07")); | |
31 | + ui->pushButton_8->setText(tr("Media 08")); | |
32 | + ui->pushButton_9->setText(tr("Media 09")); | |
33 | + ui->pushButton_10->setText(tr("Media 10")); | |
34 | + | |
35 | + strTemp = cfg->getTitleString(cfgtype); | |
36 | + | |
37 | + ui->ctrLbTitle->setText(strTemp); | |
38 | + | |
39 | + | |
40 | + item = cfg->getConfigValue(cfgtype); | |
41 | + | |
42 | + m_nCurSel = item.d32; | |
43 | + qDebug() << "m_nCurSel is " << m_nCurSel; | |
13 | 44 | |
14 | - case config_keypad_sound1: | |
15 | - default: | |
16 | - item = cfg->getConfigValue(cfgtype); | |
17 | - break; | |
18 | - } | |
19 | - m_nCurSel = item.d32; | |
20 | 45 | reloadUi(); |
46 | + | |
47 | + m_pSignalMapper = new QSignalMapper(this); | |
48 | + m_pSignalMapper->setMapping(ui->pushButton_1,0); | |
49 | + m_pSignalMapper->setMapping(ui->pushButton_2,1); | |
50 | + m_pSignalMapper->setMapping(ui->pushButton_3,2); | |
51 | + m_pSignalMapper->setMapping(ui->pushButton_4,3); | |
52 | + m_pSignalMapper->setMapping(ui->pushButton_5,4); | |
53 | + m_pSignalMapper->setMapping(ui->pushButton_6,5); | |
54 | + m_pSignalMapper->setMapping(ui->pushButton_7,6); | |
55 | + m_pSignalMapper->setMapping(ui->pushButton_8,7); | |
56 | + m_pSignalMapper->setMapping(ui->pushButton_9,8); | |
57 | + m_pSignalMapper->setMapping(ui->pushButton_10,9); | |
58 | + | |
59 | + | |
60 | + connect(ui->pushButton_1,SIGNAL(clicked(bool)),m_pSignalMapper,SLOT(map())); | |
61 | + connect(ui->pushButton_2,SIGNAL(clicked(bool)),m_pSignalMapper,SLOT(map())); | |
62 | + connect(ui->pushButton_3,SIGNAL(clicked(bool)),m_pSignalMapper,SLOT(map())); | |
63 | + connect(ui->pushButton_4,SIGNAL(clicked(bool)),m_pSignalMapper,SLOT(map())); | |
64 | + connect(ui->pushButton_5,SIGNAL(clicked(bool)),m_pSignalMapper,SLOT(map())); | |
65 | + connect(ui->pushButton_6,SIGNAL(clicked(bool)),m_pSignalMapper,SLOT(map())); | |
66 | + connect(ui->pushButton_7,SIGNAL(clicked(bool)),m_pSignalMapper,SLOT(map())); | |
67 | + connect(ui->pushButton_8,SIGNAL(clicked(bool)),m_pSignalMapper,SLOT(map())); | |
68 | + connect(ui->pushButton_9,SIGNAL(clicked(bool)),m_pSignalMapper,SLOT(map())); | |
69 | + connect(ui->pushButton_10,SIGNAL(clicked(bool)),m_pSignalMapper,SLOT(map())); | |
70 | + | |
71 | + connect(m_pSignalMapper,SIGNAL(mapped(int)),this,SLOT(onConfigBtnClicked(int))); | |
21 | 72 | } |
22 | 73 | |
23 | 74 | ConfigSoundSelelectDlg::~ConfigSoundSelelectDlg() |
... | ... | @@ -27,6 +78,11 @@ ConfigSoundSelelectDlg::~ConfigSoundSelelectDlg() |
27 | 78 | |
28 | 79 | void ConfigSoundSelelectDlg::on_ctrBtnOk_clicked() |
29 | 80 | { |
81 | + Config* cfg = Config::getInstance(); | |
82 | + config_item item; | |
83 | + item.d32 = m_nCurSel; | |
84 | + qDebug() << item.d32 << "cur sel " << m_nCurSel; | |
85 | + cfg->setConfigValue(m_nCfgType,item); | |
30 | 86 | accept(); |
31 | 87 | } |
32 | 88 | |
... | ... | @@ -37,7 +93,40 @@ void ConfigSoundSelelectDlg::on_ctrBtnCancel_clicked() |
37 | 93 | |
38 | 94 | void ConfigSoundSelelectDlg::reloadUi(){ |
39 | 95 | switch(m_nCurSel){ |
96 | + case 1: | |
97 | + ui->pushButton_2->setChecked(true); | |
98 | + break; | |
99 | + case 2: | |
100 | + ui->pushButton_3->setChecked(true); | |
101 | + break; | |
102 | + case 3: | |
103 | + ui->pushButton_4->setChecked(true); | |
104 | + break; | |
105 | + case 4: | |
106 | + ui->pushButton_5->setChecked(true); | |
107 | + break; | |
108 | + case 5: | |
109 | + ui->pushButton_6->setChecked(true); | |
110 | + break; | |
111 | + case 6: | |
112 | + ui->pushButton_7->setChecked(true); | |
113 | + break; | |
114 | + case 7: | |
115 | + ui->pushButton_8->setChecked(true); | |
116 | + break; | |
117 | + case 8: | |
118 | + ui->pushButton_9->setChecked(true); | |
119 | + break; | |
120 | + case 9: | |
121 | + ui->pushButton_10->setChecked(true); | |
122 | + break; | |
40 | 123 | case 0: |
124 | + default: | |
125 | + ui->pushButton_1->setChecked(true); | |
41 | 126 | break; |
42 | 127 | } |
43 | 128 | } |
129 | + | |
130 | +void ConfigSoundSelelectDlg::onConfigBtnClicked(const int sel){ | |
131 | + m_nCurSel = sel; | |
132 | +} | ... | ... |
app/gui/oven_control/configsoundselelectdlg.h
... | ... | @@ -26,9 +26,14 @@ private slots: |
26 | 26 | |
27 | 27 | void on_ctrBtnCancel_clicked(); |
28 | 28 | |
29 | +public slots: | |
30 | + void onConfigBtnClicked(const int sel); | |
31 | + | |
29 | 32 | private: |
30 | 33 | Ui::ConfigSoundSelelectDlg *ui; |
31 | - int m_nCurSel; | |
34 | + QSignalMapper *m_pSignalMapper; | |
35 | + ConfigType m_nCfgType; | |
36 | + uint32_t m_nCurSel; | |
32 | 37 | }; |
33 | 38 | |
34 | 39 | #endif // CONFIGSOUNDSELELECTDLG_H | ... | ... |
app/gui/oven_control/configsoundselelectdlg.ui
... | ... | @@ -17,7 +17,11 @@ |
17 | 17 | <bool>false</bool> |
18 | 18 | </property> |
19 | 19 | <property name="styleSheet"> |
20 | - <string notr="true">#centralwidget{ | |
20 | + <string notr="true">#ConfigSoundSelelectDlg{ | |
21 | + background-color: transparent; | |
22 | +} | |
23 | + | |
24 | +#centralwidget{ | |
21 | 25 | background-image : url(:/images/background/popup/503.png); |
22 | 26 | } |
23 | 27 | |
... | ... | @@ -175,7 +179,7 @@ QLabel{ |
175 | 179 | <bool>true</bool> |
176 | 180 | </property> |
177 | 181 | <property name="checked"> |
178 | - <bool>true</bool> | |
182 | + <bool>false</bool> | |
179 | 183 | </property> |
180 | 184 | <property name="autoExclusive"> |
181 | 185 | <bool>true</bool> |
... | ... | @@ -224,7 +228,7 @@ QLabel{ |
224 | 228 | <bool>true</bool> |
225 | 229 | </property> |
226 | 230 | <property name="checked"> |
227 | - <bool>true</bool> | |
231 | + <bool>false</bool> | |
228 | 232 | </property> |
229 | 233 | <property name="autoExclusive"> |
230 | 234 | <bool>true</bool> |
... | ... | @@ -273,7 +277,7 @@ QLabel{ |
273 | 277 | <bool>true</bool> |
274 | 278 | </property> |
275 | 279 | <property name="checked"> |
276 | - <bool>true</bool> | |
280 | + <bool>false</bool> | |
277 | 281 | </property> |
278 | 282 | <property name="autoExclusive"> |
279 | 283 | <bool>true</bool> |
... | ... | @@ -322,7 +326,7 @@ QLabel{ |
322 | 326 | <bool>true</bool> |
323 | 327 | </property> |
324 | 328 | <property name="checked"> |
325 | - <bool>true</bool> | |
329 | + <bool>false</bool> | |
326 | 330 | </property> |
327 | 331 | <property name="autoExclusive"> |
328 | 332 | <bool>true</bool> |
... | ... | @@ -371,7 +375,7 @@ QLabel{ |
371 | 375 | <bool>true</bool> |
372 | 376 | </property> |
373 | 377 | <property name="checked"> |
374 | - <bool>true</bool> | |
378 | + <bool>false</bool> | |
375 | 379 | </property> |
376 | 380 | <property name="autoExclusive"> |
377 | 381 | <bool>true</bool> |
... | ... | @@ -420,7 +424,7 @@ QLabel{ |
420 | 424 | <bool>true</bool> |
421 | 425 | </property> |
422 | 426 | <property name="checked"> |
423 | - <bool>true</bool> | |
427 | + <bool>false</bool> | |
424 | 428 | </property> |
425 | 429 | <property name="autoExclusive"> |
426 | 430 | <bool>true</bool> |
... | ... | @@ -469,7 +473,7 @@ QLabel{ |
469 | 473 | <bool>true</bool> |
470 | 474 | </property> |
471 | 475 | <property name="checked"> |
472 | - <bool>true</bool> | |
476 | + <bool>false</bool> | |
473 | 477 | </property> |
474 | 478 | <property name="autoExclusive"> |
475 | 479 | <bool>true</bool> |
... | ... | @@ -518,7 +522,7 @@ QLabel{ |
518 | 522 | <bool>true</bool> |
519 | 523 | </property> |
520 | 524 | <property name="checked"> |
521 | - <bool>true</bool> | |
525 | + <bool>false</bool> | |
522 | 526 | </property> |
523 | 527 | <property name="autoExclusive"> |
524 | 528 | <bool>true</bool> |
... | ... | @@ -567,7 +571,7 @@ QLabel{ |
567 | 571 | <bool>true</bool> |
568 | 572 | </property> |
569 | 573 | <property name="checked"> |
570 | - <bool>true</bool> | |
574 | + <bool>false</bool> | |
571 | 575 | </property> |
572 | 576 | <property name="autoExclusive"> |
573 | 577 | <bool>true</bool> | ... | ... |
app/gui/oven_control/configwindow.cpp
... | ... | @@ -20,15 +20,6 @@ ConfigWindow::ConfigWindow(QWidget *parent) : |
20 | 20 | |
21 | 21 | ui->scrollAreaMenuLayout->setAlignment(Qt::AlignTop); |
22 | 22 | |
23 | - ConfigPanelButton *configbtn; | |
24 | -// for(int i = 0;i <20;i++){ | |
25 | -// configbtn = new ConfigPanelButton(this,i); | |
26 | -// configbtn->showFavoriteButton(); | |
27 | -// configbtn->setText("TEST"); | |
28 | -// configbtn->setValue("test"); | |
29 | -// ui->scrollAreaMenuLayout->addWidget(configbtn); | |
30 | -// connect(configbtn,SIGNAL(clicked(uint16_t)),SLOT(onConfigBtnClicked(uint16_t))); | |
31 | -// } | |
32 | 23 | Config* cfg = Config::getInstance(); |
33 | 24 | |
34 | 25 | QSetIterator<uint32_t> itr = cfg->getConstBeginFavorite(); |
... | ... | @@ -75,10 +66,20 @@ void ConfigWindow::on_pushButton_8_clicked() //설정 버튼 |
75 | 66 | } |
76 | 67 | } |
77 | 68 | |
69 | +void ConfigWindow::reloadValue(){ | |
70 | + Config* cfg = Config::getInstance(); | |
71 | + QString strtemp=""; | |
72 | + for(int i=0;i<m_vectorMenuList.count();i++){ | |
73 | + strtemp = cfg->getValueString(m_arrConfigListInfos[m_nCurConfigPos][i]); | |
74 | + m_vectorMenuList[i]->setValue(strtemp); | |
75 | + } | |
76 | +} | |
77 | + | |
78 | 78 | void ConfigWindow::onConfigBtnClicked(uint16_t id){ |
79 | 79 | qDebug() << "config id prsess : " << id; |
80 | 80 | Config *cfg = Config::getInstance(); |
81 | 81 | cfg->execConfigWindow(this,(Define::ConfigType)id); |
82 | + reloadValue(); | |
82 | 83 | } |
83 | 84 | |
84 | 85 | |
... | ... | @@ -87,8 +88,8 @@ void ConfigWindow::onConfigCheckBtnClicked(uint16_t id, bool checked){ |
87 | 88 | } |
88 | 89 | |
89 | 90 | void ConfigWindow::reloadUi(void){ |
90 | - QWidget** pws = m_vectorMenuList.data(); | |
91 | - QWidget* pw; | |
91 | + ConfigPanelButton** pws = m_vectorMenuList.data(); | |
92 | + ConfigPanelButton* pw; | |
92 | 93 | ConfigPanelButton *pcb; |
93 | 94 | Config* cfg = Config::getInstance(); |
94 | 95 | QString strtemp=""; |
... | ... | @@ -126,3 +127,11 @@ void ConfigWindow::on_pushButton_7_clicked() //음향 관리 |
126 | 127 | reloadUi(); |
127 | 128 | } |
128 | 129 | } |
130 | + | |
131 | +void ConfigWindow::on_pushButton_2_clicked() | |
132 | +{ | |
133 | + if(m_nCurConfigPos != config_menu_system){ | |
134 | + m_nCurConfigPos = config_menu_system; | |
135 | + reloadUi(); | |
136 | + } | |
137 | +} | ... | ... |
app/gui/oven_control/configwindow.h
... | ... | @@ -31,18 +31,19 @@ class ConfigWindow : public QMainWindow |
31 | 31 | |
32 | 32 | private: |
33 | 33 | const uint16_t m_arrMaxMenuCount[7] ={ |
34 | - 5,8,0, | |
34 | + 5,8,8, | |
35 | 35 | }; |
36 | 36 | const Define::ConfigType m_arrConfigListInfos[7][20] = { |
37 | 37 | {config_datetime, config_temptype,config_backlight, config_time_type,config_resttime_format,}, |
38 | 38 | {config_marster_vol,config_keypad_sound1,config_keypad_sound2,config_request_loadexec,config_programstep_finish,config_cooktime_finish,config_stoperror_distinguish,config_sound_factory_reset}, |
39 | - {config_invalid,}, | |
39 | + {config_info_data_download,config_service_data_download,config_program_download,config_program_upload,config_program_initialize ,config_ip,config_set_download,config_set_upload}, | |
40 | 40 | {config_invalid,}, |
41 | 41 | {config_invalid,}, |
42 | 42 | {config_invalid,}, |
43 | 43 | {config_invalid,} |
44 | 44 | }; |
45 | 45 | void reloadUi(void); |
46 | + void reloadValue(void); | |
46 | 47 | |
47 | 48 | public: |
48 | 49 | explicit ConfigWindow(QWidget *parent = 0); |
... | ... | @@ -60,13 +61,15 @@ private slots: |
60 | 61 | |
61 | 62 | void on_pushButton_7_clicked(); |
62 | 63 | |
64 | + void on_pushButton_2_clicked(); | |
65 | + | |
63 | 66 | public slots: |
64 | 67 | void onConfigBtnClicked(uint16_t id); |
65 | 68 | void onConfigCheckBtnClicked(uint16_t id, bool checked); |
66 | 69 | |
67 | 70 | private: |
68 | 71 | Ui::ConfigWindow *ui; |
69 | - QVector<QWidget *> m_vectorMenuList; | |
72 | + QVector<ConfigPanelButton *> m_vectorMenuList; | |
70 | 73 | CONFIG_MENU_POS m_nCurConfigPos; |
71 | 74 | }; |
72 | 75 | ... | ... |
app/gui/oven_control/images/config/102_usb_icon.png
1.81 KB
app/gui/oven_control/oven_control.pro
... | ... | @@ -84,7 +84,8 @@ SOURCES += main.cpp\ |
84 | 84 | manualcooksettingwidget.cpp \ |
85 | 85 | autocooksettingwidget.cpp \ |
86 | 86 | favoritenamepopup.cpp \ |
87 | - confirmpopup.cpp | |
87 | + confirmpopup.cpp \ | |
88 | + usbcheckpopupdlg.cpp | |
88 | 89 | |
89 | 90 | HEADERS += mainwindow.h \ |
90 | 91 | cook.h \ |
... | ... | @@ -158,7 +159,8 @@ HEADERS += mainwindow.h \ |
158 | 159 | manualcooksettingwidget.h \ |
159 | 160 | autocooksettingwidget.h \ |
160 | 161 | favoritenamepopup.h \ |
161 | - confirmpopup.h | |
162 | + confirmpopup.h \ | |
163 | + usbcheckpopupdlg.h | |
162 | 164 | |
163 | 165 | FORMS += mainwindow.ui \ |
164 | 166 | manualcookwindow.ui \ |
... | ... | @@ -208,7 +210,8 @@ FORMS += mainwindow.ui \ |
208 | 210 | manualcooksettingwidget.ui \ |
209 | 211 | autocooksettingwidget.ui \ |
210 | 212 | favoritenamepopup.ui \ |
211 | - confirmpopup.ui | |
213 | + confirmpopup.ui \ | |
214 | + usbcheckpopupdlg.ui | |
212 | 215 | |
213 | 216 | RESOURCES += \ |
214 | 217 | resources.qrc | ... | ... |
app/gui/oven_control/resources.qrc
app/gui/oven_control/usbcheckpopupdlg.cpp
... | ... | @@ -0,0 +1,14 @@ |
1 | +#include "usbcheckpopupdlg.h" | |
2 | +#include "ui_usbcheckpopupdlg.h" | |
3 | + | |
4 | +UsbCheckPopupDlg::UsbCheckPopupDlg(QWidget *parent) : | |
5 | + QDialog(parent), | |
6 | + ui(new Ui::UsbCheckPopupDlg) | |
7 | +{ | |
8 | + ui->setupUi(this); | |
9 | +} | |
10 | + | |
11 | +UsbCheckPopupDlg::~UsbCheckPopupDlg() | |
12 | +{ | |
13 | + delete ui; | |
14 | +} | ... | ... |
app/gui/oven_control/usbcheckpopupdlg.h
... | ... | @@ -0,0 +1,22 @@ |
1 | +#ifndef USBCHECKPOPUPDLG_H | |
2 | +#define USBCHECKPOPUPDLG_H | |
3 | + | |
4 | +#include <QDialog> | |
5 | + | |
6 | +namespace Ui { | |
7 | +class UsbCheckPopupDlg; | |
8 | +} | |
9 | + | |
10 | +class UsbCheckPopupDlg : public QDialog | |
11 | +{ | |
12 | + Q_OBJECT | |
13 | + | |
14 | +public: | |
15 | + explicit UsbCheckPopupDlg(QWidget *parent = 0); | |
16 | + ~UsbCheckPopupDlg(); | |
17 | + | |
18 | +private: | |
19 | + Ui::UsbCheckPopupDlg *ui; | |
20 | +}; | |
21 | + | |
22 | +#endif // USBCHECKPOPUPDLG_H | ... | ... |
app/gui/oven_control/usbcheckpopupdlg.ui
... | ... | @@ -0,0 +1,118 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<ui version="4.0"> | |
3 | + <class>UsbCheckPopupDlg</class> | |
4 | + <widget class="QDialog" name="UsbCheckPopupDlg"> | |
5 | + <property name="geometry"> | |
6 | + <rect> | |
7 | + <x>0</x> | |
8 | + <y>0</y> | |
9 | + <width>900</width> | |
10 | + <height>1600</height> | |
11 | + </rect> | |
12 | + </property> | |
13 | + <property name="windowTitle"> | |
14 | + <string>Dialog</string> | |
15 | + </property> | |
16 | + <property name="windowOpacity"> | |
17 | + <double>1.000000000000000</double> | |
18 | + </property> | |
19 | + <property name="styleSheet"> | |
20 | + <string notr="true">#centralWidget { background-image: url(:/images/background/popup/503.png); | |
21 | +} | |
22 | +</string> | |
23 | + </property> | |
24 | + <property name="modal"> | |
25 | + <bool>true</bool> | |
26 | + </property> | |
27 | + <widget class="QWidget" name="centralWidget" native="true"> | |
28 | + <property name="geometry"> | |
29 | + <rect> | |
30 | + <x>0</x> | |
31 | + <y>420</y> | |
32 | + <width>900</width> | |
33 | + <height>503</height> | |
34 | + </rect> | |
35 | + </property> | |
36 | + <property name="styleSheet"> | |
37 | + <string notr="true"/> | |
38 | + </property> | |
39 | + <widget class="QPushButton" name="ctrBtnYes"> | |
40 | + <property name="geometry"> | |
41 | + <rect> | |
42 | + <x>0</x> | |
43 | + <y>362</y> | |
44 | + <width>900</width> | |
45 | + <height>141</height> | |
46 | + </rect> | |
47 | + </property> | |
48 | + <property name="font"> | |
49 | + <font> | |
50 | + <pointsize>15</pointsize> | |
51 | + <weight>75</weight> | |
52 | + <bold>true</bold> | |
53 | + <underline>true</underline> | |
54 | + </font> | |
55 | + </property> | |
56 | + <property name="styleSheet"> | |
57 | + <string notr="true">QPushButton{ | |
58 | +border : none; | |
59 | +color : white; | |
60 | +} | |
61 | +QPushButton::pressed {color : yellow}</string> | |
62 | + </property> | |
63 | + <property name="text"> | |
64 | + <string>확인</string> | |
65 | + </property> | |
66 | + </widget> | |
67 | + <widget class="QLabel" name="label"> | |
68 | + <property name="geometry"> | |
69 | + <rect> | |
70 | + <x>390</x> | |
71 | + <y>80</y> | |
72 | + <width>93</width> | |
73 | + <height>92</height> | |
74 | + </rect> | |
75 | + </property> | |
76 | + <property name="text"> | |
77 | + <string/> | |
78 | + </property> | |
79 | + <property name="pixmap"> | |
80 | + <pixmap resource="resources.qrc">:/images/config/102_usb_icon.png</pixmap> | |
81 | + </property> | |
82 | + </widget> | |
83 | + <widget class="QLabel" name="ctrLbDesc"> | |
84 | + <property name="geometry"> | |
85 | + <rect> | |
86 | + <x>0</x> | |
87 | + <y>170</y> | |
88 | + <width>900</width> | |
89 | + <height>201</height> | |
90 | + </rect> | |
91 | + </property> | |
92 | + <property name="font"> | |
93 | + <font> | |
94 | + <family>나눔고딕</family> | |
95 | + <pointsize>15</pointsize> | |
96 | + </font> | |
97 | + </property> | |
98 | + <property name="styleSheet"> | |
99 | + <string notr="true">QLabel { | |
100 | + color : white; | |
101 | + border : none; | |
102 | +}</string> | |
103 | + </property> | |
104 | + <property name="text"> | |
105 | + <string>제품에 USB가 삽입되어 있지 않습니다. | |
106 | +USB를 삽입해 주세요!</string> | |
107 | + </property> | |
108 | + <property name="alignment"> | |
109 | + <set>Qt::AlignCenter</set> | |
110 | + </property> | |
111 | + </widget> | |
112 | + </widget> | |
113 | + </widget> | |
114 | + <resources> | |
115 | + <include location="resources.qrc"/> | |
116 | + </resources> | |
117 | + <connections/> | |
118 | +</ui> | ... | ... |
app/gui/oven_control/yesnopopupdlg.cpp
... | ... | @@ -6,12 +6,17 @@ YesNoPopupDlg::YesNoPopupDlg(QWidget *parent, QString strDesc) : |
6 | 6 | ui(new Ui::YesNoPopupDlg) |
7 | 7 | { |
8 | 8 | ui->setupUi(this); |
9 | - this->setAttribute( Qt::WA_TranslucentBackground); | |
10 | 9 | this->setAttribute( Qt::WA_DeleteOnClose); |
11 | - this->setWindowFlags(Qt::FramelessWindowHint); | |
10 | + setWindowFlags(Qt::FramelessWindowHint); | |
11 | + setAttribute(Qt::WA_NoSystemBackground); | |
12 | + setAttribute(Qt::WA_TranslucentBackground); | |
13 | + //setAttribute(Qt::WA_PaintOnScreen); | |
14 | + | |
15 | + | |
12 | 16 | |
13 | 17 | ui->ctrLbDesc->setText(strDesc); |
14 | 18 | |
19 | + //this->setAttribute( Qt::WA_DeleteOnClose); | |
15 | 20 | } |
16 | 21 | |
17 | 22 | YesNoPopupDlg::~YesNoPopupDlg() |
... | ... | @@ -28,5 +33,4 @@ void YesNoPopupDlg::on_ctrBtnYes_clicked() |
28 | 33 | void YesNoPopupDlg::on_ctrBtnNo_clicked() |
29 | 34 | { |
30 | 35 | this->reject(); |
31 | - | |
32 | 36 | } | ... | ... |
app/gui/oven_control/yesnopopupdlg.ui
... | ... | @@ -7,21 +7,28 @@ |
7 | 7 | <x>0</x> |
8 | 8 | <y>0</y> |
9 | 9 | <width>900</width> |
10 | - <height>503</height> | |
10 | + <height>1600</height> | |
11 | 11 | </rect> |
12 | 12 | </property> |
13 | 13 | <property name="windowTitle"> |
14 | 14 | <string>Dialog</string> |
15 | 15 | </property> |
16 | + <property name="windowOpacity"> | |
17 | + <double>1.000000000000000</double> | |
18 | + </property> | |
16 | 19 | <property name="styleSheet"> |
17 | 20 | <string notr="true">#centralWidget { background-image: url(:/images/background/popup/503.png); |
18 | -}</string> | |
21 | +} | |
22 | +</string> | |
23 | + </property> | |
24 | + <property name="modal"> | |
25 | + <bool>true</bool> | |
19 | 26 | </property> |
20 | 27 | <widget class="QWidget" name="centralWidget" native="true"> |
21 | 28 | <property name="geometry"> |
22 | 29 | <rect> |
23 | 30 | <x>0</x> |
24 | - <y>0</y> | |
31 | + <y>420</y> | |
25 | 32 | <width>900</width> |
26 | 33 | <height>503</height> |
27 | 34 | </rect> | ... | ... |