# pragma once

#include "TransectStyleComplexItem.h"

class CircularSurveyComplexItem :public TransectStyleComplexItem
{
    Q_OBJECT
public:
    /// @param vehicle Vehicle which this is being contructed for
    /// @param flyView true: Created for use in the Fly View, false: Created for use in the Plan View
    /// @param kmlOrShpFile Polygon comes from this file, empty for default polygon
    CircularSurveyComplexItem(Vehicle* vehicle, bool flyView, const QString& kmlOrShpFile, QObject* parent);

    // Overrides from ComplexMissionItem
    bool    load                (const QJsonObject& complexObject, int sequenceNumber, QString& errorString) final;
    QString mapVisualQML        (void) const final { return QStringLiteral("SpericalSurveyMapVisual.qml"); }

    // Overrides from TransectStyleComplexItem
    void    save                (QJsonArray&  planItems) final;
    bool    specifiesCoordinate (void) const final { return true; }
    void    appendMissionItems  (QList<MissionItem*>& items, QObject* missionItemParent) final;
    void    applyNewAltitude    (double newAltitude) final;
    double  timeBetweenShots    (void) final;

    // Overrides from VisualMissionionItem
    QString commandDescription  (void) const final { return tr("Spherical Survey"); }
    QString commandName         (void) const final { return tr("SphericalSurvey"); }
    QString abbreviation        (void) const final { return tr("Sph.S"); }
    bool    readyForSave        (void) const final;
    double  additionalTimeDelay (void) const final;

    static const char* settingsGroup;

private slots:
    // Overrides from TransectStyleComplexItem
    void _rebuildTransectsPhase1    (void) final;
    void _recalcComplexDistance     (void) final;
    void _recalcCameraShots         (void) final;
};



