Blame view

app/gui/oven_control/abstractoveninterface.h 1.77 KB
8c2952457   김태훈   응용 프로그램 추가
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
  #ifndef ABSTRACTOVENINTERFACE_H
  #define ABSTRACTOVENINTERFACE_H
  
  #include <QtDebug>
  
  #include "oven.h"
  
  class AbstractOvenInterface : public OvenInterface
  {
      Q_OBJECT
  
      int humidity;
      int temp;
      int interTemp;
      int fan;
      bool door_ = false;
  
  public:
      AbstractOvenInterface();
      int currentTemp() { return 100; }
      int currentHumidity() { return 50; }
      int currentInterTemp() { return 50; }
      bool door() { return door_; }
  
  public slots:
      void setHumidity(int percentage) {
          qDebug() << "Set Humidity" << humidity << "to" << percentage;
          humidity = percentage;
      }
      void setTemp(int celsius) {
          qDebug() << "Set Temperature" << temp << "to" << celsius;
          temp = celsius;
      }
      void setInterTemp(int celsius) {
          qDebug() << "Set Internal Temperature" << interTemp << "to" << celsius;
          interTemp = celsius;
      }
      void setFan(int rpm) {
          qDebug() << "Set Fan RPM" << fan << "to" << rpm;
          fan = rpm;
      }
      void startCooking() { qDebug() << "Start Cooking"; }
      void stopCooking() { qDebug() << "Stop Cooking"; }
      void startPreheating() { qDebug() << "Start Preheating"; }
      void stopPreheating() { qDebug() << "Stop Preheating"; }
      void startCooldown() { qDebug() << "Start Cooldown"; }
      void stopCooldown() { qDebug() << "Stop Cooldown"; }
      void startHumidification() { qDebug() << "Start Humidification"; }
      void stopHumidification() { qDebug() << "Stop Humidification"; }
      void startWashing() { qDebug() << "Start Washing"; }
      void stopWashing() { qDebug() << "Stop Washing"; }
  
      void openDamper() { qDebug() << "Open Damper"; }
      void closeDamper() { qDebug() << "Close Damper"; }
  
  signals:
      void doorOpened();
      void doorClosed();
  };
  
  #endif // ABSTRACTOVENINTERFACE_H