Commit 4b56b0d1 authored by Beat Küng's avatar Beat Küng

AirMapController: add flightPermitStatusChanged

parent b60d4dae
......@@ -18,6 +18,7 @@ AirMapController::AirMapController(QObject* parent)
: QObject(parent)
, _manager(qgcApp()->toolbox()->airMapManager())
{
connect(_manager, &AirMapManager::flightPermitStatusChanged, this, &AirMapController::flightPermitStatusChanged);
}
AirMapController::~AirMapController()
......
......@@ -29,11 +29,18 @@ public:
Q_PROPERTY(QmlObjectListModel* polygons READ polygons CONSTANT) ///< List of PolygonAirspaceRestriction objects
Q_PROPERTY(QmlObjectListModel* circles READ circles CONSTANT) ///< List of CircularAirspaceRestriction objects
Q_PROPERTY(AirspaceAuthorization::PermitStatus flightPermitStatus READ flightPermitStatus NOTIFY flightPermitStatusChanged) ///< state of flight permission
Q_INVOKABLE void setROI(QGeoCoordinate center, double radius) { _manager->setROI(center, radius); }
QmlObjectListModel* polygons(void) { return _manager->polygonRestrictions(); }
QmlObjectListModel* circles(void) { return _manager->circularRestrictions(); }
AirspaceAuthorization::PermitStatus flightPermitStatus() const { return _manager->flightPermitStatus(); }
signals:
void flightPermitStatusChanged();
private:
AirMapManager* _manager;
QmlObjectListModel _polygonList;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment