WimaDataContainer.h 1.68 KB
Newer Older
1
#pragma once
2 3 4 5 6 7

#include <QObject>

#include "QmlObjectListModel.h"

#include "WimaArea.h"
Valentin Platzgummer's avatar
Valentin Platzgummer committed
8
#include "WimaMeasurementArea.h"
9
#include "WimaServiceArea.h"
Valentin Platzgummer's avatar
Valentin Platzgummer committed
10
#include "WimaCorridor.h"
11 12 13 14 15 16

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

20
    const WimaArea *             joinedArea  (void) { return _joinedArea; }
Valentin Platzgummer's avatar
Valentin Platzgummer committed
21
    const WimaMeasurementArea *   opArea      (void) { return _opArea; }
22
    const WimaServiceArea *      serArea     (void) { return _serArea; }
Valentin Platzgummer's avatar
Valentin Platzgummer committed
23
    const WimaCorridor *        corridor    (void) { return _corridor; }
24
    const QmlObjectListModel *   visualItems (void) { return _visualItems; }
25 26

signals:
27
    void joinedAreaChanged  (const WimaArea             *area);
Valentin Platzgummer's avatar
Valentin Platzgummer committed
28
    void opAreaChanged      (const WimaMeasurementArea   *area);
29
    void serAreaChanged     (const WimaServiceArea      *area);
Valentin Platzgummer's avatar
Valentin Platzgummer committed
30
    void corridorChanged    (const WimaCorridor        *area);
31
    void visualItemsChanged (const QmlObjectListModel   *area);
32 33

public slots:
34
    void setJoinedArea      (const WimaArea             *joinedArea);
Valentin Platzgummer's avatar
Valentin Platzgummer committed
35
    void setOpArea          (const WimaMeasurementArea   *opArea);
36
    void setSerArea         (const WimaServiceArea      *serArea);
Valentin Platzgummer's avatar
Valentin Platzgummer committed
37
    void setCorridor        (const WimaCorridor        *corridor);
38
    void setVisualItems     (const QmlObjectListModel   *visualItems);
39 40

private:
41
    const WimaArea           *_joinedArea;
Valentin Platzgummer's avatar
Valentin Platzgummer committed
42
    const WimaMeasurementArea *_opArea;
43
    const WimaServiceArea    *_serArea;
Valentin Platzgummer's avatar
Valentin Platzgummer committed
44
    const WimaCorridor      *_corridor;
45
    const QmlObjectListModel *_visualItems;
46 47
};