Commit 432c90a3c39a0c6bdba6eabc9cbfe58359523759

Authored by 김태훈
1 parent 6f5f5fc90c
Exists in fhd

점화 아이콘 표시 여부를 전기식/가스식에 따라 다르게 판별

Showing 1 changed file with 27 additions and 1 deletions   Show diff stats
app/gui/oven_control/ignitionicon.cpp
1 1 #include "ignitionicon.h"
2 2  
3 3 #include "udphandler.h"
  4 +#include "config.h"
4 5  
5 6 QPixmap *IgnitionIcon::icon = Q_NULLPTR;
6 7  
... ... @@ -16,8 +17,33 @@ IgnitionIcon::IgnitionIcon(QWidget *parent) : QLabel(parent)
16 17  
17 18 void IgnitionIcon::check()
18 19 {
  20 + bool ignition = false;
  21 +
19 22 UdpHandler *udp = UdpHandler::getInstance();
20   - if (udp->burnerState(1) || udp->burnerState(2) || udp->burnerState(3) || udp->heater())
  23 +
  24 + switch (Config::getInstance()->getConfigValue(Define::config_model).d32)
  25 + {
  26 + case Define::model_electric_10:
  27 + case Define::model_electric_20:
  28 + case Define::model_electric_24:
  29 + case Define::model_electric_40:
  30 + ignition = udp->heater();
  31 + break;
  32 +
  33 + case Define::model_gas_lpg_10:
  34 + case Define::model_gas_lpg_20:
  35 + case Define::model_gas_lpg_24:
  36 + case Define::model_gas_lpg_40:
  37 +
  38 + case Define::model_gas_lng_10:
  39 + case Define::model_gas_lng_20:
  40 + case Define::model_gas_lng_24:
  41 + case Define::model_gas_lng_40:
  42 + ignition = udp->burnerState(1) || udp->burnerState(2) || udp->burnerState(3);
  43 + break;
  44 + }
  45 +
  46 + if (ignition)
21 47 show();
22 48 else
23 49 hide();
... ...