#pragma once

#include <QObject>

#include "QmlObjectListModel.h"

#include "WimaArea.h"
#include "WimaGOperationArea.h"
#include "WimaServiceArea.h"
#include "WimaVCorridor.h"

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

    const WimaArea *             joinedArea  (void) { return _joinedArea; }
    const WimaGOperationArea *   opArea      (void) { return _opArea; }
    const WimaServiceArea *      serArea     (void) { return _serArea; }
    const WimaVCorridor *        corridor    (void) { return _corridor; }

signals:
    void joinedAreaChanged  (const WimaArea             *area);
    void opAreaChanged      (const WimaGOperationArea   *area);
    void serAreaChanged     (const WimaServiceArea      *area);
    void corridorChanged    (const WimaVCorridor        *area);

public slots:
    void setJoinedArea      (const WimaArea             *joinedArea);
    void setOpArea          (const WimaGOperationArea   *opArea);
    void setSerArea         (const WimaServiceArea      *serArea);
    void setCorridor        (const WimaVCorridor        *corridor);

private:
    const WimaArea           *_joinedArea;
    const WimaGOperationArea *_opArea;
    const WimaServiceArea    *_serArea;
    const WimaVCorridor      *_corridor;
};

