WimaDataContainer.h 705 Bytes
Newer Older
1
#pragma once
2 3 4

#include <QObject>

5
#include "WimaPlanData.h"
6 7 8 9 10

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

15 16 17
    Q_INVOKABLE WimaDataContainer* pointerToThis() {return this;}

    bool dataValid() const;    
18 19

signals:
20
    void dataValidChanged   (bool valid);
21 22

public slots:
23 24 25
    void                push(const WimaPlanData &planData);
    const WimaPlanData &pull() const;
    void                setDataValid(bool valid);
26
private:
27 28 29 30


    WimaPlanData _planData;
    bool         _dataValid;
31 32
};