Commit 7ae6a4b1d98ff8becb12f0572b8a932d1fe63212
1 parent
fd6c8836be
Exists in
master
and in
2 other branches
시스템 설정 마무리 및 다국어 처리
Showing
8 changed files
with
37 additions
and
12 deletions
Show diff stats
app/gui/oven_control/config.cpp
... | ... | @@ -225,11 +225,13 @@ QString Config::getValueString(Define::ConfigType idx){ |
225 | 225 | break; |
226 | 226 | case 2: |
227 | 227 | qstrTemp = tr(config_format[(uint32_t)idx]); |
228 | + break; | |
228 | 229 | case 3: |
229 | 230 | qstrTemp.sprintf(config_format[(uint32_t)idx], configlist.values[(uint32_t)idx].d32+1); |
230 | 231 | break; |
231 | 232 | case 0x7f: |
232 | 233 | qstrTemp = ""; |
234 | + break; | |
233 | 235 | } |
234 | 236 | return qstrTemp; |
235 | 237 | } |
... | ... | @@ -270,7 +272,7 @@ QString Config::getValueString(Define::ConfigType idx){ |
270 | 272 | break; |
271 | 273 | case config_set_half_energy: |
272 | 274 | if(configlist.items.set_half_energy.d32 >=2) configlist.items.set_half_energy.d32 = 0; |
273 | - qstrTemp = tr(on_off_menu[configlist.items.set_half_energy.d32]); | |
275 | + qstrTemp = tr(set_unset_menu[configlist.items.set_half_energy.d32]); | |
274 | 276 | break; |
275 | 277 | case config_duty_wash: |
276 | 278 | if(configlist.items.duty_wash.d32 >=2) configlist.items.duty_wash.d32 = 0; |
... | ... | @@ -283,6 +285,10 @@ QString Config::getValueString(Define::ConfigType idx){ |
283 | 285 | case config_loading_door_monitoring: |
284 | 286 | qstrTemp.sprintf(config_format[(uint32_t)idx ], configlist.items.loading_door_monitoring.d8.d8_0); |
285 | 287 | break; |
288 | + case config_demo_mode: | |
289 | + if(configlist.items.demo_mode.d32 >=2) configlist.items.demo_mode.d32 = 0; | |
290 | + qstrTemp = tr(on_off_menu[configlist.items.demo_mode.d32]); | |
291 | + break; | |
286 | 292 | default: |
287 | 293 | qstrTemp = ""; |
288 | 294 | break; | ... | ... |
app/gui/oven_control/config.h
... | ... | @@ -199,7 +199,7 @@ namespace Define |
199 | 199 | "타겟시간\0" |
200 | 200 | }; |
201 | 201 | |
202 | - const char on_off_menu[2][16]={ | |
202 | + const char set_unset_menu[2][16]={ | |
203 | 203 | "설정취소\0", |
204 | 204 | "설정\0" |
205 | 205 | }; |
... | ... | @@ -209,6 +209,11 @@ namespace Define |
209 | 209 | "활성화\0" |
210 | 210 | }; |
211 | 211 | |
212 | + const char on_off_menu[2][16] = { | |
213 | + "끄기\0", | |
214 | + "켜기\0" | |
215 | + }; | |
216 | + | |
212 | 217 | typedef struct _config_1digit_set{ |
213 | 218 | char str_unit[8]; |
214 | 219 | int maxlen; |
... | ... | @@ -279,9 +284,15 @@ class Config : public QObject |
279 | 284 | 0x02, 0x02, 0x02,0x02, 0x02,0x02, 0x80, 0x80, 0x80, 0x02, 0x02, |
280 | 285 | 0x80, 0x00, 0x00,0x00, |
281 | 286 | 0x80, 0x80, 0x80, |
282 | - 0x7F,0x7F,0x7F,0x7F,0x7F,0x7F | |
287 | + 0x02,0x02,0x02,0x02,0x80,0x02 | |
283 | 288 | }; |
284 | 289 | |
290 | + const QString str_menu[3] ={ | |
291 | + tr("test"), | |
292 | + tr("name"), | |
293 | + tr("ok") | |
294 | + }; | |
295 | + | |
285 | 296 | const char config_format_kr[MAX_CONFIG_COUNT][64]={ |
286 | 297 | "%S", |
287 | 298 | "%S", |
... | ... | @@ -322,12 +333,12 @@ class Config : public QObject |
322 | 333 | "%s", //config_duty_wash, |
323 | 334 | "%d단계", //config_loading_door_monitoring, |
324 | 335 | "%d단계", //config_cooking_door_monitoring |
325 | - "%s", //config_software_info, | |
326 | - "%s", //config_hotline_chef, | |
327 | - "%s", //config_hotline_service, | |
328 | - "%s", //config_steam_wash | |
336 | + "정보확인", //config_software_info, | |
337 | + "정보확인", //config_hotline_chef, | |
338 | + "정보확인", //config_hotline_service, | |
339 | + "헹굼", //config_steam_wash | |
329 | 340 | "%s", //config_demo_mode, |
330 | - "%s", //config_enter_engineer_mode, | |
341 | + "엔지니어모드 진입", //config_enter_engineer_mode, | |
331 | 342 | }; |
332 | 343 | |
333 | 344 | ... | ... |
app/gui/oven_control/confighalfenergydlg.cpp
... | ... | @@ -21,8 +21,8 @@ ConfigHalfEnergyDlg::ConfigHalfEnergyDlg(QWidget *parent) : |
21 | 21 | connect(button, &QPushButton::pressed, SoundPlayer::playClick); |
22 | 22 | |
23 | 23 | |
24 | - ui->pushButton_1->setText(tr(on_off_menu[0])); | |
25 | - ui->pushButton_2->setText(tr(on_off_menu[1])); | |
24 | + ui->pushButton_1->setText(tr(set_unset_menu[0])); | |
25 | + ui->pushButton_2->setText(tr(set_unset_menu[1])); | |
26 | 26 | |
27 | 27 | reloadUi(); |
28 | 28 | ... | ... |
app/gui/oven_control/configwindow.h
... | ... | @@ -32,7 +32,7 @@ class ConfigWindow : public QMainWindow |
32 | 32 | |
33 | 33 | private: |
34 | 34 | const uint16_t m_arrMaxMenuCount[7] ={ |
35 | - 6,8,9,2,3,0,5 | |
35 | + 6,8,9,2,3,0,6 | |
36 | 36 | }; |
37 | 37 | const Define::ConfigType m_arrConfigListInfos[7][20] = { |
38 | 38 | {config_language,config_datetime, config_temptype,config_backlight, config_time_type,config_resttime_format,}, |
... | ... | @@ -41,7 +41,7 @@ private: |
41 | 41 | {config_set_half_energy,config_set_auto_darkness,}, |
42 | 42 | {config_duty_wash,config_loading_door_monitoring,config_cooking_door_monitoring}, |
43 | 43 | {config_invalid,}, |
44 | - {config_software_info,config_hotline_chef,config_hotline_service,config_steam_wash,config_enter_engineer_mode} | |
44 | + {config_software_info,config_hotline_chef,config_hotline_service,config_steam_wash,config_demo_mode,config_enter_engineer_mode} | |
45 | 45 | }; |
46 | 46 | |
47 | 47 | public: | ... | ... |
app/gui/oven_control/lang_en.qm
No preview for this file type
app/gui/oven_control/main.cpp
... | ... | @@ -6,6 +6,7 @@ |
6 | 6 | #include "config.h" |
7 | 7 | #include "inputoverwatcher.h" |
8 | 8 | #include <QApplication> |
9 | +#include <QDebug> | |
9 | 10 | |
10 | 11 | int main(int argc, char *argv[]) |
11 | 12 | { |
... | ... | @@ -23,6 +24,10 @@ int main(int argc, char *argv[]) |
23 | 24 | OvenStatistics::getInstance(oven); |
24 | 25 | Config::getInstance(oven); |
25 | 26 | |
27 | + QTranslator* trans = new QTranslator(); | |
28 | + qDebug() << trans->load(":/lang_en.qm"); | |
29 | + QApplication::installTranslator(trans); | |
30 | + | |
26 | 31 | MainWindow w; |
27 | 32 | w.showFullScreen(); |
28 | 33 | ... | ... |
app/gui/oven_control/oven_control.pro
app/gui/oven_control/resources.qrc