AirspaceRestrictionProvider.h 1.51 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/****************************************************************************
 *
 *   (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
 */

17 18
#include "QmlObjectListModel.h"

19
#include <QObject>
Gus Grubba's avatar
Gus Grubba committed
20
#include <QList>
Gus Grubba's avatar
Gus Grubba committed
21
#include <QGeoCoordinate>
Gus Grubba's avatar
Gus Grubba committed
22 23 24

class AirspacePolygonRestriction;
class AirspaceCircularRestriction;
25 26 27 28 29 30 31

class AirspaceRestrictionProvider : public QObject {
    Q_OBJECT
public:
    AirspaceRestrictionProvider     (QObject* parent = NULL);
    ~AirspaceRestrictionProvider    () = default;

32 33 34
    Q_PROPERTY(QmlObjectListModel*  polygons        READ polygons       CONSTANT)
    Q_PROPERTY(QmlObjectListModel*  circles         READ circles        CONSTANT)

35 36 37 38 39 40 41
    /**
     * 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
     */
    virtual void setROI (const QGeoCoordinate& center, double radiusMeters) = 0;

42 43
    virtual QmlObjectListModel* polygons        () = 0;     ///< List of AirspacePolygonRestriction objects
    virtual QmlObjectListModel* circles         () = 0;     ///< List of AirspaceCircularRestriction objects
44
};