mainwindow.h 1.29 KB
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

#include "oven.h"
#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();

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

private slots:
    void showManualCookWindow(Define::Mode mode);
    void showAutoCookSelectionWindow(Define::CookType type);

    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();

private:
    Ui::MainWindow *ui;
    QMainWindow *child;
};

#endif // MAINWINDOW_H