#pragma once

#include <QObject>
#include "WimaArea.h"
#include "WimaServiceArea.h"
#include "WimaGOperationArea.h"

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

    // Overrides from WimaPolygon
    QString         mapVisualQML    (void) const { return "WimaVCorridorMapVisual.qml";}
    QString         editorQML       (void) const { return "WimaVCorridorEditor.qml";}

    // Methodes
    void                saveToJson     (QJsonObject& json);
    bool                loadFromJson   (const QJsonObject& json, QString& errorString);

    // static Members
    static const char* wimaVCorridorName;

    // Friends
    friend void print(const WimaVCorridor& area, QString& outputString);
    friend void print(const WimaVCorridor& area);

signals:
    void serviceAreaChanged (WimaServiceArea* serviceArea);
    void opAreaChanged      (WimaGOperationArea* opArea);

public slots:
    /// Updates this with data from area
    void update(const WimaVCorridor& area);

private:
    void init();

};


