AirspaceRestrictionProvider.h 1.54 KB
Newer Older
1 2
/****************************************************************************
 *
Gus Grubba's avatar
Gus Grubba committed
3
 * (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
4 5 6 7 8 9 10 11 12 13 14 15 16
 *
 * 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
#include "QmlObjectListModel.h"
18
#include "QGCGeoBoundingCube.h"
19

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

class AirspacePolygonRestriction;
class AirspaceCircularRestriction;
26 27 28 29

class AirspaceRestrictionProvider : public QObject {
    Q_OBJECT
public:
30
    AirspaceRestrictionProvider     (QObject* parent = nullptr);
31 32
    ~AirspaceRestrictionProvider    () = default;

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

36 37 38 39 40
    /**
     * 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
     */
41
    virtual void setROI (const QGCGeoBoundingCube& roi, bool reset = false) = 0;
42

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