define.cpp
13.8 KB
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
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
#include "define.h"
Define::CookConfigType Define::identifyConfigType(QString type)
{
if (type == "brightness")
return Brightness;
else if (type == "cookinglevel")
return BurnDegree;
else if (type == "boiledlevel")
return SoftBoilDegree;
else if (type == "size")
return PieceSize;
else if (type == "crispy1")
return CrispyDegree;
else if (type == "moisten1")
return MoistDegree;
else if (type == "thickness")
return Thickness;
else if (type == "humidity")
return Humidity;
else if (type == "temperature")
return Temperature;
else if (type == "cookingtime")
return Time;
else if (type == "coretemperature")
return CoreTemperature;
else if (type == "coretemperaturesensor")
return Thermometer;
else
return InvalidConfig;
}
Define::StepType Define::identifyStepType(QString type)
{
if (type == "preheat")
return Preheat;
else if (type == "load") //
return Load;
else if (type == "therometer") //
return PutThermometer;
else if (type == "cut") //
return Cut;
else if (type == "pour") //
return Pour;
else if (type == "bake")
return Bake;
else if (type == "dry")
return Dry;
else if (type == "ferment")
return Ferment;
else if (type == "steaming")
return BlowSteam;
else if (type == "cooldown")
return CoolDown;
else if (type == "steam")
return Steam;
else if (type == "roasting")
return Roast;
else if (type == "boil")
return Boil;
else if (type == "thicken")
return Thicken;
else if (type == "warmup")
return WarmUp;
else if (type == "crispy2")
return MakeCrispy;
else if (type == "finish")
return Finish;
else if (type == "damp")
return Damp;
else if (type == "defer")
return Defer;
else if (type == "grill")
return Grill;
else if (type == "end")
return End;
else if (type == "burn")
return Burn;
else if (type == "fry")
return Fry;
else if (type == "heatup")
return HeatUp;
else if (type == "ripen")
return Ripen;
else if (type == "ripenkeep")
return RipenKeep;
else if (type == "boilsteadily")
return BoilSteadily;
else if (type == "cookgratin")
return CookGratin;
else if (type == "brown")
return Brown;
else if (type == "simmer")
return Simmer;
else if (type == "moisten2")
return Moisten;
else
return Invalid;
}
Define::StepClass Define::classify(Define::StepType type)
{
switch (type)
{
case Invalid:
return InvalidClass;
case Preheat:
return PreheatClass;
case PutThermometer:
case Load:
case Cut:
case Pour:
return DoorClass;
case Bake:
case Dry:
case Ferment:
case BlowSteam:
case CoolDown:
case Steam:
case Roast:
case Boil:
case Thicken:
case WarmUp:
case MakeCrispy:
case Finish:
case Damp:
case Defer:
case Grill:
case End:
case Burn:
case Fry:
case HeatUp:
case Ripen:
case RipenKeep:
case BoilSteadily:
case CookGratin:
case Brown:
case Simmer:
case Moisten:
return CookClass;
}
return InvalidClass;
}
Define::Mode Define::identifyMode(QString mode)
{
if (mode == "combi")
return CombiMode;
else if (mode == "dry")
return DryMode;
else if (mode == "steam")
return SteamMode;
else
return InvalidMode;
}
QString Define::icon(Define::CookType type)
{
switch (type)
{
case Poultry:
return ":/images/cook_type/poultry_ov.png";
case Meat:
return ":/images/cook_type/meat_ov.png";
case Fish:
return ":/images/cook_type/fish_ov.png";
case Desert:
return ":/images/cook_type/desert_ov.png";
case Vegetable:
return ":/images/cook_type/vegetable_ov.png";
case Bread:
return ":/images/cook_type/bread_ov.png";
case Etc:
return ":/images/cook_type/etc_ov.png";
default:
return "";
}
}
QString Define::icon(Define::CookConfigType type)
{
switch (type)
{
case Brightness:
return ":/images/slider_icon/gau_icon_01.png";
case BurnDegree:
return ":/images/slider_icon/gau_icon_02.png";
case SoftBoilDegree:
return ":/images/slider_icon/gau_icon_03.png";
case PieceSize:
return ":/images/slider_icon/gau_icon_04.png";
case CrispyDegree:
return ":/images/slider_icon/gau_icon_05.png";
case MoistDegree:
return ":/images/slider_icon/Gau_icon_06.png";
case Thickness:
return ":/images/slider_icon/Gau_icon_07.png";
case Humidity:
return ":/images/slider_icon/humidity.png";
case Temperature:
return ":/images/slider_icon/temp.png";
case Time:
return ":/images/slider_icon/time.png";
case CoreTemperature:
return ":/images/slider_icon/core_temp_enabled.png";
case Thermometer:
return ":/images/slider_icon/thermometer_enabled.png";
case InvalidConfig:
case ConfigNotUsed:
default:
return "";
}
}
QString Define::iconOverlay(Define::CookConfigType type)
{
switch (type)
{
case Brightness:
return ":/images/slider_icon/gau_icon_01_active.png";
case BurnDegree:
return ":/images/slider_icon/gau_icon_02_active.png";
case SoftBoilDegree:
return ":/images/slider_icon/sys_icon_05_active.png";
case PieceSize:
return ":/images/slider_icon/sys_icon_01_active.png";
case CrispyDegree:
return ":/images/slider_icon/sys_icon_02_active.png";
case MoistDegree:
return ":/images/slider_icon/sys_icon_03_active.png";
case Thickness:
return ":/images/slider_icon/sys_icon_04_active.png";
case Humidity:
return ":/images/slider_icon/011_icon_01_active.png";
case Temperature:
return ":/images/slider_icon/011_icon_02_active.png";
case Time:
return ":/images/slider_icon/011_icon_03_active.png";
case CoreTemperature:
return ":/images/slider_icon/011_icon_04_active.png";
case Thermometer:
return ":/images/slider_icon/cen_mt_icon_03_active.png";
case InvalidConfig:
case ConfigNotUsed:
default:
return "";
}
}
QString Define::iconActiveted(Define::CookConfigType type)
{
switch (type)
{
case Brightness:
return ":/images/slider_icon/gau_icon_01_ov.png";
case BurnDegree:
return ":/images/slider_icon/gau_icon_02_ov.png";
case SoftBoilDegree:
return ":/images/slider_icon/gau_icon_03_ov.png";
case PieceSize:
return ":/images/slider_icon/gau_icon_04_ov.png";
case CrispyDegree:
return ":/images/slider_icon/gau_icon_05_ov.png";
case MoistDegree:
return ":/images/slider_icon/Gau_icon_06_ov.png";
case Thickness:
return ":/images/slider_icon/Gau_icon_07_ov.png";
case Humidity:
return ":/images/slider_icon/humidity_ov.png";
case Temperature:
return ":/images/slider_icon/temp_ov.png";
case Time:
return ":/images/slider_icon/time_ov.png";
case CoreTemperature:
return ":/images/slider_icon/core_temp_ov.png";
case Thermometer:
return ":/images/slider_icon/thermometer_ov.png";
case InvalidConfig:
case ConfigNotUsed:
default:
return "";
}
}
QString Define::minimum(Define::CookConfigType type)
{
switch (type)
{
case Brightness:
return QObject::tr("연한색");
case BurnDegree:
return QObject::tr("중간익힘");
case SoftBoilDegree:
return QObject::tr("반숙");
case PieceSize:
return QObject::tr("작은조각");
case CrispyDegree:
return QObject::tr("연한색");
case MoistDegree:
return QObject::tr("촉촉하게");
case Thickness:
return QObject::tr("얇음");
case Humidity:
return QObject::tr("건조함");
case Temperature:
return QObject::tr("약");
case Time:
return QObject::tr("단시간");
case CoreTemperature:
return QObject::tr("따뜻함");
case Thermometer:
return QObject::tr("있음");
case InvalidConfig:
case ConfigNotUsed:
default:
return "";
}
}
QString Define::maximum(Define::CookConfigType type)
{
switch (type)
{
case Brightness:
return QObject::tr("진한색");
case BurnDegree:
return QObject::tr("완전익힘");
case SoftBoilDegree:
return QObject::tr("완숙");
case PieceSize:
return QObject::tr("큰조각");
case CrispyDegree:
return QObject::tr("진한색");
case MoistDegree:
return QObject::tr("완전익힘");
case Thickness:
return QObject::tr("두꺼움");
case Humidity:
return QObject::tr("습윤");
case Temperature:
return QObject::tr("강");
case Time:
return QObject::tr("장시간");
case CoreTemperature:
return QObject::tr("뜨거움");
case Thermometer:
return QObject::tr("없음");
case InvalidConfig:
case ConfigNotUsed:
default:
return "";
}
}
QString Define::icon(Define::StepType type)
{
switch (type)
{
case Roast:
case Grill:
return ":/images/cook_step_type/sys_icon_01.png";
case Boil:
case BoilSteadily:
case HeatUp:
case Thicken:
case WarmUp:
case Simmer:
return ":/images/cook_step_type/sys_icon_02.png";
case End:
return ":/images/cook_step_type/sys_icon_03.png";
case MakeCrispy:
case Brown:
case BlowSteam:
case Damp:
return ":/images/cook_step_type/sys_icon_04.png";
case Preheat:
case Finish:
return ":/images/cook_step_type/sys_icon_05.png";
case Burn:
case CookGratin:
return ":/images/cook_step_type/sys_icon_06.png";
case CoolDown:
return ":/images/cook_step_type/sys_icon_07.png";
case Defer:
case RipenKeep:
return ":/images/cook_step_type/sys_icon_08.png";
case Bake:
return ":/images/cook_step_type/sys_icon_09.png";
case Fry:
case Steam:
return ":/images/cook_step_type/sys_icon_10.png";
case Ripen:
case Ferment:
case Moisten:
return ":/images/cook_step_type/sys_icon_11.png";
case Dry:
return ":/images/cook_step_type/sys_icon_12.png";
default:
return "";
}
}
QString Define::name(Define::StepType type)
{
switch (type)
{
case Preheat:
return QObject::tr("예열");
case PutThermometer:
return QObject::tr("중심 온도계 삽입");
case Load:
return QObject::tr("식재료 적재");
case Cut:
return QObject::tr("자르기");
case Pour:
return QObject::tr("물 붓기");
case Bake:
return QObject::tr("베이킹");
case Dry:
return QObject::tr("건조");
case Ferment:
return QObject::tr("발효");
case BlowSteam:
return QObject::tr("스팀 쏘이기");
case CoolDown:
return QObject::tr("식히기");
case Steam:
return QObject::tr("찌기");
case Roast:
return QObject::tr("로스팅");
case Boil:
return QObject::tr("끓이기");
case Thicken:
return QObject::tr("걸쭉하게 만들기");
case WarmUp:
return QObject::tr("데우기");
case MakeCrispy:
return QObject::tr("바삭하게 만들기");
case Finish:
return QObject::tr("피니싱");
case Damp:
return QObject::tr("습윤하게 만들기");
case Defer:
return QObject::tr("보류");
case Grill:
return QObject::tr("그릴");
case End:
return QObject::tr("종료");
case Burn:
return QObject::tr("그을리기");
case Fry:
return QObject::tr("기름에 재빨리 볶기");
case HeatUp:
return QObject::tr("온도 높이기");
case Ripen:
return QObject::tr("숙성");
case RipenKeep:
return QObject::tr("숙성 & 보존");
case BoilSteadily:
return QObject::tr("뭉근하게 끓이기");
case CookGratin:
return QObject::tr("그라탱 요리");
case Brown:
return QObject::tr( "브라우닝");
case Simmer:
return QObject::tr("약한 불로 끓이기");
case Moisten:
return QObject::tr("촉촉하게");
default:
return "";
}
}
Define::Process Define::identifyProcess(QString type)
{
if (type == "again")
return CookAgain;
else if (type == "crispy3")
return MakeCrisper;
else if (type == "heatreserve")
return KeepWarm;
else
return InvalidProcess;
}
QString Define::icon(Define::Process type)
{
switch (type)
{
case CookAgain:
return ":/images/auto_button/option_btn_01.png";
case MakeCrisper:
return ":/images/auto_button/option_btn_01.png";
case KeepWarm:
return ":/images/auto_button/option_btn_01.png";
default:
return ":/images/button/152.png";
}
}
QString Define::iconOverlay(Define::Process type)
{
switch (type)
{
case CookAgain:
return ":/images/auto_button/option_btn_01_ov.png";
case MakeCrisper:
return ":/images/auto_button/option_btn_01_ov.png";
case KeepWarm:
return ":/images/auto_button/option_btn_01_ov.png";
default:
return ":/images/button/152_ov.png";
}
}
QString Define::name(Define::Process type)
{
switch (type)
{
case CookAgain:
return QObject::tr("새로운 재료 넣기");
case MakeCrisper:
return QObject::tr("바삭함 주기");
case KeepWarm:
return QObject::tr("보온 유지");
default:
return "";
}
}