autocookselectionwindow.h 1.06 KB
#ifndef AUTOCOOKSELECTIONWINDOW_H
#define AUTOCOOKSELECTIONWINDOW_H

#include <QMainWindow>
#include <QPushButton>

#include "oven.h"
#include "cookbook.h"

namespace Ui {
class AutoCookSelectionWindow;
}

class AutoCookSelectionWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit AutoCookSelectionWindow(QWidget *parent, Define::CookType type);
    ~AutoCookSelectionWindow();

protected:
    void keyPressEvent(QKeyEvent *event);
    void keyReleaseEvent(QKeyEvent *event);

private slots:
    void onCookSelected(int idx);

    void on_backButton_clicked();

    void on_configButton_clicked();

    void on_washButton_clicked();

    void on_helpButton_clicked();

    void on_prev_clicked();

    void on_next_clicked();

private:
    Ui::AutoCookSelectionWindow *ui;
    Define::CookType type;
    CookBook book;
    QList<QPushButton *> button;

    bool autoCookWindowOpened;

    QWidget *pushed = NULL;

    void onEncoderLeft();
    void onEncoderRight();
    void onEncoderClicked(QWidget *clicked);
    void list();
};

#endif // AUTOCOOKSELECTIONWINDOW_H