preheatpopup.h 959 Bytes
#ifndef PREHEATPOPUP_H
#define PREHEATPOPUP_H

#include <QWidget>
#include <QTimer>

#include "oven.h"

namespace Ui {
class PreheatPopup;
}

class PreheatPopup : public QWidget
{
    Q_OBJECT

public:
    explicit PreheatPopup(QWidget *parent = 0, Oven *oven = 0);
    ~PreheatPopup();

protected:
    void keyReleaseEvent(QKeyEvent *event);

private slots:
    void updateView();
    void start();
    void stop();

    void showCurrentHumidity();
    void showCurrentTemp();

    void onOvenChanged();

    void on_closeButton_clicked();
    void on_closeButton_2_clicked();

    void on_humidityGaugeButton_pressed();
    void on_humidityGaugeButton_released();
    void on_heatGaugeButton_pressed();
    void on_heatGaugeButton_released();

private:
    Ui::PreheatPopup *ui;
    Oven *oven;

    QTimer showCurrentHumidityTimer;
    QTimer showCurrentTempTimer;
    bool showingCurrentHumidity;
    bool showingCurrentTemp;
};

#endif // PREHEATPOPUP_H