primewindow.h 998 Bytes
#ifndef PRIMEWINDOW_H
#define PRIMEWINDOW_H

#include <QMainWindow>

#include <QTimer>
#include <QList>

#include "cookpanelbutton.h"

namespace Ui {
class PrimeWindow;
}

class PrimeWindow : public QMainWindow
{
    Q_OBJECT

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

    void listMostCooked();
    void listRecents();
    void listFavorites();
    void focusFavorite(int id);

private slots:
    void on_mostCookedButton_toggled(bool checked);
    void on_recentsButton_toggled(bool checked);
    void on_favoritesButton_toggled(bool checked);

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

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

    void on_backButton_clicked();



private:
    Ui::PrimeWindow *ui;

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

#endif // PRIMEWINDOW_H