diff --git a/app/gui/oven_control/config.cpp b/app/gui/oven_control/config.cpp index 8bf3ec3..b4ed9c9 100644 --- a/app/gui/oven_control/config.cpp +++ b/app/gui/oven_control/config.cpp @@ -34,7 +34,7 @@ Config* Config::instance = NULL; Config::Config(QObject *parent) : QObject(parent) { - memcpy(config_format,config_format_kr,MAX_CONFIG_COUNT*64); + //memcpy(config_format,config_format_kr,MAX_CONFIG_COUNT*64); loadConfig(); loadFavorite(); qApp->installEventFilter(&watcher); @@ -246,7 +246,8 @@ QString Config::getValueString(Define::ConfigType idx){ if( (config_data_type[(uint32_t)idx] & 0x80) ==0){ switch(config_data_type[(uint32_t)idx]){ case 0: - qstrTemp.sprintf(config_format[(uint32_t)idx], configlist.values[(uint32_t)idx].d32); + //qstrTemp.sprintf(config_format[(uint32_t)idx], configlist.values[(uint32_t)idx].d32); + qstrTemp= tr(config_format[(uint32_t)idx]).arg(configlist.values[(uint32_t)idx].d32); break; case 1: qstrTemp.sprintf(config_format[(uint32_t)idx], configlist.values[(uint32_t)idx].f32); @@ -255,7 +256,8 @@ QString Config::getValueString(Define::ConfigType idx){ qstrTemp = tr(config_format[(uint32_t)idx]); break; case 3: - qstrTemp.sprintf(config_format[(uint32_t)idx], configlist.values[(uint32_t)idx].d32+1); + //qstrTemp.sprintf(config_format[(uint32_t)idx], configlist.values[(uint32_t)idx].d32+1); + qstrTemp= tr(config_format[(uint32_t)idx]).arg(configlist.values[(uint32_t)idx].d32+1); break; case 0x7f: qstrTemp = ""; @@ -304,14 +306,14 @@ QString Config::getValueString(Define::ConfigType idx){ break; case config_duty_wash: if(configlist.items.duty_wash.d32 >=2) configlist.items.duty_wash.d32 = 0; - qDebug() << "duty wash is "<=2) configlist.items.demo_mode.d32 = 0; @@ -325,9 +327,7 @@ QString Config::getValueString(Define::ConfigType idx){ } QString Config::getTitleString(Define::ConfigType idx){ - QString strTemp =""; - strTemp = tr(config_title[idx]); - return strTemp; + return tr(config_title[idx]);//strTemp; } bool Config::isFavorite(Define::ConfigType idx){ diff --git a/app/gui/oven_control/config.h b/app/gui/oven_control/config.h index dc81e99..59577c4 100644 --- a/app/gui/oven_control/config.h +++ b/app/gui/oven_control/config.h @@ -15,6 +15,90 @@ #define MAX_HOTLINE_SERVICE_CNT 2 +static const char rest_time_type_menu[2][16] = { + QT_TRANSLATE_NOOP("Config","잔여시간\0"), + QT_TRANSLATE_NOOP("Config","타겟시간\0") +}; + +static const char temptype_menu[2][16]{ + QT_TRANSLATE_NOOP("Config","섭씨(℃)"), + QT_TRANSLATE_NOOP("Config","화씨(℉)") +}; + +static const char set_unset_menu[2][16]={ + QT_TRANSLATE_NOOP("Config","설정취소\0"), + QT_TRANSLATE_NOOP("Config","설정\0") +}; + +static const char language_menu[3][20]{ + "한국어\0", + "中國語\0", + "English" +}; + +const char time_type_menu[2][16]={ + "24h\0", + "am/pm\0" +}; + +const char best_dish_weight_menu[4][16]={ + "700g\0", + "700-899g\0", + "900-1099g\0", + "1100g" +}; + + +const char active_on_off_menu[2][16]={ + QT_TRANSLATE_NOOP("Config","비활성\0"), + QT_TRANSLATE_NOOP("Config","활성화\0") +}; + +const char on_off_menu[2][16] = { + QT_TRANSLATE_NOOP("Config","끄기\0"), + QT_TRANSLATE_NOOP("Config","켜기\0") +}; + +typedef struct _config_1digit_set{ + char str_unit[8]; + int maxlen; + int min; + int max; +}config_1digit_set; + +const config_1digit_set auto_darkness_dlgset = { + "min\0", + 2, + 1, + 30, +}; + +const config_1digit_set load_ready_dlgset ={ + "min\0", + 2, + 2, + 10, +}; + +const char software_item_name[3][32] ={ + QT_TRANSLATE_NOOP("Config","모 델 명"), + QT_TRANSLATE_NOOP("Config","제조일자"), + QT_TRANSLATE_NOOP("Config","소프트웨어 버전") +}; + +const char hotline_chef_item_name[3][32] = { + QT_TRANSLATE_NOOP("Config","연 락 처"), + QT_TRANSLATE_NOOP("Config","이 름"), + QT_TRANSLATE_NOOP("Config","위치정보") +}; + +const char hotline_service_item_name[3][32] ={ + QT_TRANSLATE_NOOP("Config","연 락 처"), + QT_TRANSLATE_NOOP("Config","위치정보") +}; + + + namespace Define { enum ConfigType { @@ -166,91 +250,6 @@ namespace Define rest_time_rest=0, rest_time_target }; - - const char language_menu[3][20]{ - "한국어\0", - "中國語\0", - "English" - }; - - const char time_type_menu[2][16]={ - "24h\0", - "am/pm\0" - }; - - - - const char temptype_menu[2][16]{ - "섭씨(℃)\0", - "화씨(℉)\0" - }; - - const char best_dish_weight_menu[4][16]={ - "700g\0", - "700-899g\0", - "900-1099g\0", - "1100g" - }; - - - - const char rest_time_type_menu[2][16] = { - "잔여시간\0", - "타겟시간\0" - }; - - const char set_unset_menu[2][16]={ - "설정취소\0", - "설정\0" - }; - - const char active_on_off_menu[2][16]={ - "비활성\0", - "활성화\0" - }; - - const char on_off_menu[2][16] = { - "끄기\0", - "켜기\0" - }; - - typedef struct _config_1digit_set{ - char str_unit[8]; - int maxlen; - int min; - int max; - }config_1digit_set; - - const config_1digit_set auto_darkness_dlgset = { - "min\0", - 2, - 1, - 30, - }; - - const config_1digit_set load_ready_dlgset ={ - "min\0", - 2, - 2, - 10, - }; - - const char software_item_name[3][32] ={ - "모 델 명", - "제조일자", - "소프트웨어 버전" - }; - - const char hotline_chef_item_name[3][32] = { - "연 락 처", - "이 름", - "위치정보" - }; - - const char hotline_service_item_name[3][32] ={ - "연 락 처", - "위치정보" - }; } @@ -287,109 +286,101 @@ class Config : public QObject 0x02,0x02,0x02,0x02,0x80,0x02 }; - const QString str_menu[3] ={ - tr("test"), - tr("name"), - tr("ok") - }; - const char config_format_kr[MAX_CONFIG_COUNT][64]={ + const char config_format[MAX_CONFIG_COUNT][64] = { "%S", "%S", "%S", - "%d", - "%d 분", - "%d g", //5 - "%d g", - "%d", - "%d", - "%d min", //9 + "%1", + QT_TR_NOOP("%1 분"), + "%1 g", //5 + "%1 g", + "%1", + "%1", + "%1 min", //9 "%S", //10 "%S", "%S", //end of Settings - "%d" ,//start of Sound - "%d번", - "%d", - "%d번", - "%d번", - "%d번", - "%d번", - "공장초기화", - "USB 삽입", //config_haccp_data_download, + "%1" ,//start of Sound + QT_TR_NOOP("%1번"), + "%1", + "%1번", + "%1번", + "%1번", + "%1번", + QT_TR_NOOP("공장초기화"), + QT_TR_NOOP("USB 삽입"), //config_haccp_data_download, "USB 삽입", //config_info_data_download, "USB 삽입", //config_service_data_download, "USB 삽입", //config_program_download, "USB 삽입", //config_program_upload, - "초기화", //config_program_initialize, + QT_TR_NOOP("초기화"), //config_program_initialize, "%d.%d.%d.%d", //config_ip, "%d.%d.%d.%d", //config_gateway, "%d.%d.%d.%d", //config_netmask, "USB 삽입", //config_set_download, "USB 삽입", //config_set_upload, "%s", //config_set_half_energy, - "%d", //config_set_auto_darkness, - "%d", //config_set_ilc_cook_temphumi_ready, - "%d", //config_set_load_ready, + "%1", //config_set_auto_darkness, + "%1", //config_set_ilc_cook_temphumi_ready, + "%1", //config_set_load_ready, "%s", //config_duty_wash, - "%d단계", //config_loading_door_monitoring, - "%d단계", //config_cooking_door_monitoring - "정보확인", //config_software_info, + QT_TR_NOOP("%1단계"), //config_loading_door_monitoring, + QT_TR_NOOP("%1단계"), //config_cooking_door_monitoring + QT_TR_NOOP("정보확인"), //config_software_info, "정보확인", //config_hotline_chef, "정보확인", //config_hotline_service, - "헹굼", //config_steam_wash + QT_TR_NOOP("헹굼"), //config_steam_wash "%s", //config_demo_mode, - "엔지니어모드 진입", //config_enter_engineer_mode, + QT_TR_NOOP("엔지니어모드 진입"), //config_enter_engineer_mode, }; - - char config_format[MAX_CONFIG_COUNT][64]; - const char config_title[MAX_CONFIG_COUNT][64]={ - "언어설정", //0 - "날짜와 시간", - "온도단위", - "화면밝기", - "응축식 후드의 정지지연", - "일품요리용 접시무게", //5 - "연회용 접시무게", - "ILC 조리선반 개수", - "ILC 조리선반 순서", - "ILC 조리 온습도 대기시간", - "조리시간 포맷", //10 - "실시간 단위 설정", - "잔여시간 시점변경설정", //12 - "마스터 볼륨", //13 - "키패드 소리 - 1", - "키패드 볼륨 ", //15 - "적재/실행 요청", - "프로그램 단계 종료", - "조리시간 종료", - "과정 중단/오류 식별", //19 - "음향설정 초기화", //20 - "HACCP 데이터 다운로드", //config_haccp_data_download, - "인포 데이터 다운로드", //config_info_data_download, - "서비스 데이터 다운로드", //config_service_data_download, - "프로그램 다운로드", //config_program_download, - "프로그램 업로드", //25 config_program_upload, - "모든 프로그램 삭제", //config_program_initialize, - "IP 주소", //config_ip, - "IP 게이트웨이", //config_gateway, - "IP 넷마스크", //config_netmask, - "기본설정 다운로드", //30 config_set_download, - "기본설정 업로드", //31 end of system config config_set_upload, - "하프에너지", //config_set_half_energy, - "화면 밝기 자동 감소", //config_set_auto_darkness, - "ILC 조리 온습도 대기시간", //config_set_ilc_cook_temphumi_ready, - "적재중 대기 시간", //config_set_load_ready, - "의무 세척과정", //config_duty_wash, - "적재 중 문열림 시간 모니터링",//config_loading_door_monitoring, - "조리 중 문열림 시간 모니터링" ,//config_cooking_door_monitoring - "제품유형/소프트웨어에 관한 정보",//config_software_info, - "핫라인-쉐프", //config_hotline_chef, - "핫라인-서비스", //config_hotline_service, - "증기 발생기 헹굼", //config_steam_wash - "시연모드", //config_demo_mode, - "서비스단계(엔지니어모드)" //config_enter_engineer_mode, + QT_TR_NOOP("언어설정"), //0 + QT_TR_NOOP("날짜와 시간"), + QT_TR_NOOP("온도단위"), + QT_TR_NOOP("화면밝기"), + QT_TR_NOOP("응축식 후드의 정지지연"), + QT_TR_NOOP("일품요리용 접시무게"), //5 + QT_TR_NOOP("연회용 접시무게"), + QT_TR_NOOP("ILC 조리선반 개수"), + QT_TR_NOOP("ILC 조리선반 순서"), + QT_TR_NOOP("ILC 조리 온습도 대기시간"), + QT_TR_NOOP("조리시간 포맷"), //10 + QT_TR_NOOP("실시간 단위 설정"), + QT_TR_NOOP("잔여시간 시점변경설정"), //12 + QT_TR_NOOP("마스터 볼륨"), //13 + QT_TR_NOOP("키패드 소리 - 1"), + QT_TR_NOOP("키패드 볼륨 "), //15 + QT_TR_NOOP("적재/실행 요청"), + QT_TR_NOOP("프로그램 단계 종료"), + QT_TR_NOOP("조리시간 종료"), + QT_TR_NOOP("과정 중단/오류 식별"), //19 + QT_TR_NOOP("음향설정 초기화"), //20 + QT_TR_NOOP("HACCP 데이터 다운로드"), //config_haccp_data_download, + QT_TR_NOOP("인포 데이터 다운로드"), //config_info_data_download, + QT_TR_NOOP("서비스 데이터 다운로드"), //config_service_data_download, + QT_TR_NOOP("프로그램 다운로드"), //config_program_download, + QT_TR_NOOP("프로그램 업로드"), //25 config_program_upload, + QT_TR_NOOP("모든 프로그램 삭제"), //config_program_initialize, + QT_TR_NOOP("IP 주소"), //config_ip, + QT_TR_NOOP("IP 게이트웨이"), //config_gateway, + QT_TR_NOOP("IP 넷마스크"), //config_netmask, + QT_TR_NOOP("기본설정 다운로드"), //30 config_set_download, + QT_TR_NOOP("기본설정 업로드"), //31 end of system config config_set_upload, + QT_TR_NOOP("하프에너지"), //config_set_half_energy, + QT_TR_NOOP("화면 밝기 자동 감소"), //config_set_auto_darkness, + QT_TR_NOOP("ILC 조리 온습도 대기시간"), //config_set_ilc_cook_temphumi_ready, + QT_TR_NOOP("적재중 대기 시간"), //config_set_load_ready, + QT_TR_NOOP("의무 세척과정"), //config_duty_wash, + QT_TR_NOOP("적재 중 문열림 시간 모니터링"), //config_loading_door_monitoring, + QT_TR_NOOP("조리 중 문열림 시간 모니터링"), //config_cooking_door_monitoring + QT_TR_NOOP("제품유형/소프트웨어에 관한 정보"), //config_software_info, + QT_TR_NOOP("핫라인-쉐프"), //config_hotline_chef, + QT_TR_NOOP("핫라인-서비스"), //config_hotline_service, + QT_TR_NOOP("증기 발생기 헹굼"), //config_steam_wash + QT_TR_NOOP("시연모드"), //config_demo_mode, + QT_TR_NOOP("서비스단계(엔지니어모드)") //config_enter_engineer_mode, }; QSet m_setFavorite; diff --git a/app/gui/oven_control/configresttimeformatdlg.cpp b/app/gui/oven_control/configresttimeformatdlg.cpp index c0450ea..c150e77 100644 --- a/app/gui/oven_control/configresttimeformatdlg.cpp +++ b/app/gui/oven_control/configresttimeformatdlg.cpp @@ -20,8 +20,8 @@ configResttimeFormatDlg::configResttimeFormatDlg(QWidget *parent) : foreach (QPushButton *button, findChildren()) connect(button, &QPushButton::pressed, SoundPlayer::playClick); - ui->pushButton_1->setText(tr(rest_time_type_menu[0])); - ui->pushButton_2->setText(tr(rest_time_type_menu[1])); + ui->pushButton_1->setText(QCoreApplication::translate("Config",rest_time_type_menu[0])); + ui->pushButton_2->setText(QCoreApplication::translate("Config", rest_time_type_menu[1])); reloadUi(); diff --git a/app/gui/oven_control/historylistwindow.cpp b/app/gui/oven_control/historylistwindow.cpp index b5e203a..9039ed3 100644 --- a/app/gui/oven_control/historylistwindow.cpp +++ b/app/gui/oven_control/historylistwindow.cpp @@ -9,6 +9,7 @@ #include "stringer.h" #include "soundplayer.h" + constexpr char HistoryListWindow::m_strWindowName[4][64]; HistoryListWindow::HistoryListWindow(QWidget *parent) : QMainWindow(parent), diff --git a/app/gui/oven_control/historylistwindow.h b/app/gui/oven_control/historylistwindow.h index 1a4dc4c..f1f2c8e 100644 --- a/app/gui/oven_control/historylistwindow.h +++ b/app/gui/oven_control/historylistwindow.h @@ -19,27 +19,32 @@ namespace ERROR_LOG_SPACE { ERROR_HISTORY_LOWERBUNNER, ERROR_HISTORY_TOTAL }; - - const uint8_t m_arrErrorMaxIdx[4] = {3,4,3,11}; - - const char m_strWindowName[4][64] = {"상부점화장치\0", - "스팀점화장치\0","하부점화장치\0","서비스에러기록종합\0"}; - const uint16_t m_arrErrorIdxs[3][20] = { //서비스 에러 기록 종합은 합산 + static const uint8_t m_arrErrorMaxIdx[4] = {3,4,3,11}; + static const uint16_t m_arrErrorIdxs[3][20] = { //서비스 에러 기록 종합은 합산 {ERROR_IDX_upper_fire_fail,ERROR_IDX_upper_pan_fail,ERROR_IDX_upper_motor_fail}, {ERROR_IDX_steam_fire_fail,ERROR_IDX_steam_pan_fail,ERROR_IDX_water_level_sensor_fail,ERROR_IDX_steam_gen_temp_high_alram}, {ERROR_IDX_lower_fire_fail,ERROR_IDX_lower_pan_fail,ERROR_IDX_lower_motor_fail} }; - } - using namespace ERROR_LOG_SPACE; + + + class HistoryListWindow : public QMainWindow { Q_OBJECT + static constexpr char m_strWindowName[4][64] = { + QT_TR_NOOP("상부점화장치\0"), + QT_TR_NOOP("스팀점화장치\0"), + QT_TR_NOOP("하부점화장치\0"), + QT_TR_NOOP("서비스에러기록종합\0") + }; + + public: explicit HistoryListWindow(QWidget *parent = 0); ~HistoryListWindow(); diff --git a/app/gui/oven_control/lang_en.qm b/app/gui/oven_control/lang_en.qm index 76fea30a42192aa5bb9fff30cfadcda41aff842d..d88da5039bcf287536bd9cd34635c20771edbeaf 100644 GIT binary patch literal 7492 zcmb_hZERE589s5qiJcqUN$iBMX}Zv+B`eTEB|2#iNa;5SvHgUQiqFWh zaT}gDld{%HLWCcXvO5wXj#`ew7-_Um5wiSQ(pdI8LRNf4?%gYg>~P5=5C55v$`?8M zUbn67K8WWG`ck&0kKe=dV;p^ZZEX_txbAbTJ7a5q^e+DWLyomi+6Er{6?VR6`{%D< ze_6criG5oMDLYZRqqPU$CzoIFRl&dY_QsK`u;0nCdWZe#pHE=jma^%`DCAZ;d=Ck* z)5Nj%j^n9oLxeb2JMKPu3b@zlYx)Q{!m;{{bAzoF`qIwsPrG2}bB<;IaVkGeVBLq# z>tnmYPp~5LG3+?L$+7;1VEf`lJWmNbuD=4mI)&#}fm2r{$J!H>JNLH{V&CIhw{I5s zTaM)?UH&)z4u9Wu?eB2l`)PDmyZwlBFGpJq$BJVdJvTX4 z-RD^IEJyDy_ux}rSdlq;{>8D{$I*L%f z-6Tqac#_NU55&&?re@F6@rz~n=xORX6zhwIBsuy*Q0`HVmN4<>Nhbs&eiKrW2OXCUk-8elvp`M#c-HNZFBg6E~ ze)ZfSy)>g6(+m22>qmwNV)-gDtVrs9%9jXn_^L=MNtm7DDr_| zz!0G`6Oo^UvV!m_J=9-Z&_lK(@Vs{EwXsyvRNR8wzInGhrD!xL!|$Ge6xDXd#P1@K zmK-l4?BWyijv`TFNGB1W z!}Iw``gC>P^y_hY`eiY7>pdi@NJnSssnJ4;SCVFU)TiYt%Tx&pS;`yz^N9G9noFv; z=4gB(ll;}q{=Q(hPBKsbFYrhAV_9qax{b_k-lh2dJC-U%f=~G>MYQ1gMvL`gB{n$x zbvPUXU2GpjY-tQnY#&$=NAcI-rp`h=$|*g1G5yL=dN_^}O~;cWuhe4H?8t0|sBHyn zAFQD;%c8bDA$-I3{{VjX8GH)sK85Ce(miR+;|U#`gG1`{5IvVjCF7#W{(=L6G>{Fj z8e*R5y6p`cMD^`B3(3y=g;sF_c}{akWJ3DlA~E!UadKx86ngt4D1F4&AN

;v>_OF(!_uPLofopG>4NSzlS1Xm$Zy#Tfo?e z0a>0g&w~aw1v)yVz8c3FL=%hlyjG*1l?m%2OzA>G1$t$ej@-ykW-XTcVHHkmNw7#b zJ>+NS&SumfE?HT^w5#>YJ3nQRZ(F!NGPZdne^zQm2_+e^8#cuwYU7 zftcJK4JtCzSa{j8kkX^oSdk_3Ww>Aow7M{vu%)6C%V5LzCCqw2IJ`>hhfT&gzh3O`ci?Nt^@t_XTzDo%eCUgti(MF!Vg2RGNdM7P2DQwlT*ur5OfB0lI-;M1g^RH_JfVxY|IPbH}0Q&48_x8rhRPQzM4qA zGpAk|Rg*6lrrc7Ct84emF@G<+5bKv7{bp&Yc#3K;+4iEcmKtYK4JMmVRMrxEo-BLw zZIN|UD?KN_s0m;Bg)9-3U(|%5{6b5*_6r>m>7e9~W{=P%ocI+T5e%O>)SABH`ASDb z2}Jy%5C%{F(qU$)r-v#J`O3#>~cw#n&DD&!6$agBNsoQ^v+G&#o3FA~l7>y}@oj zyS8NBPguAslT6QleI1w&bYwd+YO{Ww&66}^b{C$1f1=36m3@mRM z*j<-0FtAH9updYT(l!jnwgy0TOblnwascI>8P!zo0L6bZ8ruQ2F)%RcBxf)%a9A-p zKHLKoKgHyex`Kg$vy#bI{U}hpnCV3Q2LYe~%a}gw1{%m_%xtU-(sqOSc5yn85eA`| z{aGiA3IgTNvT06V2(*Zaz5DeQpuQURP1ZP$!z?Zo9mg?nd(tgu^Si|=mRl3&=Nk!(vp1V{QPW)E=E)*uo{4@ zC#;Ui5Wk{&u!oRbN7zXAfTGll)Wj03DuE7HV(?_hV<=`wWhi1OVNd|FQyI#EbTN=u z%8&+x3h diff --git a/app/gui/oven_control/main.cpp b/app/gui/oven_control/main.cpp index fc438df..9bd41b7 100644 --- a/app/gui/oven_control/main.cpp +++ b/app/gui/oven_control/main.cpp @@ -22,6 +22,10 @@ int main(int argc, char *argv[]) OvenStatistics::getInstance(oven); Config::getInstance(oven); +// QTranslator* trans = new QTranslator(); +// qDebug() << trans->load(":/lang_en.qm"); +// QApplication::installTranslator(trans); + MainWindow w; w.showFullScreen(); diff --git a/app/gui/oven_control/stringer.cpp b/app/gui/oven_control/stringer.cpp index d0faf91..25f1ac4 100644 --- a/app/gui/oven_control/stringer.cpp +++ b/app/gui/oven_control/stringer.cpp @@ -63,11 +63,11 @@ QString Stringer::remainingTime(int msecs) case RemainingTime: msecs /= 1000; if (msecs >= 3600) - return qApp->tr("%1시간 %2분").arg(msecs / 3600).arg((msecs % 3600) / 60, 2, 10, QLatin1Char('0')); + return QCoreApplication::tr("%1시간 %2분").arg(msecs / 3600).arg((msecs % 3600) / 60, 2, 10, QLatin1Char('0')); if (msecs >= 60) - return qApp->tr("%1분 %2초").arg(msecs / 60).arg(msecs % 60, 2, 10, QLatin1Char('0')); + return QCoreApplication::tr("%1분 %2초").arg(msecs / 60).arg(msecs % 60, 2, 10, QLatin1Char('0')); - return qApp->tr("%1초").arg(msecs); + return QCoreApplication::tr("%1초").arg(msecs); case FinishTime: QDateTime dateTime = QDateTime::currentDateTime().addMSecs(msecs); switch (realTimeFormat()) @@ -90,20 +90,20 @@ QString Stringer::remainingTime(int msecs, QString style) msecs /= 1000; if (msecs >= 3600) { - QString hour = heavySpan.arg(msecs / 3600) + lightSpan.arg(qApp->tr("시간")); - QString min = heavySpan.arg((msecs % 3600) / 60, 2, 10, QLatin1Char('0')) + lightSpan.arg(qApp->tr("분")); + QString hour = heavySpan.arg(msecs / 3600) + lightSpan.arg(QCoreApplication::tr("시간")); + QString min = heavySpan.arg((msecs % 3600) / 60, 2, 10, QLatin1Char('0')) + lightSpan.arg(QCoreApplication::tr("분")); return style + QString("%1 %2").arg(hour).arg(min); } if (msecs >= 60) { - QString min = heavySpan.arg(msecs / 60) + lightSpan.arg(qApp->tr("분")); - QString sec = heavySpan.arg(msecs % 60, 2, 10, QLatin1Char('0')) + lightSpan.arg(qApp->tr("초")); + QString min = heavySpan.arg(msecs / 60) + lightSpan.arg(QCoreApplication::tr("분")); + QString sec = heavySpan.arg(msecs % 60, 2, 10, QLatin1Char('0')) + lightSpan.arg(QCoreApplication::tr("초")); return style + QString("%1 %2").arg(min).arg(sec); } - return style + heavySpan.arg(msecs) + lightSpan.arg(qApp->tr("초")); + return style + heavySpan.arg(msecs) + lightSpan.arg(QCoreApplication::tr("초")); case FinishTime: QDateTime dateTime = QDateTime::currentDateTime().addMSecs(msecs); switch (realTimeFormat()) @@ -125,11 +125,11 @@ QString Stringer::remainingTime(qint64 msecs) case RemainingTime: msecs /= 1000; if (msecs >= 3600) - return qApp->tr("%1시간 %2분").arg(msecs / 3600).arg((msecs % 3600) / 60, 2, 10, QLatin1Char('0')); + return QCoreApplication::tr("%1시간 %2분").arg(msecs / 3600).arg((msecs % 3600) / 60, 2, 10, QLatin1Char('0')); if (msecs >= 60) - return qApp->tr("%1분 %2초").arg(msecs / 60).arg(msecs % 60, 2, 10, QLatin1Char('0')); + return QCoreApplication::tr("%1분 %2초").arg(msecs / 60).arg(msecs % 60, 2, 10, QLatin1Char('0')); - return qApp->tr("%1초").arg(msecs); + return QCoreApplication::tr("%1초").arg(msecs); case FinishTime: QDateTime dateTime = QDateTime::currentDateTime().addMSecs(msecs); switch (realTimeFormat())