Blame view

app/gui/oven_control/keepwarmpopup.cpp 738 Bytes
6a81d38e4   김태훈   자동 요리 관련 로직 전면 재작성
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
  #include "keepwarmpopup.h"
  #include "ui_keepwarmpopup.h"
  
  KeepWarmPopup::KeepWarmPopup(QWidget *parent) :
      QWidget(parent),
      ui(new Ui::KeepWarmPopup)
  {
      ui->setupUi(this);
  
      setAttribute(Qt::WA_DeleteOnClose);
  
      connect(&updateViewTimer, SIGNAL(timeout()), SLOT(updateView()));
      updateViewTimer.start(100);
  
      startTime.start();
  }
  
  KeepWarmPopup::~KeepWarmPopup()
  {
      delete ui;
  }
  
  void KeepWarmPopup::updateView()
  {
      int elapsed = startTime.elapsed() / 1000;
      ui->timeLabel->setText(QString("%1:%2")
                             .arg(elapsed / 60, 2, 10, QLatin1Char('0'))
                             .arg(elapsed % 60, 2, 10, QLatin1Char('0')));
  }
  
  void KeepWarmPopup::on_stopButton_clicked()
  {
      close();
  }