#ifndef MAINWINDOW_H #define MAINWINDOW_H #include #include "define.h" namespace Ui { class MainWindow; } class MainWindow : public QMainWindow { Q_OBJECT static MainWindow *instance; public: explicit MainWindow(QWidget *parent = 0); ~MainWindow(); static MainWindow *getInstance() { return instance; } static void jump(QMainWindow *newChild); static void killChild(); static bool killChildCook(); protected: void keyPressEvent(QKeyEvent *event); void keyReleaseEvent(QKeyEvent *event); private: Ui::MainWindow *ui; QMainWindow *child; QWidget *pushed = NULL; void onEncoderLeft(); void onEncoderRight(); void onEncoderClicked(QWidget *clicked); private slots: void showManualCookWindow(Define::Mode mode); void showAutoCookSelectionWindow(Define::CookType type); void newChild(QMainWindow *newChild); void onChildDestroyed(QObject *destroyed); void on_steamButton_clicked(); void on_combiButton_clicked(); void on_dryheatButton_clicked(); void on_poultryButton_clicked(); void on_meatButton_clicked(); void on_fishButton_clicked(); void on_dessertButton_clicked(); void on_grainButton_clicked(); void on_breadButton_clicked(); void on_etcButton_clicked(); void on_primeButton_clicked(); void on_multiButton_clicked(); void on_programmingButton_clicked(); void on_washButton_clicked(); void on_configButton_clicked(); void on_helpButton_clicked(); }; #endif // MAINWINDOW_H