Commit de045ccea5d37bb8a49516e0ed26466c6d7fecf2

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

시연 모드 아이콘 추가, 하프 에너지 아이콘 추가

app/gui/oven_control/demoicon.cpp
... ... @@ -0,0 +1,22 @@
  1 +#include "demoicon.h"
  2 +
  3 +#include "config.h"
  4 +
  5 +DemoIcon::DemoIcon(QWidget *parent) : QLabel(parent)
  6 +{
  7 + setPixmap(QPixmap(":/images/symbol/demo.png"));
  8 +
  9 + connect(&timer, SIGNAL(timeout()), SLOT(check()));
  10 + timer.start(1000);
  11 +
  12 + check();
  13 +}
  14 +
  15 +void DemoIcon::check()
  16 +{
  17 + Define::config_item item = Config::getInstance()->getConfigValue(Define::config_demo_mode);
  18 + if (item.d32 == 0)
  19 + hide();
  20 + else
  21 + show();
  22 +}
... ...
app/gui/oven_control/demoicon.h
... ... @@ -0,0 +1,20 @@
  1 +#ifndef DEMOICON_H
  2 +#define DEMOICON_H
  3 +
  4 +#include <QLabel>
  5 +#include <QTimer>
  6 +
  7 +class DemoIcon : public QLabel
  8 +{
  9 + Q_OBJECT
  10 +
  11 + QTimer timer;
  12 +
  13 +public:
  14 + explicit DemoIcon(QWidget *parent = 0);
  15 +
  16 +private slots:
  17 + void check();
  18 +};
  19 +
  20 +#endif // DEMOICON_H
... ...
app/gui/oven_control/halfenergyicon.cpp
... ... @@ -0,0 +1,22 @@
  1 +#include "halfenergyicon.h"
  2 +
  3 +#include "config.h"
  4 +
  5 +HalfEnergyIcon::HalfEnergyIcon(QWidget *parent) : QLabel(parent)
  6 +{
  7 + setPixmap(QPixmap(":/images/symbol/half_energy.png"));
  8 +
  9 + connect(&timer, SIGNAL(timeout()), SLOT(check()));
  10 + timer.start(1000);
  11 +
  12 + check();
  13 +}
  14 +
  15 +void HalfEnergyIcon::check()
  16 +{
  17 + Define::config_item item = Config::getInstance()->getConfigValue(Define::config_set_half_energy);
  18 + if (item.d32 == 0)
  19 + hide();
  20 + else
  21 + show();
  22 +}
... ...
app/gui/oven_control/halfenergyicon.h
... ... @@ -0,0 +1,20 @@
  1 +#ifndef HALFENERGYICON_H
  2 +#define HALFENERGYICON_H
  3 +
  4 +#include <QLabel>
  5 +#include <QTimer>
  6 +
  7 +class HalfEnergyIcon : public QLabel
  8 +{
  9 + Q_OBJECT
  10 +
  11 + QTimer timer;
  12 +
  13 +public:
  14 + explicit HalfEnergyIcon(QWidget *parent = 0);
  15 +
  16 +private slots:
  17 + void check();
  18 +};
  19 +
  20 +#endif // HALFENERGYICON_H
... ...
app/gui/oven_control/oven_control.pro
... ... @@ -122,9 +122,10 @@ SOURCES += main.cpp\
122 122 autocookselectionpopup.cpp \
123 123 autocookcheckwindow.cpp \
124 124 autocookcheckconfigwindow.cpp \
125   - programmedcookpanelbutton.cpp
126   - configdemomodedlg.cpp
127   -
  125 + programmedcookpanelbutton.cpp \
  126 + configdemomodedlg.cpp \
  127 + demoicon.cpp \
  128 + halfenergyicon.cpp
128 129  
129 130 HEADERS += mainwindow.h \
130 131 cook.h \
... ... @@ -236,8 +237,10 @@ HEADERS += mainwindow.h \
236 237 autocookselectionpopup.h \
237 238 autocookcheckwindow.h \
238 239 autocookcheckconfigwindow.h \
239   - programmedcookpanelbutton.h
240   - configdemomodedlg.h
  240 + programmedcookpanelbutton.h \
  241 + configdemomodedlg.h \
  242 + demoicon.h \
  243 + halfenergyicon.h
241 244  
242 245 FORMS += mainwindow.ui \
243 246 manualcookwindow.ui \
... ... @@ -315,7 +318,7 @@ FORMS += mainwindow.ui \
315 318 autocookselectionpopup.ui \
316 319 autocookcheckwindow.ui \
317 320 autocookcheckconfigwindow.ui \
318   - programmedcookpanelbutton.ui
  321 + programmedcookpanelbutton.ui \
319 322 configdemomodedlg.ui
320 323  
321 324 RESOURCES += \
... ...