autocook.h 698 Bytes
#ifndef AUTOCOOK_H
#define AUTOCOOK_H

#include "oven.h"
#include "cook.h"

class AutoCook
{
public:
    AutoCook();
    AutoCook(Cook cook);

    void startStep();
    void nextStep();

    bool advance();

    int remainingTime();
    bool isWaitingDoorOpened() { return isWaitingDoorOpened_; }
    bool done() { return done_; }

    Cook cook;
    int currentStepIndex;

    int startHumidity;
    int startTemp;

private:
    bool done_;
    bool isWaitingDoorOpened_;

    bool doorOpened;

    QTime stepStartTime;
    bool checkingCoreTemp;
    int lastCoreTemp;
    int lastIncreasedCoreTemp;
    QTime lastCoreTempChangedTime;
    QTime lastCoreTempIncreasedTime;
};

#endif // AUTOCOOK_H