Commit cc63fa9f8462ca364c98483fcb0681c3099e3d79
1 parent
740e7d5453
Exists in
master
and in
2 other branches
데모모드 삭제 및 파일 복사 기능 개선
- 버그 수정
Showing
3 changed files
with
27 additions
and
7 deletions
Show diff stats
app/gui/oven_control/configinfodlg.cpp
@@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
8 | 8 | ||
9 | #define MODEL_INFO_FILE_NAME "/prime/config/model_info.txt" | 9 | #define MODEL_INFO_FILE_NAME "/prime/config/model_info.txt" |
10 | #define CHEF_INFO_FILE_NAME "/prime/config/chef_info.txt" | 10 | #define CHEF_INFO_FILE_NAME "/prime/config/chef_info.txt" |
11 | -#define SERVICE_INFO_FILE_NAME "/prime/config/hotline_info.txt" | 11 | +#define SERVICE_INFO_FILE_NAME "/prime/config/service_info.txt" |
12 | 12 | ||
13 | static const char* g_strModelTypeName[] ={ | 13 | static const char* g_strModelTypeName[] ={ |
14 | QT_TRANSLATE_NOOP("ConfigInfoDlg", "전기식 10단"), | 14 | QT_TRANSLATE_NOOP("ConfigInfoDlg", "전기식 10단"), |
@@ -127,7 +127,7 @@ void ConfigInfoDlg::loadHotlineChefInfo(){ | @@ -127,7 +127,7 @@ void ConfigInfoDlg::loadHotlineChefInfo(){ | ||
127 | QLabel* label; | 127 | QLabel* label; |
128 | 128 | ||
129 | 129 | ||
130 | - | 130 | +//Default Value; |
131 | mapInfos[tr("연 락 처")] = "010-3004-6517"; | 131 | mapInfos[tr("연 락 처")] = "010-3004-6517"; |
132 | mapInfos[tr("이 름")] = "김성우"; | 132 | mapInfos[tr("이 름")] = "김성우"; |
133 | mapInfos[tr("위치정보")] ="인천광역시 남동구 남동동로 34번길 56"; | 133 | mapInfos[tr("위치정보")] ="인천광역시 남동구 남동동로 34번길 56"; |
@@ -150,7 +150,7 @@ void ConfigInfoDlg::loadHotlineServiceInfo(){ | @@ -150,7 +150,7 @@ void ConfigInfoDlg::loadHotlineServiceInfo(){ | ||
150 | QMap<QString , QString> mapInfos; | 150 | QMap<QString , QString> mapInfos; |
151 | QLabel* label; | 151 | QLabel* label; |
152 | 152 | ||
153 | - | 153 | +//Default Value |
154 | mapInfos[tr("연 락 처")] = "1644-9533"; | 154 | mapInfos[tr("연 락 처")] = "1644-9533"; |
155 | mapInfos[tr("위치정보")] ="인천광역시 남동구 남동동로 34번길 56"; | 155 | mapInfos[tr("위치정보")] ="인천광역시 남동구 남동동로 34번길 56"; |
156 | 156 |
app/gui/oven_control/configwindow.h
@@ -32,7 +32,7 @@ class ConfigWindow : public QMainWindow | @@ -32,7 +32,7 @@ class ConfigWindow : public QMainWindow | ||
32 | 32 | ||
33 | private: | 33 | private: |
34 | const uint16_t m_arrMaxMenuCount[7] ={ | 34 | const uint16_t m_arrMaxMenuCount[7] ={ |
35 | - 6,8,8,2,3,0,6 | 35 | + 6,8,8,2,3,0,5 |
36 | }; | 36 | }; |
37 | const Define::ConfigType m_arrConfigListInfos[7][20] = { | 37 | const Define::ConfigType m_arrConfigListInfos[7][20] = { |
38 | {config_language,config_datetime, config_temptype,config_backlight, config_time_type,config_resttime_format,}, | 38 | {config_language,config_datetime, config_temptype,config_backlight, config_time_type,config_resttime_format,}, |
@@ -41,7 +41,7 @@ private: | @@ -41,7 +41,7 @@ private: | ||
41 | {config_set_half_energy,config_set_auto_darkness,}, | 41 | {config_set_half_energy,config_set_auto_darkness,}, |
42 | {config_duty_wash,config_loading_door_monitoring,config_cooking_door_monitoring}, | 42 | {config_duty_wash,config_loading_door_monitoring,config_cooking_door_monitoring}, |
43 | {config_invalid,}, | 43 | {config_invalid,}, |
44 | - {config_software_info,config_hotline_chef,config_hotline_service,config_steam_wash,config_demo_mode,config_enter_engineer_mode} | 44 | + {config_software_info,config_hotline_chef,config_hotline_service,config_steam_wash,config_enter_engineer_mode} |
45 | }; | 45 | }; |
46 | 46 | ||
47 | void nextFocus(); | 47 | void nextFocus(); |
app/gui/oven_control/fileprocessdlg.cpp
@@ -116,9 +116,13 @@ void ProgramCopyWorker::workerMain(){ | @@ -116,9 +116,13 @@ void ProgramCopyWorker::workerMain(){ | ||
116 | foreach(QFileInfo finfo, strFileInfolist){ | 116 | foreach(QFileInfo finfo, strFileInfolist){ |
117 | srcFilepath = finfo.absoluteFilePath(); | 117 | srcFilepath = finfo.absoluteFilePath(); |
118 | destFilePath = QString("%1/%2").arg(QString(strDir).replace(srcpath,targetpath)).arg(finfo.fileName()); | 118 | destFilePath = QString("%1/%2").arg(QString(strDir).replace(srcpath,targetpath)).arg(finfo.fileName()); |
119 | + if(QFile::copy(srcFilepath, destFilePath)==false){ | ||
120 | + qDebug() << srcFilepath << " file copy fail! dest file path info is " << destFilePath; | ||
121 | + } | ||
119 | nCpyFileSize += finfo.size(); | 122 | nCpyFileSize += finfo.size(); |
120 | nCurProgress = (nCpyFileSize *100) / nTotalFileSize; | 123 | nCurProgress = (nCpyFileSize *100) / nTotalFileSize; |
121 | nRemainSec = (nTotalFileSize-nCpyFileSize)/200000; | 124 | nRemainSec = (nTotalFileSize-nCpyFileSize)/200000; |
125 | + | ||
122 | //qDebug() << srcFilepath << destFilePath << "total size " << nTotalFileSize << "nCpyFileSize " << nCpyFileSize; | 126 | //qDebug() << srcFilepath << destFilePath << "total size " << nTotalFileSize << "nCpyFileSize " << nCpyFileSize; |
123 | emit progressed(nCurProgress,nRemainSec); | 127 | emit progressed(nCurProgress,nRemainSec); |
124 | if(QThread::currentThread()->isInterruptionRequested()){ | 128 | if(QThread::currentThread()->isInterruptionRequested()){ |
@@ -169,6 +173,22 @@ void ProgramCopyWorker::workerMain(){ | @@ -169,6 +173,22 @@ void ProgramCopyWorker::workerMain(){ | ||
169 | } | 173 | } |
170 | } | 174 | } |
171 | else{ | 175 | else{ |
176 | + sync(); | ||
177 | + foreach(QString strinfo, m_arrSrcFileList){ | ||
178 | + QString filepath = strinfo.left(strinfo.indexOf(',',0)); | ||
179 | + QString destfiledir = strinfo.right(strinfo.size() - (strinfo.indexOf(',',0)+1)); | ||
180 | + QDir destdir(destfiledir); | ||
181 | + QFileInfo finfo(filepath); | ||
182 | + srcFilepath = filepath; | ||
183 | + destFilePath = QString("%1/%2.bak").arg(destfiledir).arg(finfo.fileName()); | ||
184 | + qDebug() << destFilePath; | ||
185 | + if(QFile::exists(destFilePath)){ | ||
186 | + if(QFile(destFilePath).remove()==false){ | ||
187 | + qDebug() << destFilePath << "delete fail"; | ||
188 | + } | ||
189 | + } | ||
190 | + else qDebug() << "file not found error"; | ||
191 | + } | ||
172 | foreach(QString srcpath, m_arrSrcDirList){ | 192 | foreach(QString srcpath, m_arrSrcDirList){ |
173 | qDebug() << "src dir : " << srcpath; | 193 | qDebug() << "src dir : " << srcpath; |
174 | QDir srcdir(srcpath); | 194 | QDir srcdir(srcpath); |
@@ -548,7 +568,7 @@ void FileProcessDlg::programDownload(){ | @@ -548,7 +568,7 @@ void FileProcessDlg::programDownload(){ | ||
548 | QString strSrcPath; | 568 | QString strSrcPath; |
549 | 569 | ||
550 | if(FileProcessor::detectUSB(strDescPath)){ | 570 | if(FileProcessor::detectUSB(strDescPath)){ |
551 | - worker.setDestPath(QString("%1").arg(strDescPath)); | 571 | + worker.setDestPath(QString("%1/prime").arg(strDescPath)); |
552 | worker.addSrcDir("/prime/cookbook"); | 572 | worker.addSrcDir("/prime/cookbook"); |
553 | worker.moveToThread(&programCopyThd); | 573 | worker.moveToThread(&programCopyThd); |
554 | 574 | ||
@@ -605,7 +625,7 @@ void FileProcessDlg::programUpload(){ | @@ -605,7 +625,7 @@ void FileProcessDlg::programUpload(){ | ||
605 | //worker.addSrcFile(QString("%1/prime/falinux/superdaemon,/falinux").arg(strSrcPath)); | 625 | //worker.addSrcFile(QString("%1/prime/falinux/superdaemon,/falinux").arg(strSrcPath)); |
606 | //worker.addSrcFile(QString("%1/prime/falinux/superdaemon.ini,/falinux").arg(strSrcPath)); | 626 | //worker.addSrcFile(QString("%1/prime/falinux/superdaemon.ini,/falinux").arg(strSrcPath)); |
607 | worker.setDestPath("/prime"); | 627 | worker.setDestPath("/prime"); |
608 | - worker.addSrcDir(QString("%1/%2").arg(strSrcPath,"cookbook")); | 628 | + worker.addSrcDir(QString("%1/%2").arg(strSrcPath,"prime/cookbook")); |
609 | worker.moveToThread(&programCopyThd); | 629 | worker.moveToThread(&programCopyThd); |
610 | 630 | ||
611 | connect(&programCopyThd,SIGNAL(started()), &worker, SLOT(workerMain())); | 631 | connect(&programCopyThd,SIGNAL(started()), &worker, SLOT(workerMain())); |