cook.h
1.13 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
#ifndef COOK_H
#define COOK_H
#include "define.h"
struct CookConfig
{
Define::CookConfigType type;
int maximum;
int current;
};
struct CookStep
{
Define::StepType type;
Define::Mode mode;
int humidity;
int temp;
int time;
int fan;
int coreTemp;
int dehumidification;
int humidification;
int dehumidificationRepeatDelay;
int humidificationRepeatDelay;
int dehumidificationRepeatCount;
int humidificationRepeatCount;
};
class Cook
{
public:
Cook();
Cook(Define::CookType type, QString root, QString name);
Define::CookType type;
QString name;
QString root;
CookConfig configs[5];
QList<CookStep> steps;
QList<Define::Process> processes;
void setConfig(int first, int second, int third, int fourth, int fifth);
bool isInitialized() { return isInitialized_; }
bool isLoaded() { return isLoaded_; }
void load();
bool isCoreTempValid();
int time();
int coreTemp();
private:
bool isInitialized_;
bool isLoaded_;
bool isCoreTempValid_;
int time_;
int coreTemp_;
void initialize();
};
#endif // COOK_H