#ifndef PRIMEWINDOW_H #define PRIMEWINDOW_H #include #include #include #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); protected: void keyPressEvent(QKeyEvent *event); void keyReleaseEvent(QKeyEvent *event); private slots: void on_mostCookedButton_toggled(bool checked); void on_recentsButton_toggled(bool checked); void on_favoritesButton_toggled(bool checked); void listButtons(QList records); void clear(); CookPanelButton *newButton(CookRecord record); void onInfoButtonClicked(CookPanelButton *panelButton); void onDeleteButtonClicked(CookPanelButton *panelButton); void on_backButton_clicked(); void on_configButton_clicked(); void on_washButton_clicked(); void on_helpButton_clicked(); private: Ui::PrimeWindow *ui; QList list; CookPanelButton *lastInfoDisplayed; QWidget *pushed = NULL; void onEncoderLeft(); void onEncoderRight(); void onEncoderClicked(QWidget *clicked); }; #endif // PRIMEWINDOW_H