Blame view

app/gui/oven_control/operationtimemode.cpp 2.65 KB
6a965b9f1   고영탁   엔지니어 모드 2차 구현
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
  #include "operationtimemode.h"
  #include "ui_operationtimemode.h"
  #include "ovenstatics.h"
  
  operationTimeMode::operationTimeMode(QWidget *parent) :
      QMainWindow(parent),
      ui(new Ui::operationTimeMode)
  {
      ui->setupUi(this);
      reloadUi();
  }
  
  operationTimeMode::~operationTimeMode()
  {
      delete ui;
  }
  
  void operationTimeMode::on_backButton_clicked()
  {
      deleteLater();
  }
  
  
  void operationTimeMode::reloadUi(void){
      uint32_t timetemp;
      OvenStatics* ovs = OvenStatics::getInstance();
      QString strTemp="";
      uint32_t totaltime;
      if(ovs!=NULL){
          //건열 조리 모드
          timetemp = ovs->srvdatas->use_log.items.cook_dry_mode;
          totaltime += timetemp;
          strTemp.sprintf("%d h", timetemp/3600);
          ui->m_ctrlLbListTime1->setText(strTemp);
          //스팀 조리 모드
          timetemp = ovs->srvdatas->use_log.items.cook_steam_mode;
          totaltime += timetemp;
          strTemp.sprintf("%d h", timetemp/3600);
          ui->m_ctrlLbListTime2->setText(strTemp);
          //콤비 조리 모드
          timetemp = ovs->srvdatas->use_log.items.cook_combi_mode;
          totaltime += timetemp;
          strTemp.sprintf("%d h", timetemp/3600);
          ui->m_ctrlLbListTime3->setText(strTemp);
          //세제없이  헹굼
          timetemp = ovs->srvdatas->use_log.items.wash_mode_nocleanser;
          totaltime += timetemp;
          strTemp.sprintf("%d h", timetemp/3600);
          ui->m_ctrlLbListTime4->setText(strTemp);
          //간이 세척
          timetemp = ovs->srvdatas->use_log.items.wash_mode_simple;
          totaltime += timetemp;
          strTemp.sprintf("%d h", timetemp/3600);
          ui->m_ctrlLbListTime5->setText(strTemp);
          //표준 세척
          timetemp = ovs->srvdatas->use_log.items.wash_mode_standard;
          totaltime += timetemp;
          strTemp.sprintf("%d h", timetemp/3600);
          ui->m_ctrlLbListTime6->setText(strTemp);
          //강세척
          timetemp = ovs->srvdatas->use_log.items.wash_mode_strong;
          totaltime += timetemp;
          strTemp.sprintf("%d h", timetemp/3600);
          ui->m_ctrlLbListTime7->setText(strTemp);
          //고속 세척
          timetemp = ovs->srvdatas->use_log.items.wash_mode_speed;
          totaltime += timetemp;
          strTemp.sprintf("%d h", timetemp/3600);
          ui->m_ctrlLbListTime8->setText(strTemp);
          //쿨다운
          timetemp = ovs->srvdatas->use_log.items.cooldown_mode;
          totaltime += timetemp;
          strTemp.sprintf("%d h", timetemp/3600);
          ui->m_ctrlLbListTime9->setText(strTemp);
          //전체 작동 시간
          timetemp = totaltime;
          strTemp.sprintf("%d h", timetemp/3600);
          ui->m_ctrlLbListTime10->setText(strTemp);
      }
  }