#pragma once

#include <QObject>

#include "Geometry/WimaAreaData.h"
#include "Geometry/WimaServiceAreaData.h"
#include "Geometry/WimaCorridorData.h"
#include "Geometry/WimaMeasurementAreaData.h"
#include "Geometry/WimaJoinedAreaData.h"
#include "MissionItem.h"

class WimaPlanData : QObject
{
    Q_OBJECT
public:
    WimaPlanData(QObject *parent = nullptr);
    WimaPlanData(const WimaPlanData &other, QObject *parent = nullptr);
    WimaPlanData& operator=(const WimaPlanData &other);

    // Member Methodes
    void append(const WimaJoinedAreaData        &areaData);
    void append(const WimaServiceAreaData       &areaData);
    void append(const WimaCorridorData          &areaData);
    void append(const WimaMeasurementAreaData   &areaData);
    void append(const QList<MissionItem *> &missionItems);
    void clear();

    QList<const WimaAreaData *> areaList() const;
    QList<MissionItem>  missionItems() const;



signals:
    void areaListChanged();

private:
    void _clearAndDeleteMissionItems();

private:
    WimaJoinedAreaData      _joinedArea;
    WimaServiceAreaData     _serviceArea;
    WimaCorridorData        _corridor;
    WimaMeasurementAreaData _measurementArea;
    QList<const WimaAreaData*>    _areaList;

    QList<MissionItem>           _missionItems;
};
