68c06e96f
김태훈
자동 요리 세부 사항 구현
|
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
|
#ifndef AUTOCOOKCHECKCONFIGWINDOW_H
#define AUTOCOOKCHECKCONFIGWINDOW_H
#include <QMainWindow>
#include <QPushButton>
#include <QLabel>
#include <QSlider>
#include "cook.h"
#include "slider.h"
namespace Ui {
class AutoCookCheckConfigWindow;
}
class AutoCookCheckConfigWindow : public QMainWindow
{
Q_OBJECT
struct ConfigWidget {
QPushButton *button;
QLabel *minimum;
QLabel *maximum;
QLabel *current;
Slider *slider;
};
public:
explicit AutoCookCheckConfigWindow(QWidget *parent, Cook cook);
~AutoCookCheckConfigWindow();
bool eventFilter(QObject *watched, QEvent *event);
protected:
void keyPressEvent(QKeyEvent *event);
void keyReleaseEvent(QKeyEvent *event);
private:
Ui::AutoCookCheckConfigWindow *ui;
QList<ConfigWidget> configWidgets;
Cook cook;
void setupUi();
QTimer afterThreeSecsTimer;
QWidget *pushed = NULL;
void onEncoderLeft();
void onEncoderRight();
void onEncoderClicked(QWidget *clicked);
private slots:
void afterThreeSecs();
void on_backButton_clicked();
};
#endif // AUTOCOOKCHECKCONFIGWINDOW_H
|