programmingwindow.h 1.09 KB
#ifndef PROGRAMMINGWINDOW_H
#define PROGRAMMINGWINDOW_H

#include <QMainWindow>

#include "cookpanelbutton.h"

namespace Ui {
class ProgrammingWindow;
}

class ProgrammingWindow : public QMainWindow
{
    Q_OBJECT

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

    void listAuto();
    void listManual();

private slots:
    void setupUi();
    void updateView();

    void listButtons(QList<CookRecord> record);
    void clear();
    CookPanelButton *newButton(CookRecord record);

    void back();
    void save();

    void onInfoButtonClicked(CookPanelButton *panelButton);
    void onDeleteButtonClicked(CookPanelButton *panelButton);
    void onLongPressed(CookPanelButton *panelButton);

    void on_addButton_clicked();

    void on_autoButton_toggled(bool checked);
    void on_manualButton_toggled(bool checked);

    void on_backButton_clicked();
    void on_saveButton_clicked();
    void on_helpButton_clicked();

private:
    Ui::ProgrammingWindow *ui;

    QList<CookPanelButton *> list;
    CookPanelButton *lastInfoDisplayed;
};

#endif // PROGRAMMINGWINDOW_H