multicookcontroller.h 729 Bytes
#ifndef MULTICOOKCONTROLLER_H
#define MULTICOOKCONTROLLER_H

#include <QObject>
#include <QTimer>

#include "multicookcontainer.h"

class MultiCookController : public QObject
{
    Q_OBJECT
public:
    explicit MultiCookController(QObject *parent = 0);

    void setContainer(MultiCookContainer *container);
    bool requireOpen();
    bool requireClose();

signals:

public slots:

private:
    MultiCookContainer *container;
    QTimer checkTimer;

    enum State {
        Idle, Preheating, OpenDoor, CloseDoor, Running, Paused, Finished
    } state;

private slots:
    void check();

    void checkPreheating();
    void checkRunning();
    void checkPaused();
    void checkFinished();

};

#endif // MULTICOOKCONTROLLER_H