#pragma once #include #include "WimaArea.h" #include "WimaTrackerPolyline.h" class WimaServiceArea : public WimaArea { Q_OBJECT public: WimaServiceArea(); WimaServiceArea(QObject* parent); WimaServiceArea(const WimaArea& other, QObject* parent); Q_PROPERTY(const QGeoCoordinate& takeOffPosition READ takeOffPosition WRITE setTakeOffPosition NOTIFY takeOffPositionChanged) Q_PROPERTY(const QGeoCoordinate& landPosition READ landPosition WRITE setLandPosition NOTIFY landPositionChanged) // Overrides from WimaPolygon QString mapVisualQML (void) const { return "WimaServiceAreaMapVisual.qml";} QString editorQML (void) const { return "WimaServiceAreaEditor.qml";} // Property acessors const QGeoCoordinate& takeOffPosition (void) const { return _takeOffPosition;} const QGeoCoordinate& landPosition (void) const { return _landPosition;} WimaVCorridor *vehicleCorridor (void) const { return _vehicleCorridor;} // Property setters void setTakeOffPosition (const QGeoCoordinate& coordinate); void setLandPosition (const QGeoCoordinate& coordinate); void setVehicleCorridor (WimaVCorridor& corridor); // Member Methodes void saveToJson(QJsonObject& json); bool loadFromJson(const QJsonObject& json, QString& errorString); // static Members static const char* wimaServiceAreaName; signals: void takeOffPositionChanged (void); void landPositionChanged (void); void vehicleCorridorChanged (WimaVCorridor& corridor); private: QGeoCoordinate _takeOffPosition; QGeoCoordinate _landPosition; WimaVCorridor* _vehicleCorridor; };