multicookautowindow.h 920 Bytes
#ifndef MULTICOOKAUTOWINDOW_H
#define MULTICOOKAUTOWINDOW_H

#include <QMainWindow>

#include "multicookbook.h"

namespace Ui {
class MultiCookAutoWindow;
}

class MultiCookAutoWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MultiCookAutoWindow(QWidget *parent = 0);
    ~MultiCookAutoWindow();

    void setType(Define::CookType type);
    void setBook(MultiCookBook *book);

signals:
    void selected(MultiCook *);

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

private:
    Ui::MultiCookAutoWindow *ui;

    MultiCookBook *book;
    int selectedIndex;

    QWidget *pushed = NULL;

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

private slots:
    void select(int idx);
    void confirm();

    void on_backButton_clicked();
    void on_helpButton_clicked();
};

#endif // MULTICOOKAUTOWINDOW_H