cooldownpopup.h
1.33 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
#ifndef COOLDOWNPOPUP_H
#define COOLDOWNPOPUP_H
#include <QWidget>
#include <QTimer>
#include "oven.h"
namespace Ui {
class CooldownPopup;
}
class CooldownPopup : public QWidget
{
Q_OBJECT
public:
explicit CooldownPopup(QWidget *parent = 0, Oven *oven = 0);
~CooldownPopup();
protected:
void keyPressEvent(QKeyEvent *event);
void keyReleaseEvent(QKeyEvent *event);
private slots:
void start();
void stop();
void showCurrentTemp();
void updateView();
void checkOven();
void on_closeButton_clicked();
void on_closeButton_2_clicked();
void on_tempButton_pressed();
void on_tempButton_released();
void on_runButton_clicked();
void on_fanButton_clicked();
void on_humidificationButton_clicked();
void on_tempButton_clicked();
void focusTempButton();
private:
Ui::CooldownPopup *ui;
Oven *oven;
QTimer cooldownStartTimer;
QTimer checkOvenTimer;
bool showingCurrentTemp;
QTimer showCurrentTempTimer;
int cookingFanLevel;
int expectingFanLevel;
bool started;
bool opened;
int lastDisplayedFanLevel;
bool lastDisplayedHumidification;
QTimer focusTempButtonTimer;
QWidget *pushed = NULL;
void onEncoderLeft();
void onEncoderRight();
void onEncoderClicked(QWidget *clicked);
};
#endif // COOLDOWNPOPUP_H