Commit 0faa32511e8b480ca554819b9465149f46f9469d

Authored by 김태훈
1 parent d61c943410
Exists in master and in 2 other branches fhd, fhd-demo

컴파일 경고 제거 및 리팩토링

app/gui/oven_control/autocooksettingwidget.cpp
... ... @@ -65,16 +65,6 @@ AutoCookSettingWidget::~AutoCookSettingWidget()
65 65 delete ui;
66 66 }
67 67  
68   -void AutoCookSettingWidget::keyPressEvent(QKeyEvent *event)
69   -{
70   -
71   -}
72   -
73   -void AutoCookSettingWidget::keyReleaseEvent(QKeyEvent *event)
74   -{
75   -
76   -}
77   -
78 68 void AutoCookSettingWidget::setupUi(Cook cook)
79 69 {
80 70 ui->cookTypeIcon->setPixmap(Define::icon(cook.type));
... ... @@ -148,18 +138,3 @@ QPushButton:checked { image: url(%3); }");
148 138 }
149 139 }
150 140 }
151   -
152   -void AutoCookSettingWidget::onEncoderLeft()
153   -{
154   -
155   -}
156   -
157   -void AutoCookSettingWidget::onEncoderRight()
158   -{
159   -
160   -}
161   -
162   -void AutoCookSettingWidget::onEncoderClicked(QWidget *clicked)
163   -{
164   -
165   -}
... ...
app/gui/oven_control/autocooksettingwidget.h
... ... @@ -30,21 +30,11 @@ public:
30 30 explicit AutoCookSettingWidget(AutoCookSetting setting, QWidget *parent = 0);
31 31 ~AutoCookSettingWidget();
32 32  
33   -protected:
34   - void keyPressEvent(QKeyEvent *event);
35   - void keyReleaseEvent(QKeyEvent *event);
36   -
37 33 private:
38 34 Ui::AutoCookSettingWidget *ui;
39 35 QList<ConfigWidget> configWidgets;
40 36  
41 37 void setupUi(Cook cook);
42   -
43   - QWidget *pushed = NULL;
44   -
45   - void onEncoderLeft();
46   - void onEncoderRight();
47   - void onEncoderClicked(QWidget *clicked);
48 38 };
49 39  
50 40 #endif // AUTOCOOKSETTINGWIDGET_H
... ...
app/gui/oven_control/clock.cpp
1 1 #include "clock.h"
2 2  
3 3 #include <QPainter>
4   -#include <QDateTime>
5 4 #include <QTime>
6 5 #include <QTimer>
7 6 #include <QtDebug>
  7 +#include <QPaintEvent>
8 8  
9 9 Clock::Clock(QWidget *parent) : QWidget(parent)
10 10 {
... ... @@ -21,7 +21,7 @@ void Clock::checkUpdate()
21 21 {
22 22 if (ticking)
23 23 {
24   - QTime cur = QDateTime::currentDateTime().time();
  24 + QTime cur = QTime::currentTime();
25 25 if (cur.second() != last.second())
26 26 {
27 27 last = cur;
... ... @@ -34,7 +34,7 @@ void Clock::checkUpdate()
34 34  
35 35 void Clock::paintEvent(QPaintEvent */*event*/)
36 36 {
37   - QTime time = QDateTime::currentDateTime().time();
  37 + QTime time = QTime::currentTime();
38 38  
39 39 QPainter painter(this);
40 40 painter.setRenderHint(QPainter::Antialiasing);
... ... @@ -46,86 +46,37 @@ void Clock::paintEvent(QPaintEvent */*event*/)
46 46  
47 47 QPen hourHand(Qt::white, 11, Qt::SolidLine, Qt::RoundCap);
48 48 QPen hourArm(Qt::white, 4);
49   - QPen hourLine(Qt::white, 5);
50 49  
51 50 QPen minHand(hourHand);
52 51 QPen minArm(hourArm);
53   - QPen minLine(Qt::white, 2);
54 52  
55 53 QPen secHand(Qt::red, 3);
56 54  
57 55 QPen capPen(Qt::white, 4);
58 56 QBrush capBrush(Qt::black, Qt::SolidPattern);
59 57  
60   - QFont numberFont("Roboto");
61   - numberFont.setPixelSize(50);
62   -
63   - QFontMetrics numberFontMetrics(numberFont);
64   -
65   - QPen numberPen(Qt::white);
66   - numberPen.setWidth(2);
67   -/*
68   - // Lines
69   - painter.setPen(minLine);
70   - for (int j = 0; j < 60; ++j) {
71   - if ((j % 5) != 0)
72   -// painter.drawLine(92, 0, 96, 0);
73   - painter.drawLine(165, 0, 178, 0);
74   - painter.rotate(6.0);
75   - }
76   -
77   - painter.setPen(hourLine);
78   - for (int i = 0; i < 12; ++i) {
79   -// painter.drawLine(88, 0, 96, 0);
80   -// painter.drawLine(92, 0, 96, 0);
81   - painter.drawLine(165, 0, 178, 0);
82   - painter.rotate(30.0);
83   - }
84   -
85   - // Numbers
86   - painter.setPen(numberPen);
87   - painter.setFont(numberFont);
88   -
89   - QTransform transform;
90   -// QPoint targetPoint(0, -75);
91   - QPoint targetPoint(0, -138);
92   - QPoint transformedTarget(targetPoint);
93   -
94   - QString strings[] = { "12", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11" };
95   - for (int i = 0; i < 12; i++) {
96   - QString string = strings[i];
97   - QRect boundingRect = numberFontMetrics.boundingRect(string);
98   - boundingRect.moveCenter(transformedTarget);
99   - painter.drawText(boundingRect, Qt::AlignCenter, string);
100   -
101   - transform.rotate(30.0);
102   - transformedTarget = transform.map(targetPoint);
103   - }
104   -*/
105 58 // Needles
106   - qreal second = time.second() + time.msec() / 1000.0;
  59 + qreal sec = time.second() + time.msec() / 1000.0;
107 60 if (ticking)
108   - second = time.second();
  61 + sec = time.second();
109 62  
110   - qreal minute = time.minute() + second / 60.0;
111   - qreal hour = time.hour() + minute / 60.0;
  63 + qreal min = time.minute() + sec / 60.0;
  64 + qreal hour = time.hour() + min / 60.0;
112 65  
113 66 // Sec
114 67 painter.save();
115   - painter.rotate(6.0 * second);
  68 + painter.rotate(6.0 * sec);
116 69 painter.setPen(secHand);
117 70 painter.drawLine(0, 28, 0, -155);
118   -// painter.drawImage(-28, -8, secondImg);
119 71 painter.restore();
120 72  
121 73 // Min
122 74 painter.save();
123   - painter.rotate(6.0 * minute);
  75 + painter.rotate(6.0 * min);
124 76 painter.setPen(minArm);
125 77 painter.drawLine(0, 0, 0, -30);
126 78 painter.setPen(minHand);
127 79 painter.drawLine(0, -27, 0, -125);
128   -// painter.drawImage(-8, -9, minuteImg);
129 80 painter.restore();
130 81  
131 82 // Hour
... ...
app/gui/oven_control/config.cpp
... ... @@ -391,7 +391,6 @@ bool Config::loadFavorite(void){
391 391 }
392 392  
393 393 bool Config::saveFavorite(void){
394   - bool rst;
395 394 uint32_t itemp;
396 395 QFile file(FAVORITE_FILE_NAME);
397 396 if(file.open(QIODevice::WriteOnly | QIODevice::Text)){
... ... @@ -433,24 +432,6 @@ void Config::removeFavorite(Define::ConfigType idx){
433 432 m_setFavorite.remove((uint32_t)idx);
434 433 }
435 434  
436   -QString Config::getDateTimeString(uint32_t sec){
437   - Config* ins = getInstance();
438   - QString strTemp="";
439   - if(ins->configlist.items.temptype.d32==0){
440   -
441   - }
442   - return strTemp;
443   -}
444   -
445   -QString Config::getTempString(int cel_temp){
446   - Config* ins = getInstance();
447   - QString strTemp="";
448   - if(ins->configlist.items.temptype.d32==0){
449   -
450   - }
451   - return strTemp;
452   -}
453   -
454 435 QString Config::getProductSerial()
455 436 {
456 437 QString strProductSerial;
... ...
app/gui/oven_control/config.h
... ... @@ -438,8 +438,6 @@ public:
438 438 void copyConfigArea(const char* buff);
439 439 void insertFavorite(Define::ConfigType idx);
440 440 void removeFavorite(Define::ConfigType idx);
441   - static QString getDateTimeString(uint32_t sec);
442   - static QString getTempString(int cel_temp);
443 441 QString getProductSerial();
444 442  
445 443  
... ...
app/gui/oven_control/config1digitsetandenablesetdlg.cpp
... ... @@ -67,7 +67,6 @@ int Config1DigitSetAndEnableSetDlg::getValue(){
67 67  
68 68  
69 69 void Config1DigitSetAndEnableSetDlg::keyPressEvent(QKeyEvent *event){
70   - int i = 0;
71 70 switch (event->key())
72 71 {
73 72 case 0x01000032: // Turn left
... ... @@ -86,7 +85,6 @@ void Config1DigitSetAndEnableSetDlg::keyPressEvent(QKeyEvent *event){
86 85 }
87 86  
88 87 void Config1DigitSetAndEnableSetDlg::keyReleaseEvent(QKeyEvent *event){
89   - int i = 0;
90 88 switch (event->key())
91 89 {
92 90 case 0x01000032: // Turn left
... ...
app/gui/oven_control/config1digitsetdlg.cpp
... ... @@ -91,7 +91,6 @@ bool Config1DigitSetDlg::eventFilter(QObject *object, QEvent *event){
91 91 }
92 92  
93 93 void Config1DigitSetDlg::keyPressEvent(QKeyEvent *event){
94   - int i = 0;
95 94 switch (event->key())
96 95 {
97 96 case 0x01000032: // Turn left
... ... @@ -110,7 +109,6 @@ void Config1DigitSetDlg::keyPressEvent(QKeyEvent *event){
110 109 }
111 110  
112 111 void Config1DigitSetDlg::keyReleaseEvent(QKeyEvent *event){
113   - int i = 0;
114 112 switch (event->key())
115 113 {
116 114 case 0x01000032: // Turn left
... ...
app/gui/oven_control/configdatetimedlg.cpp
... ... @@ -71,18 +71,12 @@ void ConfigDateTimeDlg::on_ctrBtnOk_clicked()
71 71 this->accept();
72 72 }
73 73  
74   -void ConfigDateTimeDlg::on_spinBox_valueChanged(int arg1)
75   -{
76   -
77   -}
78   -
79 74 void ConfigDateTimeDlg::on_ctrBtnCancel_clicked()
80 75 {
81 76 this->reject();
82 77 }
83 78  
84 79 void ConfigDateTimeDlg::keyPressEvent(QKeyEvent *event){
85   - int i = 0;
86 80 switch (event->key())
87 81 {
88 82 case 0x01000032: // Turn left
... ... @@ -101,7 +95,6 @@ void ConfigDateTimeDlg::keyPressEvent(QKeyEvent *event){
101 95 }
102 96  
103 97 void ConfigDateTimeDlg::keyReleaseEvent(QKeyEvent *event){
104   - int i = 0;
105 98 switch (event->key())
106 99 {
107 100 case 0x01000032: // Turn left
... ...
app/gui/oven_control/configdatetimedlg.h
... ... @@ -21,8 +21,6 @@ public:
21 21 private slots:
22 22 void on_ctrBtnOk_clicked();
23 23  
24   - void on_spinBox_valueChanged(int arg1);
25   -
26 24 void on_ctrBtnCancel_clicked();
27 25  
28 26 void keyCancel_clicked();
... ...
app/gui/oven_control/configinfodlg.cpp
... ... @@ -165,7 +165,7 @@ void ConfigInfoDlg::loadHotlineServiceInfo(){
165 165 }
166 166 }
167 167  
168   -void ConfigInfoDlg::keyPressEvent(QKeyEvent *event){
  168 +void ConfigInfoDlg::keyPressEvent(QKeyEvent */*event*/){
169 169  
170 170 }
171 171  
... ...
app/gui/oven_control/configwindow.cpp
... ... @@ -20,7 +20,6 @@ ConfigWindow::ConfigWindow(QWidget *parent) :
20 20 QMainWindow(parent),
21 21 ui(new Ui::ConfigWindow)
22 22 {
23   - uint32_t idx;
24 23 ui->setupUi(this);
25 24  
26 25 ui->clockContainer->setParent(ui->upperStack);
... ... @@ -36,15 +35,6 @@ ConfigWindow::ConfigWindow(QWidget *parent) :
36 35  
37 36 config_item item;
38 37  
39   -
40   - QSetIterator<uint32_t> itr = cfg->getConstBeginFavorite();
41   - while(itr.hasNext()) itr.next();
42   -
43   - while(itr.hasPrevious()){
44   - idx = itr.previous();
45   - //configbtn = new ConfigPanelButton(this,idx);
46   - }
47   -
48 38 m_nCurConfigPos = config_menu_favorite;
49 39  
50 40 reloadUi();
... ...
app/gui/oven_control/cookpanelbutton.cpp
... ... @@ -13,8 +13,8 @@ CookPanelButton::CookPanelButton(CookRecord record, QWidget *parent) :
13 13 record(record),
14 14 ui(new Ui::CookPanelButton),
15 15 rendered(false),
16   - longPressEnabled(false),
17   - emitted(false)
  16 + emitted(false),
  17 + longPressEnabled(false)
18 18 {
19 19 ui->setupUi(this);
20 20  
... ...
app/gui/oven_control/electricmodelsettingwindow.cpp
... ... @@ -13,15 +13,11 @@ ElectricModelSettingWindow::ElectricModelSettingWindow(QWidget *parent) :
13 13 ui->clockContainer->setParent(ui->upperStack);
14 14 setAttribute(Qt::WA_DeleteOnClose);
15 15  
16   -
17   -
18 16 foreach (QPushButton *button, findChildren<QPushButton *>())
19 17 connect(button, &QPushButton::pressed, SoundPlayer::playClick);
20 18  
21   - Config* cfg = Config::getInstance();
22   - Define::config_item item;
23   - item = cfg->getConfigValue(Define::config_model);
24   - selitem = item.d32;
  19 + Define::config_item item = Config::getInstance()->getConfigValue(Define::config_model);
  20 + selitem = (Define::model_type) item.d32;
25 21 switch(selitem){
26 22 case Define::model_electric_10:
27 23 ui->e10Button->setChecked(true);
... ... @@ -35,7 +31,10 @@ ElectricModelSettingWindow::ElectricModelSettingWindow(QWidget *parent) :
35 31 case Define::model_electric_40:
36 32 ui->e40Button->setChecked(true);
37 33 break;
  34 + default:
  35 + break;
38 36 }
  37 +
39 38 this->setFocus();
40 39 m_vectorTabOrder.append(this);
41 40 m_vectorTabOrder.append(ui->e10Button);
... ... @@ -62,37 +61,27 @@ void ElectricModelSettingWindow::setModel(Define::model_type model)
62 61  
63 62 void ElectricModelSettingWindow::on_e10Button_clicked()
64 63 {
65   - //setModel(Define::model_electric_10);
66 64 selitem = Define::model_electric_10;
67 65 }
68 66  
69 67 void ElectricModelSettingWindow::on_e20Button_clicked()
70 68 {
71   - //setModel(Define::model_electric_20);
72 69 selitem = Define::model_electric_20;
73 70 }
74 71  
75 72 void ElectricModelSettingWindow::on_e24Button_clicked()
76 73 {
77   - //setModel(Define::model_electric_24);
78   -
79 74 selitem = Define::model_electric_24;
80   -
81 75 }
82 76  
83 77 void ElectricModelSettingWindow::on_e40Button_clicked()
84 78 {
85   - //setModel(Define::model_electric_40);
86   -
87 79 selitem = Define::model_electric_40;
88 80 }
89 81  
90 82 void ElectricModelSettingWindow::on_backButton_clicked()
91 83 {
92   - Config* cfg = Config::getInstance();
93   - Define::config_item item;
94   - item = cfg->getConfigValue(Define::config_model);
95   -
  84 + Define::config_item item = Config::getInstance()->getConfigValue(Define::config_model);
96 85 if(selitem != item.d32){
97 86 YesNoPopupDlg* yesnopop = new YesNoPopupDlg(this, tr("모델을 변경하시겠습니까?"));
98 87 yesnopop->setModal(true);
... ...
app/gui/oven_control/electricmodelsettingwindow.h
... ... @@ -36,7 +36,7 @@ private slots:
36 36  
37 37 private:
38 38 Ui::ElectricModelSettingWindow *ui;
39   - int selitem;
  39 + Define::model_type selitem;
40 40  
41 41 QWidget *pushed = NULL;
42 42 QVector<QWidget*> m_vectorTabOrder;
... ...
app/gui/oven_control/fileprocessdlg.cpp
... ... @@ -35,12 +35,9 @@ void ProgramCopyWorker::workerMain(){
35 35 uint16_t nCurProgress=0;
36 36 int nRemainSec = 0;
37 37 QStringList strdirlist;
38   - QStringList strFilelist;
39 38 QString srcFilepath;
40 39 QString destFilePath;
41 40  
42   - int i;
43   -
44 41 //make destination folder
45 42 QDir destdir(m_strDestDir);
46 43 if(!destdir.isRoot() && destdir.exists()==false){
... ... @@ -298,45 +295,16 @@ void FileProcessDlg::saveHistoryLineData(QTextStream &amp;out, uint16_t i, uint16_t
298 295 }
299 296 else{
300 297 dt.setTime_t(first_fired);
301   - strLine+= Stringer::DateTimeString(dt,Stringer::datetime_string_type_oneline) + ",";
  298 + strLine+= Stringer::dateTime(dt,Stringer::OneLine) + ",";
302 299 strLine += QString("%1").arg(fired_cnt) + ",";
303 300 dt.setTime_t(last_fried);
304   - strLine += Stringer::DateTimeString(dt,Stringer::datetime_string_type_oneline) + ",";
  301 + strLine += Stringer::dateTime(dt,Stringer::OneLine) + ",";
305 302 }
306 303 out << strLine << "\n";
307 304 qDebug() << strLine;
308 305 //}
309 306 }
310 307  
311   -void FileProcessDlg::saveHistoryTotalData(QTextStream &out){
312   - int i = 0;
313   - error_item *item;
314   - time_t firsttimebuf=0,lasttimebuf=0;
315   - uint16_t firecntbuf=0;
316   - QString strLine;
317   - QDateTime dt;
318   - OvenStatistics *ovenst = OvenStatistics::getInstance();
319   -
320   - //01 상부 점화 장치 데이터 초기화
321   -// for(i=0;i<m_arrErrorMaxIdx[ERROR_HISTORY_UPPERBUNNER];i++){
322   -// item = &(ovenst->srvdata->err_log.values[m_arrErrorIdxs[ERROR_HISTORY_UPPERBUNNER][i]]);
323   -// if(i==0) {firsttimebuf = item->first_fired;lasttimebuf = item->last_fried;firecntbuf=item->fired_cnt;}
324   -// else{
325   -// if( firsttimebuf > item->first_fired && item->first_fired != 0 ) firsttimebuf = item->first_fired;
326   -// if( lasttimebuf < item->last_fried ) lasttimebuf = item->last_fried;
327   -// firecntbuf += item->fired_cnt;
328   -// }
329   -
330   -// }
331   -// total_items[0].fired_cnt = firecntbuf;
332   -// total_items[0].first_fired = firsttimebuf;
333   -// total_items[0].last_fried = lasttimebuf;
334   -
335   -
336   -}
337   -
338   -
339   -
340 308 void FileProcessDlg::infodataDownload(){
341 309 QString strUsbPath;
342 310 QString strFile;
... ... @@ -490,7 +458,6 @@ void FileProcessDlg::servicedataDownload(){
490 458 QString strHeader = "no,name,time\n";
491 459 QString strFile;
492 460 QFile file;
493   - error_item *item;
494 461 uint32_t timetemp, totaltime=0;
495 462 int i = 1;
496 463 OvenStatistics *ovs = OvenStatistics::getInstance();
... ... @@ -604,13 +571,11 @@ void FileProcessDlg::onProgressed(int progress, int sec){
604 571 min = sec/60;
605 572 _sec = sec%60;
606 573 if(min >0){
607   - //strTemp.sprintf("남은 예상 시간 : %d분 %d초", min, _sec);
608   - strTemp = tr("남은 예상 시간 : %1분 %2초").arg(min).arg(sec);
  574 + strTemp = tr("남은 예상 시간 : %1분 %2초").arg(min).arg(_sec);
609 575 ui->ctrLbRemainTime->setText(strTemp);
610 576 }
611 577 else{
612   - //strTemp.sprintf("남은 예상 시간 : %d초", sec);
613   - strTemp = tr("남은 예상 시간 : %1초").arg(sec);
  578 + strTemp = tr("남은 예상 시간 : %1초").arg(_sec);
614 579 ui->ctrLbRemainTime->setText(strTemp);
615 580 }
616 581 }
... ... @@ -755,7 +720,6 @@ void FileProcessDlg::standardInfoUpload()
755 720 {
756 721 QString strUsbPath;
757 722 QString strSrcPath;
758   - Config *cfg = Config::getInstance();
759 723 if(FileProcessor::detectUSB(strUsbPath)){
760 724 strSrcPath = QString("%1/%2").arg(strUsbPath).arg(MODEL_INFO_FILE_NAME);
761 725 QFile file(MODEL_INFO_FILE_NAME);
... ... @@ -808,7 +772,7 @@ void FileProcessDlg::standardInfoUpload()
808 772 }
809 773 }
810 774  
811   -void FileProcessDlg::keyPressEvent(QKeyEvent *event){
  775 +void FileProcessDlg::keyPressEvent(QKeyEvent */*event*/){
812 776  
813 777 }
814 778  
... ...
app/gui/oven_control/fileprocessdlg.h
... ... @@ -15,7 +15,6 @@
15 15 using namespace Define;
16 16 using namespace ERROR_LOG_SPACE;
17 17  
18   -
19 18 namespace Ui {
20 19 class FileProcessDlg;
21 20 }
... ... @@ -39,7 +38,6 @@ public slots:
39 38 void workerMain();
40 39 void workerStop();
41 40  
42   -
43 41 signals:
44 42 void finished();
45 43 void progressed(int progress, int sec);
... ... @@ -49,9 +47,7 @@ class FileProcessDlg : public QDialog
49 47 {
50 48 Q_OBJECT
51 49  
52   -
53 50 void saveHistoryLineData(QTextStream &out, uint16_t i, uint16_t cnt, time_t first_fired, time_t last_fried);
54   - void saveHistoryTotalData(QTextStream &out);
55 51  
56 52 public:
57 53 explicit FileProcessDlg(QWidget *parent = 0, ConfigType type = config_invalid, bool isDown = true);
... ...
app/gui/oven_control/fileprocessgauge.cpp
... ... @@ -12,7 +12,7 @@ FileProcessGauge::FileProcessGauge(QWidget *parent) : PreheatTempGauge(parent)
12 12 val = 30;
13 13 }
14 14  
15   -void FileProcessGauge::paintEvent(QPaintEvent *event){
  15 +void FileProcessGauge::paintEvent(QPaintEvent */*event*/){
16 16 QPainter painter(this);
17 17 painter.setBrush(Qt::NoBrush);
18 18 painter.setPen(Qt::NoPen);
... ...
app/gui/oven_control/fileprocessor.cpp
... ... @@ -18,8 +18,6 @@ bool FileProcessor::fileExist(const QString &amp;path_file){
18 18 }
19 19  
20 20 bool FileProcessor::detectUSB(QString &usbPath){
21   - int curUsbNum=0xff;
22   - bool usbMountErr = false;
23 21 QString checkUsbName[3] = {
24 22 "sda",
25 23 "sdb",
... ...
app/gui/oven_control/functiontestwindow.cpp
... ... @@ -124,10 +124,8 @@ void FunctionTestWindow::onEncoderClicked(QWidget *clicked)
124 124 b->click();
125 125 }
126 126  
127   -bool FunctionTestWindow::readFromRpmFilea(QMap<QString, uint32_t> &rpm_map, const QString &filename){
  127 +bool FunctionTestWindow::readFromRpmFile(QMap<QString, uint32_t> &rpm_map, const QString &filename){
128 128 QFile file(filename);
129   - QString label;
130   - uint32_t value;
131 129  
132 130 if(file.open(QIODevice::ReadOnly | QIODevice::Text)){
133 131 while(!file.atEnd()){
... ... @@ -184,9 +182,7 @@ void FunctionTestWindow::on_adjustBlowerFan_clicked()
184 182  
185 183 strUsbPath = QString("%1%2").arg(strUsbPath).arg(QString(RPM_INFO_FILE_NAME));
186 184  
187   - if(readFromRpmFilea(rpm_infos,strUsbPath)){
188   -
189   - YesNoPopupDlg* dlg = new YesNoPopupDlg(this, tr("송풍기 교정을 하시겠습니까?"));
  185 + if(readFromRpmFile(rpm_infos,strUsbPath)){
190 186  
191 187 item.d32 = rpm_infos["config_burner1_pwr1_normal_rpm"];
192 188 cfg->setConfigValue(Define::config_burner1_pwr1_normal_rpm, item);
... ...
app/gui/oven_control/functiontestwindow.h
... ... @@ -43,7 +43,7 @@ private:
43 43 void onEncoderLeft();
44 44 void onEncoderRight();
45 45 void onEncoderClicked(QWidget *clicked);
46   - bool readFromRpmFilea(QMap<QString, uint32_t> &rpm_map, const QString &filename);
  46 + bool readFromRpmFile(QMap<QString, uint32_t> &rpm_map, const QString &filename);
47 47 };
48 48  
49 49 #endif // FUNCTIONTESTWINDOW_H
... ...
app/gui/oven_control/historylistwindow.cpp
... ... @@ -88,9 +88,7 @@ void HistoryListWindow::reloadDataset(void){
88 88 int i = 0;
89 89 QString strPrefix = tr("에러");
90 90 QString strTemp = "";
91   - char strTime[64];
92 91 error_item *item;
93   - struct tm *timeptr;
94 92  
95 93  
96 94 for(i=0;i<MAX_DISP_ITEM;i++){
... ... @@ -109,9 +107,9 @@ void HistoryListWindow::reloadDataset(void){
109 107 m_ctrlCountLabels[i] ->setText(strTemp.sprintf("%d",item->fired_cnt));
110 108 QDateTime dt;
111 109 dt.setTime_t(item->first_fired);
112   - m_ctrlFirstTimeLabels[i]->setText(Stringer::DateTimeString(dt, Stringer::datetime_string_type_oneline));
  110 + m_ctrlFirstTimeLabels[i]->setText(Stringer::dateTime(dt, Stringer::OneLine));
113 111 dt.setTime_t(item->last_fried);
114   - m_ctrlLastTimeLabels[i]->setText(Stringer::DateTimeString(dt, Stringer::datetime_string_type_oneline));
  112 + m_ctrlLastTimeLabels[i]->setText(Stringer::dateTime(dt, Stringer::OneLine));
115 113 }
116 114 }
117 115 else{
... ...
app/gui/oven_control/manualcooksettingwidget.cpp
... ... @@ -112,53 +112,3 @@ void ManualCookSettingWidget::setFan(int level)
112 112 break;
113 113 }
114 114 }
115   -
116   -void ManualCookSettingWidget::keyPressEvent(QKeyEvent *event)
117   -{
118   - switch (event->key())
119   - {
120   - case 0x01000032: // Turn left
121   - onEncoderLeft();
122   - break;
123   - case 0x01000031: // Push
124   - pushed = focusWidget();
125   - break;
126   - case 0x01000030: // Turn right
127   - onEncoderRight();
128   - break;
129   - }
130   -}
131   -
132   -void ManualCookSettingWidget::keyReleaseEvent(QKeyEvent *event)
133   -{
134   - switch (event->key())
135   - {
136   - case 0x01000032: // Turn left
137   - onEncoderLeft();
138   - break;
139   - case 0x01000031: // Push
140   - if (focusWidget() == pushed)
141   - onEncoderClicked(pushed);
142   -
143   - pushed = NULL;
144   - break;
145   - case 0x01000030: // Turn right
146   - onEncoderRight();
147   - break;
148   - }
149   -}
150   -
151   -void ManualCookSettingWidget::onEncoderLeft()
152   -{
153   -
154   -}
155   -
156   -void ManualCookSettingWidget::onEncoderRight()
157   -{
158   -
159   -}
160   -
161   -void ManualCookSettingWidget::onEncoderClicked(QWidget *clicked)
162   -{
163   -
164   -}
... ...
app/gui/oven_control/manualcooksettingwidget.h
... ... @@ -26,18 +26,8 @@ public:
26 26 void setCoreTemp(int celsius);
27 27 void setFan(int level);
28 28  
29   -protected:
30   - void keyPressEvent(QKeyEvent *event);
31   - void keyReleaseEvent(QKeyEvent *event);
32   -
33 29 private:
34 30 Ui::ManualCookSettingWidget *ui;
35   -
36   - QWidget *pushed = NULL;
37   -
38   - void onEncoderLeft();
39   - void onEncoderRight();
40   - void onEncoderClicked(QWidget *clicked);
41 31 };
42 32  
43 33 #endif // MANUALCOOKSETTINGWIDGET_H
... ...
app/gui/oven_control/notipopupdlg.cpp
... ... @@ -36,7 +36,7 @@ void NotiPopupDlg::on_ctrBtnOk_clicked()
36 36 }
37 37  
38 38  
39   -void NotiPopupDlg::keyPressEvent(QKeyEvent *event){
  39 +void NotiPopupDlg::keyPressEvent(QKeyEvent */*event*/){
40 40  
41 41 }
42 42  
... ...
app/gui/oven_control/oven_control.pro
... ... @@ -65,7 +65,7 @@ SOURCES += main.cpp\
65 65 yesnopopupdlg.cpp \
66 66 configpanelbutton.cpp \
67 67 config.cpp \
68   - basicsettingwindow.cpp \
  68 +#basicsettingwindow.cpp \
69 69 programmingwindow.cpp \
70 70 primewindow.cpp \
71 71 cookpanelbutton.cpp \
... ... @@ -184,7 +184,7 @@ HEADERS += mainwindow.h \
184 184 yesnopopupdlg.h \
185 185 configpanelbutton.h \
186 186 config.h \
187   - basicsettingwindow.h \
  187 + #basicsettingwindow.h \
188 188 programmingwindow.h \
189 189 primewindow.h \
190 190 cookpanelbutton.h \
... ... @@ -280,7 +280,7 @@ FORMS += mainwindow.ui \
280 280 adjustmentwindow.ui \
281 281 yesnopopupdlg.ui \
282 282 configpanelbutton.ui \
283   - basicsettingwindow.ui \
  283 + #basicsettingwindow.ui \
284 284 programmingwindow.ui \
285 285 primewindow.ui \
286 286 cookpanelbutton.ui \
... ...
app/gui/oven_control/realtimesensorwindow.cpp
... ... @@ -83,9 +83,7 @@ uint16_t i_temp1,i_temp2;
83 83 type_temp temp_temp;
84 84  
85 85 void RealtimeSensorWindow::reloadUi(void){
86   - char strTime[64];
87 86 QString strTemp="";
88   - struct tm *timeptr;
89 87 int i = 0;
90 88 OvenStatistics* ovs = OvenStatistics::getInstance();
91 89 if(ovs!= NULL){
... ... @@ -123,7 +121,7 @@ void RealtimeSensorWindow::reloadUi(void){
123 121 dt_tm.setTime_t(m_arrSensorItems[i]->last_high_time);
124 122 //timeptr = localtime(&(m_arrSensorItems[i]->last_high_time));
125 123 //strftime(strTime,64,"%y-%m-%d\n%H:%M:%S",timeptr);
126   - m_arrLbState[3][i]->setText(Stringer::DateTimeString(dt_tm));
  124 + m_arrLbState[3][i]->setText(Stringer::dateTime(dt_tm));
127 125 }
128 126 else{
129 127 m_arrLbState[3][i]->setText("-");
... ...
app/gui/oven_control/servicedata.cpp
... ... @@ -108,7 +108,7 @@ bool ServiceData::loadServiceData(void){
108 108 bool ServiceData::resetSensorlogData()
109 109 {
110 110 memset((void*)sensor_log.data,0x00, sizeof(sensor_statics_log));
111   - saveServiceData();
  111 + return saveServiceData();
112 112 }
113 113  
114 114 bool ServiceData::saveServiceData(void){
... ...
app/gui/oven_control/servicepassinputdlg.cpp
... ... @@ -81,7 +81,6 @@ void ServicePassInputDlg::keyboardInputEvent(QString strIn){
81 81 }
82 82  
83 83 void ServicePassInputDlg::keyPressEvent(QKeyEvent *event){
84   - int i = 0;
85 84 switch (event->key())
86 85 {
87 86 case 0x01000032: // Turn left
... ... @@ -100,7 +99,6 @@ void ServicePassInputDlg::keyPressEvent(QKeyEvent *event){
100 99 }
101 100  
102 101 void ServicePassInputDlg::keyReleaseEvent(QKeyEvent *event){
103   - int i = 0;
104 102 switch (event->key())
105 103 {
106 104 case 0x01000032: // Turn left
... ...
app/gui/oven_control/stringer.cpp
... ... @@ -216,21 +216,21 @@ QString Stringer::unusedTemperature(QString style)
216 216 }
217 217 }
218 218  
219   -
220   -QString Stringer::DateTimeString(const QDateTime &dt_tm, datetime_string_type type)
  219 +QString Stringer::dateTime(const QDateTime &dateTime, DateTimeType type)
221 220 {
222   - QString strTemp;
223 221 Define::config_item item = Config::getInstance()->getConfigValue(Define::config_time_type);
224   - switch(item.d32){
225   - case Define::time_type_12h:
226   - if(type == datetime_string_type_oneline) strTemp = dt_tm.toString("yy-MM-dd a hh:mm" );
227   - else strTemp = dt_tm.toString("yy-MM-dd\na hh:mm" );
228   - break;
  222 + switch(item.d32)
  223 + {
  224 + case Define::time_type_12h:
  225 + if (type == OneLine)
  226 + return dateTime.toString("yy-MM-dd a hh:mm");
  227 + else
  228 + return dateTime.toString("yy-MM-dd\na hh:mm");
229 229 case Define::time_type_24h:
230 230 default:
231   - if(type == datetime_string_type_oneline) strTemp = dt_tm.toString("yy-MM-dd HH:mm" );
232   - else strTemp = dt_tm.toString("yy-MM-dd\nHH:mm" );
233   - break;
  231 + if (type == OneLine)
  232 + return dateTime.toString("yy-MM-dd HH:mm");
  233 + else
  234 + return dateTime.toString("yy-MM-dd\nHH:mm");
234 235 }
235   - return strTemp;
236 236 }
... ...
app/gui/oven_control/stringer.h
... ... @@ -7,10 +7,7 @@
7 7  
8 8 namespace Stringer {
9 9  
10   -enum datetime_string_type{
11   - datetime_string_type_oneline=0,
12   - datetime_string_type_twoline
13   -};
  10 +enum DateTimeType { OneLine, TwoLine };
14 11  
15 12 const QString fontSize14("\
16 13 <style>\
... ... @@ -29,8 +26,7 @@ QString temperature(int current, int target);
29 26 QString temperature(int current, int target, QString style);
30 27 QString unusedTemperature();
31 28 QString unusedTemperature(QString style);
32   -QString DateTimeString(const QDateTime &dt_tm, datetime_string_type type=datetime_string_type_twoline);
33   -
  29 +QString dateTime(const QDateTime &dateTime, DateTimeType type = TwoLine);
34 30  
35 31 }
36 32  
... ...
app/gui/oven_control/usbcheckpopupdlg.cpp
... ... @@ -42,22 +42,18 @@ void UsbCheckPopupDlg::usbCheckTimerFired(){
42 42  
43 43  
44 44 void UsbCheckPopupDlg::keyPressEvent(QKeyEvent *event){
45   - int i = 0;
46 45 switch (event->key())
47 46 {
48 47 case 0x01000032: // Turn left
49 48 break;
50 49 case 0x01000031: // Push
51   - {
52 50 break;
53   - }
54 51 case 0x01000030: // Turn right
55 52 break;
56 53 }
57 54 }
58 55  
59 56 void UsbCheckPopupDlg::keyReleaseEvent(QKeyEvent *event){
60   - int i = 0;
61 57 switch (event->key())
62 58 {
63 59 case 0x01000032: // Turn left
... ...