manualcookwindow.h
3.49 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
#ifndef MANUALCOOKWINDOW_H
#define MANUALCOOKWINDOW_H
#include <QMainWindow>
#include <QKeyEvent>
#include "oven.h"
#include "udphandler.h"
#include "cookhistory.h"
namespace Ui {
class ManualCookWindow;
}
class ManualCookWindow : public QMainWindow
{
Q_OBJECT
public:
explicit ManualCookWindow(QWidget *parent, Define::Mode mode);
explicit ManualCookWindow(QWidget *parent, ManualCookSetting setting);
~ManualCookWindow();
protected:
void keyPressEvent(QKeyEvent *event);
void keyReleaseEvent(QKeyEvent *event);
signals:
void cookStopRequested();
void done();
public slots:
private slots:
void setupAnimation();
void setOvenDefault(Define::Mode mode);
void start();
void stop();
void updateView();
void showCurrentHumidity();
void hideCurrentHumidity();
void showCurrentTemp();
void hideCurrentTemp();
void showInfoText(QString text, QString icon);
void startKeepWarm();
void onOvenUpdated(Oven *oven);
void addFavorite();
void jumpConfig();
void jumpFavorites();
void jumpWash();
void onMonitor1Timeout();
void onMonitor2Timeout();
void onMonitor3Timeout();
void onEncoderLeft();
void onEncoderRight();
void onEncoderClicked(QWidget *clicked);
void focusHumidityButton();
void focusTempButton();
void focusTimeButton();
void focusInterTempButton();
void focusAgain();
void on_steamButton_clicked();
void on_combiButton_clicked();
void on_dryheatButton_clicked();
void on_humidityButton_pressed();
void on_humidityButton_released();
void on_tempButton_pressed();
void on_tempButton_released();
void on_humidityButton_clicked();
void on_tempButton_clicked();
void on_timeButton_clicked();
void on_interTempButton_clicked();
void on_runStopButton_clicked();
void on_fanButton_clicked();
void on_preheatButton_clicked();
void on_damperButton_clicked();
void on_humidificationButton_clicked();
void on_repeatButton_clicked();
void on_cooldownButton_clicked();
void on_reserveButton_clicked();
void on_favoriteButton_clicked();
void on_goFrontStackButton_clicked();
void on_backButton_clicked();
void on_configButton_clicked();
void on_favoritesButton_clicked();
void on_washButton_clicked();
void on_helpButton_clicked();
void on_timeSlider_valueChanged();
private:
Ui::ManualCookWindow *ui;
Oven *oven;
QTimer startCookingTimer;
QTimer updateViewTimer;
QTimer showCurrentHumidityTimer;
QTimer showCurrentTempTimer;
QTimer showInfoTextTimer;
int humidity;
int temp;
int time;
int interTemp;
bool lastCheckedCooking = false;
bool showCurrentHumidity_ = false;
bool showCurrentTemp_ = false;
int lastViewHumidity;
int lastViewTemp;
int lastViewTime;
int lastViewInterTemp;
bool lastViewInterTempEnabled;
bool lastViewCooking;
bool lastViewDamper;
bool lastViewHumidification;
int lastViewFan;
bool showFrontButtons = true;
int monitorLevel;
QTimer monitor1;
QTimer monitor2;
QTimer monitor3;
bool monitorTriggered;
bool cookDone;
ManualCookSetting repeatSetting;
bool repeat;
int sliderToTime(int value);
int timeToSlider(int secs);
QWidget *pushed = NULL;
QWidget *focused = NULL;
QTimer focusHumidityButtonTimer;
QTimer focusTempButtonTimer;
QTimer focusTimeButtonTimer;
QTimer focusInterTempButtonTimer;
};
#endif // MANUALCOOKWINDOW_H