Newer
Older
/****************************************************************************
*
* (c) 2017 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
#pragma once
/**
* @class AirspaceRestrictionProvider
* Base class that queries for airspace restrictions
*/
Gus Grubba
committed
#include "QmlObjectListModel.h"
Gus Grubba
committed
#include "QGCGeoBoundingCube.h"
Gus Grubba
committed
class AirspacePolygonRestriction;
class AirspaceCircularRestriction;
class AirspaceRestrictionProvider : public QObject {
Q_OBJECT
public:
AirspaceRestrictionProvider (QObject* parent = nullptr);
~AirspaceRestrictionProvider () = default;
Gus Grubba
committed
Q_PROPERTY(QmlObjectListModel* polygons READ polygons CONSTANT)
Q_PROPERTY(QmlObjectListModel* circles READ circles CONSTANT)
/**
* Set region of interest that should be queried. When finished, the requestDone() signal will be emmited.
* @param center Center coordinate for ROI
* @param radiusMeters Radius in meters around center which is of interest
*/
Gus Grubba
committed
virtual void setROI (const QGCGeoBoundingCube& roi, bool reset = false) = 0;
Gus Grubba
committed
virtual QmlObjectListModel* polygons () = 0; ///< List of AirspacePolygonRestriction objects
virtual QmlObjectListModel* circles () = 0; ///< List of AirspaceCircularRestriction objects