favoritenamepopup.h
1.03 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
#ifndef FAVORITENAMEPOPUP_H
#define FAVORITENAMEPOPUP_H
#include <QWidget>
#include "cookhistory.h"
namespace Ui {
class FavoriteNamePopup;
}
class FavoriteNamePopup : public QWidget
{
Q_OBJECT
explicit FavoriteNamePopup(QWidget *parent);
public:
explicit FavoriteNamePopup(QWidget *parent, ManualCookSetting setting);
explicit FavoriteNamePopup(QWidget *parent, AutoCookSetting setting);
~FavoriteNamePopup();
bool eventFilter(QObject *watched, QEvent *event);
protected:
void keyPressEvent(QKeyEvent *event);
void keyReleaseEvent(QKeyEvent *event);
private:
Ui::FavoriteNamePopup *ui;
enum { Manual, Auto } type;
ManualCookSetting manualSetting;
AutoCookSetting autoSetting;
QWidget *pushed = NULL;
void onEncoderLeft();
void onEncoderRight();
void onEncoderClicked(QWidget *clicked);
QString lastLine;
private slots:
void ok();
void cancel();
void revert();
void on_okButton_clicked();
void on_cancelButton_clicked();
};
#endif // FAVORITENAMEPOPUP_H