Blame view

app/gui/oven_control/cook.h 4.15 KB
8c2952457   김태훈   응용 프로그램 추가
1
2
3
4
5
  #ifndef COOK_H
  #define COOK_H
  
  #include <QObject>
  #include <QTimer>
99b8066f4   김태훈   V0.1.1
6
  #include <QList>
8c2952457   김태훈   응용 프로그램 추가
7
99b8066f4   김태훈   V0.1.1
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
  namespace Cook {
      enum CookType
      {
          Poultry,
          Meat,
          Fish,
          Desert,
          Vegetable,
          Bread,
          Etc
      };
  
      enum StepClass
      {
          InvalidClass,
          PreheatClass,
          DoorClass,
          CookClass
      };
  
      enum StepType
      {
          Invalid,
  
          Preheat,        // 예열
          PutThermometer, // 중심 온도계 삽입
          Load,           // 식재료 적재
          Cut,            // 자르기
          Pour,           // 물 붓기
  
          Bake,           // 베이킹
          Dry,            // 건조
          Ferment,        // 발효
          BlowSteam,      // 스팀 쏘이기
          CoolDown,       // 식히기
          Steam,          // 찌기
          Roast,          // 로스팅
          Boil,           // 끓이기
          Thicken,        // 걸쭉하게 만들기
          WarmUp,         // 데우기
          MakeCrispy,     // 바삭하게 만들기
          Finish,         // 피니싱
          Damp,           // 습윤하게 만들기
          Defer,          // 보류
          Grill,          // 그릴
          End,            // 종료
          Burn,           // 그을리기
          Fry,            // 기름에 볶기
          HeatUp,         // 온도 높이기
          Ripen,          // 숙성
          RipenKeep,      // 숙성 & 보존
          BoilSteadily,   // 뭉근하게 끓이기
          CookGratin,     // 그라탱 요리
          Brown,          // 브라우닝
          Simmer,         // 약한 불로 끓이기
          Moisten         // 촉촉하게
      };
  
      enum Mode {
          SteamMode, DryMode, CombiMode
      };
  
      struct Step {
          StepType type;
          Mode mode;
          int humidity;
          int temp;
      };
  
      enum Configuration {
          Brightness,
          Time,
          BurnDegree
      };
  
      StepClass classify(StepType type);
      QString name(StepType type);
      QString icon(CookType type);
      QString icon(StepType type);
  }
  
  class AbstractCookConfig
  {
  public:
      Cook::Configuration type();
      QString icon();
      QString overlayIcon();
      QString minLabel();
      QString maxLabel();
      virtual QString currentLabel();
  
      int count();
      int current();
      int standard();
  
      virtual int configureTime(int standardTime);
      virtual int configureInterTemp(int standardInterTemp);
      virtual Cook::Step configureStep(Cook::Step standardStep);
  
  public slots:
      void setCount(int value);
      void setCurrent(int value);
      void setStandard(int value);
  
  protected:
      Cook::Configuration type_;
      QString icon_;
      QString overayIcon_;
      QString minLabel_;
      QString maxLabel_;
      QString currentLabel_;
  
      int standard_;
      int current_;
      int count_;
  };
  
  class AbstractCook
8c2952457   김태훈   응용 프로그램 추가
126
  {
8c2952457   김태훈   응용 프로그램 추가
127
  public:
99b8066f4   김태훈   V0.1.1
128
129
130
131
132
133
134
      AbstractCook() { for (int idx = 0; idx < 5; idx++) configurations[idx] = NULL; }
      ~AbstractCook();
  
      Cook::CookType type();
      QString name();
      int time();
      bool interTempEnabled();
6f96c947a   김태훈   GUI 0.1.4
135
      void setInterTempEnabled(bool enabled);
99b8066f4   김태훈   V0.1.1
136
137
138
139
      int interTemp();
  
      Cook::Step currentStep();
      Cook::Step step(int index);
8c2952457   김태훈   응용 프로그램 추가
140
99b8066f4   김태훈   V0.1.1
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
      int currentStepIndex();
      void setCurrentStepIndex(int index);
  
      int stepCount();
  
      AbstractCookConfig *configurations[5];
  
  protected:
      Cook::CookType type_;
      QString name_;
      int time_;
      bool interTempEnabled_;
      int interTemp_;
      int currentStep_;
      int stepCount_;
      Cook::Step stepList[10];
  };
  
  class BrightnessConfig : public AbstractCookConfig
  {
  public:
      BrightnessConfig();
      Cook::Step configureStep(Cook::Step standardStep);
  };
  
  class TimeConfig : public AbstractCookConfig
  {
  public:
      TimeConfig();
      int configureTime(int standardTime);
  };
  
  class BurnDegreeConfig : public AbstractCookConfig
  {
  public:
      BurnDegreeConfig();
      Cook::Step configureStep(Cook::Step standardStep);
      int configureInterTemp(int standardInterTemp);
  };
  
  class FriedRice : public AbstractCook
  {
  public:
      FriedRice();
  };
  
  class ChickenCook : public AbstractCook
  {
  public:
      ChickenCook();
  };
  
  class MeatPie : public AbstractCook
  {
  public:
      MeatPie();
  };
  
  class Croissant : public AbstractCook
  {
  public:
      Croissant();
8c2952457   김태훈   응용 프로그램 추가
203
204
205
  };
  
  #endif // COOK_H