#pragma once

#include <QObject>

#include "WimaPlanData.h"

class WimaDataContainer : public QObject
{
    Q_OBJECT
public:
    WimaDataContainer(QObject *parent = nullptr);
    WimaDataContainer(WimaDataContainer &other, QObject *parent = nullptr) = delete;
    WimaDataContainer(WimaDataContainer &other) = delete;

    Q_INVOKABLE WimaDataContainer* pointerToThis() {return this;}

    bool dataValid() const;    

signals:
    void dataValidChanged   (bool valid);

public slots:
    void                push(const WimaPlanData &planData);
    const WimaPlanData &pull() const;
    void                setDataValid(bool valid);
private:


    WimaPlanData _planData;
    bool         _dataValid;
};

