diff --git a/app/gui/oven_control/config.cpp b/app/gui/oven_control/config.cpp index 5600490..4177ca1 100644 --- a/app/gui/oven_control/config.cpp +++ b/app/gui/oven_control/config.cpp @@ -18,6 +18,7 @@ #include "confighalfenergydlg.h" #include "config1digitsetdlg.h" #include "configdutywashdlg.h" +#include "fileprocessor.h" using namespace Define; @@ -325,6 +326,7 @@ QString Config::getTempString(int cel_temp){ void Config::execConfigWindow(QWidget *parent, Define::ConfigType idx){ QDialog *dlg; bool bUsbDetect = false; + QString usbPath = ""; switch(idx){ case config_language: dlg = new ConfigLanguageDlg(parent); @@ -362,21 +364,26 @@ void Config::execConfigWindow(QWidget *parent, Define::ConfigType idx){ case config_service_data_download: case config_program_download: case config_set_download: - if(!bUsbDetect){ + if(!FileProcessor::detectUSB(usbPath)){ dlg = new UsbCheckPopupDlg(parent); dlg->exec(); } - dlg = new ConfigFileProcessDlg(parent,idx); - dlg->exec(); + if(FileProcessor::detectUSB(usbPath)){ + dlg = new ConfigFileProcessDlg(parent,idx); + dlg->exec(); + } return; case config_set_upload: case config_program_upload: - if(!bUsbDetect){ + + if(!FileProcessor::detectUSB(usbPath)){ dlg = new UsbCheckPopupDlg(parent); dlg->exec(); } - dlg = new ConfigFileProcessDlg(parent,idx,false); - dlg->exec(); + if(FileProcessor::detectUSB(usbPath)){ + dlg = new ConfigFileProcessDlg(parent,idx,false); + dlg->exec(); + } return; case config_set_half_energy: dlg = new ConfigHalfEnergyDlg(parent); diff --git a/app/gui/oven_control/configfileprocessdlg.cpp b/app/gui/oven_control/configfileprocessdlg.cpp index addab20..f044ab8 100644 --- a/app/gui/oven_control/configfileprocessdlg.cpp +++ b/app/gui/oven_control/configfileprocessdlg.cpp @@ -1,6 +1,7 @@ #include "configfileprocessdlg.h" #include "ui_configfileprocessdlg.h" #include "config.h" +#include "fileprocessdlg.h" ConfigFileProcessDlg::ConfigFileProcessDlg(QWidget *parent, ConfigType type, bool isDown) : QDialog(parent), @@ -12,6 +13,7 @@ ConfigFileProcessDlg::ConfigFileProcessDlg(QWidget *parent, ConfigType type, boo setAttribute(Qt::WA_NoSystemBackground); setAttribute(Qt::WA_TranslucentBackground); setAttribute(Qt::WA_DeleteOnClose); + m_bIsDown = isDown; if(type < config_invalid) { m_nCfgtype = type; @@ -26,6 +28,7 @@ ConfigFileProcessDlg::ConfigFileProcessDlg(QWidget *parent, ConfigType type, boo } } + } ConfigFileProcessDlg::~ConfigFileProcessDlg() @@ -35,11 +38,9 @@ ConfigFileProcessDlg::~ConfigFileProcessDlg() void ConfigFileProcessDlg::on_ctrBtnOk_clicked() { - switch(m_nCfgtype){ - default: - break; - } - + QDialog *dg; + dg = new FileProcessDlg(parentWidget(),m_nCfgtype, m_bIsDown); + dg->exec(); deleteLater(); } diff --git a/app/gui/oven_control/configfileprocessdlg.h b/app/gui/oven_control/configfileprocessdlg.h index a661a7e..27a1110 100644 --- a/app/gui/oven_control/configfileprocessdlg.h +++ b/app/gui/oven_control/configfileprocessdlg.h @@ -26,6 +26,7 @@ private slots: private: Ui::ConfigFileProcessDlg *ui; ConfigType m_nCfgtype; + bool m_bIsDown; }; #endif // CONFIGFILEPROCESSDLG_H diff --git a/app/gui/oven_control/configwindow.cpp b/app/gui/oven_control/configwindow.cpp index 64766d9..f11f959 100644 --- a/app/gui/oven_control/configwindow.cpp +++ b/app/gui/oven_control/configwindow.cpp @@ -9,7 +9,7 @@ #include "yesnopopupdlg.h" #include "configdatetimedlg.h" #include "servicepassinputdlg.h" - +#include "fileprocessor.h" ConfigWindow::ConfigWindow(QWidget *parent) : diff --git a/app/gui/oven_control/fileprocessdlg.cpp b/app/gui/oven_control/fileprocessdlg.cpp new file mode 100644 index 0000000..616bd4d --- /dev/null +++ b/app/gui/oven_control/fileprocessdlg.cpp @@ -0,0 +1,123 @@ +#include +#include +#include "fileprocessdlg.h" +#include "ui_fileprocessdlg.h" +#include "fileprocessor.h" +#include "ovenstatics.h" +#include +FileProcessDlg::FileProcessDlg(QWidget *parent, ConfigType type, bool isDown) : + QDialog(parent), + ui(new Ui::FileProcessDlg) +{ + ui->setupUi(this); + setAttribute(Qt::WA_DeleteOnClose); + setAttribute(Qt::WA_TranslucentBackground); + setWindowFlags(Qt::FramelessWindowHint); + + ui->ctrWjProcess->setMinimum(0); + ui->ctrWjProcess->setMaximum(100); + + if(isDown){ + QPixmap pxmap; + pxmap.load(":/images/config/102_usb_upload_icon.png"); + ui->label_2->setPixmap(pxmap); + } + + switch(type){ + case config_info_data_download: + QTimer::singleShot(100,this,SLOT(infodataDownload())); + break; + case config_service_data_download: + QTimer::singleShot(100,this,SLOT(servicedataDownload())); + break; + case config_program_download: + QTimer::singleShot(100,this,SLOT(programDownload())); + break; + case config_program_upload: + QTimer::singleShot(100,this,SLOT(programUpload())); + break; + case config_set_download: + QTimer::singleShot(100,this,SLOT(configDownload())); + break; + case config_set_upload: + QTimer::singleShot(100,this,SLOT(configUpload())); + break; + default: + QTimer::singleShot(200,this,SLOT(deleteLater())); + break; + } +} + +FileProcessDlg::~FileProcessDlg() +{ + delete ui; +} + +void FileProcessDlg::on_ctrBtnCancel_clicked() +{ + close(); +} + +void FileProcessDlg::infodataDownload(){ + +} + +void FileProcessDlg::servicedataDownload(){ + + +} + +void FileProcessDlg::programDownload(){ + +} + +void FileProcessDlg::programUpload(){ + +} + +void FileProcessDlg::configDownload(){ + QString strUsbPath; + if(FileProcessor::detectUSB(strUsbPath)){ + strUsbPath.append("/config.ini"); + qDebug() << strUsbPath; + if(QFile::copy("/prime/config/config.ini", strUsbPath)){ + ui->ctrWjProcess->setValue(100); + ui->ctrLbRemainTime->setText("남은 예상 시간 : 0초"); + ui->ctrLbRemainTime->setText(tr("남은 예상 시간 : 완료")); + QTimer::singleShot(1000,this,SLOT(close())); + } + else{ + ui->ctrLbRemainTime->setText(tr("다운로드에 실패하였습니다.")); + QTimer::singleShot(1000,this,SLOT(close())); + } + } + else{ + ui->ctrLbRemainTime->setText(tr("다운로드에 실패하였습니다.")); + QTimer::singleShot(1000,this,SLOT(close())); + } +} + +void FileProcessDlg::configUpload(){ + QString strUsbPath; + if(FileProcessor::detectUSB(strUsbPath)){ + strUsbPath.append("/config.ini"); + qDebug() << strUsbPath; + QFile file("/prime/config/config.ini"); + file.remove(); + if(QFile::copy( strUsbPath , "/prime/config/config.ini")){ + OvenStatistics* ovs = OvenStatistics::getInstance(); + ovs->srvdata->loadServiceData(); + ui->ctrWjProcess->setValue(100); + ui->ctrLbRemainTime->setText(tr("남은 예상 시간 : 완료")); + QTimer::singleShot(1000,this,SLOT(close())); + } + else{ + ui->ctrLbRemainTime->setText(tr("업로드에 실패하였습니다.")); + QTimer::singleShot(1000,this,SLOT(close())); + } + } + else{ + ui->ctrLbRemainTime->setText(tr("업로드에 실패하였습니다.")); + QTimer::singleShot(1000,this,SLOT(close())); + } +} diff --git a/app/gui/oven_control/fileprocessdlg.h b/app/gui/oven_control/fileprocessdlg.h new file mode 100644 index 0000000..66d6619 --- /dev/null +++ b/app/gui/oven_control/fileprocessdlg.h @@ -0,0 +1,48 @@ +#ifndef FILEPROCESSDLG_H +#define FILEPROCESSDLG_H + +#include +#include "config.h" +#include "servicedata.h" + +using namespace Define; + +namespace Ui { +class FileProcessDlg; +} + +class FileProcessDlg : public QDialog +{ + Q_OBJECT + + const uint8_t m_arrErrorMaxIdx[4] = {3,4,3,11}; + + const char m_strInfoName[4][64] = {"Top Ignition Box\0", + "Steam Ignition Box\0","Bottom Ignition Box\0","Service Total\0"}; + 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} + }; + + + +public: + explicit FileProcessDlg(QWidget *parent = 0, ConfigType type = config_invalid, bool isDown = true); + ~FileProcessDlg(); + +private slots: + void on_ctrBtnCancel_clicked(); + void infodataDownload(); + void servicedataDownload(); + void programDownload(); + void programUpload(); + void configDownload(); + void configUpload(); + +private: + Ui::FileProcessDlg *ui; + ConfigType m_nCfgtype; +}; + +#endif // FILEPROCESSDLG_H diff --git a/app/gui/oven_control/fileprocessdlg.ui b/app/gui/oven_control/fileprocessdlg.ui new file mode 100644 index 0000000..9016434 --- /dev/null +++ b/app/gui/oven_control/fileprocessdlg.ui @@ -0,0 +1,164 @@ + + + FileProcessDlg + + + + 0 + 0 + 900 + 1600 + + + + Dialog + + + 1.000000000000000 + + + #centralWidget { background-image: url(:/images/background/popup/503.png); +} + + + + true + + + + + 0 + 430 + 900 + 503 + + + + + + + + + 0 + 0 + 901 + 520 + + + + + 30 + + + 30 + + + + + + + + :/images/config/102_usb_download_icon.png + + + Qt::AlignCenter + + + + + + + + 820 + 120 + + + + + 820 + 120 + + + + + + + + + 0 + 30 + + + + + 나눔바른고딕 + 14 + + + + color : white; +padding-left : 65px; + + + 남은 예상 시간 : 1초 + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + 0 + 0 + + + + + 220 + 100 + + + + + 나눔바른고딕 + 17 + 75 + true + true + + + + QPushButton{ + border : none; + color : white; +} + +QPushButton::pressed, QPushButton::focus{ + color : yellow; +} + + + 취소 + + + + + + + + + + FileProcessGauge + QWidget +
fileprocessgauge.h
+ 1 +
+
+ + + + +
diff --git a/app/gui/oven_control/fileprocessgauge.cpp b/app/gui/oven_control/fileprocessgauge.cpp new file mode 100644 index 0000000..85de2fb --- /dev/null +++ b/app/gui/oven_control/fileprocessgauge.cpp @@ -0,0 +1,40 @@ +#include "fileprocessgauge.h" +#include +#include + +FileProcessGauge::FileProcessGauge(QWidget *parent) : PreheatTempGauge(parent) +{ + border.load(":/images/gauge/103_usb_graph_01.png"); + indicator.load(":/images/gauge/103_usb_graph_02.png"); + body.load(":/images/gauge/103_usb_graph_03.png"); + min = 0; + max = 100; + val = 30; +} + +void FileProcessGauge::paintEvent(QPaintEvent *event){ + QPainter painter(this); + painter.setBrush(Qt::NoBrush); + painter.setPen(Qt::NoPen); + QRect textRect(0,0,72,40); + + qreal percentage = (qreal) (val - min) / qMax(max - min, 1); + percentage = qBound((qreal) 0.0, percentage, (qreal) 1.0); + + QRect targetRect( + (border.size().width() - body.size().width()) / 2 + textRect.width()/2, + (border.size().height() - body.size().height()) / 2 + indicator.size().height()+textRect.height(), + body.size().width() * percentage, body.height()); + + QRect sourceRect(0, 0, body.size().width() * percentage, body.height()); + QFont font; + font.setFamily("나눔맑은고딕"); + font.setPixelSize(30); + painter.setFont(font); + painter.setPen(Qt::white); + painter.drawPixmap(targetRect, body, sourceRect); + painter.drawPixmap(textRect.width()/ 2, textRect.height()+indicator.size().height(), border); + painter.drawPixmap(targetRect.right() - indicator.size().width() / 2, textRect.height(), indicator); + textRect.setRect(targetRect.right() - textRect.size().width()/2, textRect.top(),72,40); + painter.drawText(textRect,Qt::AlignCenter, QString("%1%").arg(val)); +} diff --git a/app/gui/oven_control/fileprocessgauge.h b/app/gui/oven_control/fileprocessgauge.h new file mode 100644 index 0000000..dec70d1 --- /dev/null +++ b/app/gui/oven_control/fileprocessgauge.h @@ -0,0 +1,16 @@ +#ifndef FILEPROCESSGAUGE_H +#define FILEPROCESSGAUGE_H + +#include "preheattempgauge.h" + +class FileProcessGauge : public PreheatTempGauge +{ +public: + FileProcessGauge(QWidget *parent=0); + +protected: + void paintEvent(QPaintEvent *event); + +}; + +#endif // FILEPROCESSGAUGE_H diff --git a/app/gui/oven_control/fileprocessor.cpp b/app/gui/oven_control/fileprocessor.cpp new file mode 100644 index 0000000..51ab451 --- /dev/null +++ b/app/gui/oven_control/fileprocessor.cpp @@ -0,0 +1,41 @@ +#include +#include "fileprocessor.h" + +FileProcessor::FileProcessor() +{ + +} + +bool FileProcessor::folderExist(const QString &path){ + QDir qdir(path); + qDebug() << "check path" << path; + return qdir.exists(); +} + +bool FileProcessor::fileExist(const QString &path_file){ + QFile qfile(path_file); + return qfile.exists(); +} + +bool FileProcessor::detectUSB(QString &usbPath){ + int curUsbNum=0xff; + bool usbMountErr = false; + QString checkUsbName[3] = { + "sda", + "sdb", + "sdc" + }; + + for(int i =2;i >=0 ; i--){ + + if(folderExist(QString("/sys/block/").append(checkUsbName[i]))){ + if(folderExist(QString("/mnt/%111").arg(checkUsbName[i]))){ + usbPath = QString("/mnt/%111").arg(checkUsbName[i]); + return true; + } + break; + } + } + qDebug() << "usb detect fail"; + return false; +} diff --git a/app/gui/oven_control/fileprocessor.h b/app/gui/oven_control/fileprocessor.h new file mode 100644 index 0000000..f275fdd --- /dev/null +++ b/app/gui/oven_control/fileprocessor.h @@ -0,0 +1,16 @@ +#ifndef FILEPROCESSOR_H +#define FILEPROCESSOR_H + +#include + +class FileProcessor +{ +public: + FileProcessor(); +static bool folderExist(const QString &path); +static bool fileExist(const QString &path_file); +static bool detectUSB(QString &usbpath); + +}; + +#endif // FILEPROCESSOR_H diff --git a/app/gui/oven_control/images/config/102_usb_download_icon.png b/app/gui/oven_control/images/config/102_usb_download_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..a482fb5a0ad50cbf41ff3e252895889788347397 GIT binary patch literal 3237 zcmV;W3|jMvP)004R= z004l4008;_004mL004C`008P>0026e000+nl3&F}00002VoOIv0RM-N%)bBt010qN zS#tmY3ljhU3ljkVnw%H_000McNliru;RFr>E+*a`>&pND3<^m^K~#9!<(+$Q6;~a{ zzb8C|6p|oG3lbp%sa6MCs^z6d1B48PglQ$6so+Ell!2;#2&AIp=tG6j6DqTe*r?l|JjajD2E@yeIz@Gvpz8mC3$8*Bmz3`aH`iv4bwSHP*~Y zl6%vF5GGlRiQ(Gg-gE^Zbv(Ye{q}IQtCtZ{8>Itj_6V&5(Rp6yXUpQ8P5IyLB5!xp_Z2(9Ox8&`Xk|}N){M}n*=o<%fiLYq@H)p2 zy3qF-JHUKh9&YtuNe{h=6CLk}6?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bN$Q7hlD3%F;;{pOxF}|02=)YGY`rLT z@pcxY@f2#}upI^eIsl*(4&VnCt%De!H1F-=D8}$n{LXRW&lRlDjyh;xByA9xecKV~ zxQ6Z6;=xxVHn13vVG8mLOYeS$3gqHWhol2g!8}pJDY%8n0IahM4x&I@Y4LTtQFt2{ zI&4^UGT5IQU^)kJ9KXjxj%w-(GtFgJ=7IwOrn6XaFVfj&i@lrP0Av`h%h;S+!xv{yhEB)JnU&c!9sKy5T`;l%3+e$`U;7>3OjaVUU7qu6c_yVTKy}JFb@?NV7mN@SfDT8-y0Ro6V;pwAiBQlUX0iGf0BNSUwCnv zki9vckEOJ0X#}V8jHxso4j!_N_iSxqc0{zWGIq8t@y208Dd{>-4ikZWY3$emfE~Dm zUxa~Onh{TurH1R*qTuzhSo2t|l<6u@?h=80UwqgBfc^Pa7}!nVwFR$C{W3M&uY_*e z?kd-Vv*5S8y2sGB*eebTqci~S!7G7^8N71eO7*M+-jEcI8($Wcu7cj&Et7`~nT%@) zk!|=a&u~e?2;2FU!Ou}bSFa7skBp6yI$BNA4|XfVKK#Jo|3A$Q&i4~!8TLpsi_OL= zZBPn%0{svi;TFe@JKF*1&OG1w73hW0_`Yd>j@@xu3r$2Va}B#b$+8`G+X%6r6i*qx z3=JD&JR-d|dMN3UM9afwt;@!+0R{-(ZQmxgGc{^q$?>3;>23kwy=<1nEK|c8h8&G! zp|chx5_qq>P_i9=tB?0JzcjEYxSaq(1z!;ZbS+UI{+u5MI!5mglFvqcLt dIo}KP{{z;Zn1J@~f!6>4002ovPDHLkV1h`Y{6PQ! literal 0 HcmV?d00001 diff --git a/app/gui/oven_control/images/gauge/103_usb_graph_01.png b/app/gui/oven_control/images/gauge/103_usb_graph_01.png new file mode 100644 index 0000000000000000000000000000000000000000..b117b1cdc3a8c87dceacb416f243b82fd0248c9c GIT binary patch literal 578 zcmeAS@N?(olHy`uVBq!ia0y~yVEP4QJ94l9Nv@U?2Z5AAvPY0F14ET614BbI1H;e% zK>8&EL#Y7+!>a@a2CEqi4C48d;*Yuk)iNb{ySp&_Z|^^|AIRe@@Q5sCVBi)8VMc~o zb0mO*>?NMQuIvw4_?Yz6?#aGB&A`C8+|$J|q~g}w8ykI{5+zz6@;g6d`qDO!MXZ3C zD_VWSl0trO^$lu;%;E*i;tL9!&oc?R{PEsmasKk1C;#qLuekTfZx?riK=}W^>)^pUXO@geCx;;NKts literal 0 HcmV?d00001 diff --git a/app/gui/oven_control/images/gauge/103_usb_graph_02.png b/app/gui/oven_control/images/gauge/103_usb_graph_02.png new file mode 100644 index 0000000000000000000000000000000000000000..30013074f944f95ef263a8a385cd820605798933 GIT binary patch literal 289 zcmeAS@N?(olHy`uVBq!ia0vp^{2(?53y{1c{^t~sQb_g)@?~JCQe|LhXl7ve`5#EX zWMC*YU|@Kaz`$TNgMmRje^UHWH=tUkByV>YhX3vTXZ8bmoCO|{#S9GG!XV7ZFl&wk zP>{XE)7O>#AqyXqp4vUx*QbF(ZJsWUArhBMFDw*1>zELSO+%Zk% zVTH;EU%9Y?gs6{}uN-zC_#N-+Rnua>>L~9WrMxipO%FvsI8Xe+xcor)W6v)KgwsFH eo0x1fld)vRCYROHTHk;!V(@hJb6Mw<&;$TddSu%G literal 0 HcmV?d00001 diff --git a/app/gui/oven_control/images/gauge/103_usb_graph_03.png b/app/gui/oven_control/images/gauge/103_usb_graph_03.png new file mode 100644 index 0000000000000000000000000000000000000000..caf9a4b288ae3a16b10626cc2047253a37588e62 GIT binary patch literal 250 zcmeAS@N?(olHy`uVBq!ia0y~yVEPJVTXO&jhI=7edw>*ElDE4H!~gdFGy8!&&H|6f zVg?3oVGw3ym^DWND9B#o>Fdh=kX4*p-Z;yaX$MfK+tbA{q~g}wOOApJ3>=3I4(#8h zd5BeBh;wfl*E~ti0^1#OG5qV;uQ$Iw`1L^*8W*<=NFjDTP$Q0`n^us*=(&l}images/cook_type/meat_hide.png images/cook_type/poultry_hide.png images/cook_type/vegetable_hide.png + images/gauge/103_usb_graph_01.png + images/gauge/103_usb_graph_02.png + images/gauge/103_usb_graph_03.png + images/config/102_usb_upload_icon.png + images/config/102_usb_download_icon.png diff --git a/app/gui/oven_control/servicepassinputdlg.cpp b/app/gui/oven_control/servicepassinputdlg.cpp index 0e63d3d..9154dc4 100644 --- a/app/gui/oven_control/servicepassinputdlg.cpp +++ b/app/gui/oven_control/servicepassinputdlg.cpp @@ -30,6 +30,7 @@ void ServicePassInputDlg::on_ctrBtnOk_clicked() connect(w,SIGNAL(destroyed(QObject*)),this,SLOT(close())); w->setWindowModality(Qt::WindowModal); w->show(); + this->hide(); } else { qDebug()<< "pass incorrect " << ui->lineEdit->text(); diff --git a/app/gui/oven_control/usbcheckpopupdlg.cpp b/app/gui/oven_control/usbcheckpopupdlg.cpp index 4331e7a..95b9a54 100644 --- a/app/gui/oven_control/usbcheckpopupdlg.cpp +++ b/app/gui/oven_control/usbcheckpopupdlg.cpp @@ -1,6 +1,7 @@ #include #include "usbcheckpopupdlg.h" #include "ui_usbcheckpopupdlg.h" +#include "fileprocessor.h" UsbCheckPopupDlg::UsbCheckPopupDlg(QWidget *parent) : QDialog(parent), @@ -29,7 +30,8 @@ void UsbCheckPopupDlg::on_ctrBtnYes_clicked() } void UsbCheckPopupDlg::usbCheckTimerFired(){ - bool usbDetect = false; + QString strTemp; + bool usbDetect = FileProcessor::detectUSB(strTemp); if(usbDetect){ accept(); }