Commit a6492fbecf3a875ebf6e7201d0113f7150a9fe19

Authored by 고영탁
1 parent 982cac1614
Exists in master and in 2 other branches fhd, fhd-demo

오븐 정보 다이얼로그 수정

 - 버전 정보 출력 기능 수정 : define.h 사용
app/gui/oven_control/configinfodlg.cpp
... ... @@ -5,6 +5,7 @@
5 5 #include "ui_configinfodlg.h"
6 6 #include "soundplayer.h"
7 7 #include "config.h"
  8 +#include "define.h"
8 9  
9 10  
10 11  
... ... @@ -74,11 +75,15 @@ bool ConfigInfoDlg::readFromInfoFile(QMap<QString, QString> &info_map, const QSt
74 75 qDebug() << "orgin size " << info_map.size();
75 76 if(file.open(QIODevice::ReadOnly | QIODevice::Text)){
76 77 while(!file.atEnd()){
77   - QString line = QString::fromUtf8(file.readLine());
  78 + QString line = (QString::fromUtf8(file.readLine())).remove(QChar('\n'));
78 79 info_map[line.section(',',0,0)] = line.section(',',1,1);
79 80 }
80 81 qDebug() << file.fileName() << "read OK!";
81 82 qDebug() << "final size " << info_map.size();
  83 + QList<QString> list = info_map.keys();
  84 + for(int i=0; i< info_map.size() ;i++){
  85 + qDebug() << list[i] << info_map[list[i]];
  86 + }
82 87 return true;
83 88 }
84 89 else {
... ... @@ -87,6 +92,13 @@ bool ConfigInfoDlg::readFromInfoFile(QMap&lt;QString, QString&gt; &amp;info_map, const QSt
87 92 return false;
88 93 }
89 94  
  95 +QString ConfigInfoDlg::getSoftwareVerString()
  96 +{
  97 + if(MAJOR_VER == 0)
  98 + return QString("V%1.%2.%3 BETA").arg(MAJOR_VER).arg(MINOR_VER).arg(HOTFIX_VER);
  99 + else return QString("V%1.%2.%3").arg(MAJOR_VER).arg(MINOR_VER).arg(HOTFIX_VER);
  100 +}
  101 +
90 102  
91 103 void ConfigInfoDlg::loadSoftwareInfo(){
92 104 Config* cfg = Config::getInstance();
... ... @@ -102,14 +114,14 @@ void ConfigInfoDlg::loadSoftwareInfo(){
102 114 mapInfos[tr("제조국")] = "Korea";
103 115 mapInfos[tr("제조사")] = "프라임";
104 116 mapInfos[tr("제품번호")] = "01";
105   - mapInfos[tr("소프트웨어 버전")] ="0.1 BETA";
106   -
  117 + mapInfos[tr("소프트웨어 버전")] = getSoftwareVerString();
107 118 mapInfos[tr("현재모델")] = tr(g_strModelTypeName[cfg->getConfigValue(Define::config_model).d32]);
108 119  
109 120 readFromInfoFile(mapInfos, QString(MODEL_INFO_FILE_NAME));
110 121  
111 122 for(int i =0;i<MAX_SOFTWARE_INFO_CNT;i++){
112 123 strTemp = mapInfos[tr(software_item_name[i])];
  124 +
113 125 label = new QLabel(this);
114 126 label ->setText(tr(software_item_name[i]).append(" :"));
115 127 ui->gridLayout_info->addWidget(label,i,0);
... ...
app/gui/oven_control/configinfodlg.h
... ... @@ -32,6 +32,7 @@ protected:
32 32 void keyPressEvent(QKeyEvent* event);
33 33  
34 34 bool readFromInfoFile(QMap<QString , QString> &info_map, const QString &filename);
  35 + QString getSoftwareVerString(void);
35 36  
36 37 private:
37 38 Ui::ConfigInfoDlg *ui;
... ...
app/gui/oven_control/define.h
... ... @@ -3,6 +3,10 @@
3 3  
4 4 #include <QtCore>
5 5  
  6 +#define MAJOR_VER 0
  7 +#define MINOR_VER 3
  8 +#define HOTFIX_VER 11
  9 +
6 10 namespace Define
7 11 {
8 12 enum CookType
... ...
app/gui/oven_control/lang_en.qm
No preview for this file type
app/gui/oven_control/lang_en.ts
... ... @@ -457,7 +457,7 @@ to factory setting values?&lt;/translation&gt;
457 457 <message>
458 458 <location filename="config.h" line="95"/>
459 459 <source>제조일자</source>
460   - <translation>Date of Manufacturing </translation>
  460 + <translation>Date of Manufacturing</translation>
461 461 </message>
462 462 <message>
463 463 <location filename="config.h" line="96"/>
... ... @@ -1066,9 +1066,7 @@ Value&lt;/translation&gt;
1066 1066 <message>
1067 1067 <location filename="configinfodlg.ui" line="144"/>
1068 1068 <source>확인</source>
1069   - <translation>Confirm
1070   -
1071   -Confirm</translation>
  1069 + <translation>Confirm</translation>
1072 1070 </message>
1073 1071 <message>
1074 1072 <location filename="configinfodlg.cpp" line="12"/>
... ... @@ -1138,7 +1136,7 @@ Confirm&lt;/translation&gt;
1138 1136 <message>
1139 1137 <location filename="configinfodlg.cpp" line="101"/>
1140 1138 <source>제조일자</source>
1141   - <translation>Date of Manufacturing </translation>
  1139 + <translation>Date of Manufacturing</translation>
1142 1140 </message>
1143 1141 <message>
1144 1142 <location filename="configinfodlg.cpp" line="102"/>
... ...