#include #include "operationtimemode.h" #include "ui_operationtimemode.h" #include "ovenstatics.h" #include "soundplayer.h" OperationTimeMode::OperationTimeMode(QWidget *parent) : QMainWindow(parent), ui(new Ui::OperationTimeMode) { ui->setupUi(this); ui->clockContainer->setParent(ui->upperStack); setAttribute(Qt::WA_DeleteOnClose); foreach (QPushButton *button, findChildren()) connect(button, &QPushButton::pressed, SoundPlayer::playClick); reloadUi(); } OperationTimeMode::~OperationTimeMode() { delete ui; } void OperationTimeMode::on_backButton_clicked() { close(); } void OperationTimeMode::reloadUi(void){ uint32_t timetemp; OvenStatistics* ovs = OvenStatistics::getInstance(); QString strTemp=""; uint32_t totaltime=0; if(ovs!=NULL){ //건열 조리 모드 timetemp = ovs->srvdata->use_log.items.cook_dry_mode; totaltime += timetemp; strTemp.sprintf("%d h", timetemp/3600); ui->m_ctrlLbListTime1->setText(strTemp); qDebug() << "Dry Cook Time : " <srvdata->use_log.items.cook_steam_mode; totaltime += timetemp; strTemp.sprintf("%d h", timetemp/3600); ui->m_ctrlLbListTime2->setText(strTemp); qDebug() << "Steam Cook Time : " <srvdata->use_log.items.cook_combi_mode; totaltime += timetemp; strTemp.sprintf("%d h", timetemp/3600); ui->m_ctrlLbListTime3->setText(strTemp); qDebug() << "Combi Cook Time : " <srvdata->use_log.items.wash_mode_nocleanser; totaltime += timetemp; strTemp.sprintf("%d h", timetemp/3600); ui->m_ctrlLbListTime4->setText(strTemp); qDebug() << "Wash Nocleanser Time : " <srvdata->use_log.items.wash_mode_simple; totaltime += timetemp; strTemp.sprintf("%d h", timetemp/3600); ui->m_ctrlLbListTime5->setText(strTemp); qDebug() << "Wash Simple Time : " <srvdata->use_log.items.wash_mode_standard; totaltime += timetemp; strTemp.sprintf("%d h", timetemp/3600); ui->m_ctrlLbListTime6->setText(strTemp); qDebug() << "Wash Standard Time : " <srvdata->use_log.items.wash_mode_strong; totaltime += timetemp; strTemp.sprintf("%d h", timetemp/3600); ui->m_ctrlLbListTime7->setText(strTemp); qDebug() << "Wash Strong Time : " <srvdata->use_log.items.wash_mode_speed; totaltime += timetemp; strTemp.sprintf("%d h", timetemp/3600); ui->m_ctrlLbListTime8->setText(strTemp); qDebug() << "Wash Speed Time : " <srvdata->use_log.items.cooldown_mode; totaltime += timetemp; strTemp.sprintf("%d h", timetemp/3600); ui->m_ctrlLbListTime9->setText(strTemp); qDebug() << "Cool Down Time : " <m_ctrlLbListTime10->setText(strTemp); qDebug() << "Total Time : " <key()) { case 0x01000032: // Turn left focusPreviousChild(); break; case 0x01000031: // Push break; case 0x01000030: // Turn right focusNextChild(); break; } } void OperationTimeMode::keyReleaseEvent(QKeyEvent *event) { switch (event->key()) { case 0x01000032: // Turn left focusPreviousChild(); break; case 0x01000031: // Push { QPushButton *btn = qobject_cast(focusWidget()); if(btn != NULL){ btn->click(); } break; } case 0x01000030: // Turn right focusNextChild(); break; } }