#ifndef AUTOCOOKCHECKCONFIGWINDOW_H #define AUTOCOOKCHECKCONFIGWINDOW_H #include #include #include #include #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 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