|
QGroundControl
Ground Control Station for MAVLink Drones
|
#include <GeoFenceController.h>
Inheritance diagram for GeoFenceController:
Collaboration diagram for GeoFenceController:Signals | |
| void | breachReturnPointChanged (QGeoCoordinate breachReturnPoint) |
| void | editorQmlChanged (QString editorQml) |
| void | loadComplete (void) |
| void | paramCircularFenceChanged (void) |
Signals inherited from PlanElementController | |
| void | supportedChanged (bool supported) |
| void | containsItemsChanged () |
| void | syncInProgressChanged (bool syncInProgress) |
| void | dirtyChanged (bool dirty) |
| void | sendComplete (void) |
| void | removeAllComplete (void) |
Public Member Functions | |
| GeoFenceController (PlanMasterController *masterController, QObject *parent=nullptr) | |
| ~GeoFenceController () | |
| QmlObjectListModel *polygons READ polygons | CONSTANT (QmlObjectListModel *circles READ circles CONSTANT) 1(QGeoCoordinate breachReturnPoint READ breachReturnPoint WRITE setBreachReturnPoint NOTIFY breachReturnPointChanged) 1(Fact *breachReturnAltitude READ breachReturnAltitude CONSTANT) 1(double paramCircularFence READ paramCircularFence NOTIFY paramCircularFenceChanged) 1 void addInclusionPolygon(QGeoCoordinate topLeft |
| void | addInclusionCircle (QGeoCoordinate topLeft, QGeoCoordinate bottomRight) |
| void | deletePolygon (int index) |
| void | deleteCircle (int index) |
| void | clearAllInteractive (void) |
| Clears the interactive bit from all fence items. | |
| double | paramCircularFence (void) |
| Fact * | breachReturnAltitude (void) |
| bool | supported (void) const final |
| true: controller is waiting for the current load to complete | |
| void | start (bool flyView) final |
| Should be called immediately upon Component.onCompleted. | |
| void | save (QJsonObject &json) final |
| bool | load (const QJsonObject &json, QString &errorString) final |
| void | loadFromVehicle (void) final |
| void | sendToVehicle (void) final |
| void | removeAll (void) final |
| Removes all from controller only. | |
| void | removeAllFromVehicle (void) final |
| bool | syncInProgress (void) const final |
| bool | dirty (void) const final |
| void | setDirty (bool dirty) final |
| bool | containsItems (void) const final |
| bool | showPlanFromManagerVehicle (void) final |
| QmlObjectListModel * | polygons (void) |
| QmlObjectListModel * | circles (void) |
| QGeoCoordinate | breachReturnPoint (void) const |
| void | setBreachReturnPoint (const QGeoCoordinate &breachReturnPoint) |
| bool | isEmpty (void) const |
Public Member Functions inherited from PlanElementController | |
| PlanElementController (PlanMasterController *masterController, QObject *parent=nullptr) | |
| ~PlanElementController () | |
| PlanMasterController *masterController READ masterController | CONSTANT (bool supported READ supported NOTIFY supportedChanged) 1(bool containsItems READ containsItems NOTIFY containsItemsChanged) 1(bool syncInProgress READ syncInProgress NOTIFY syncInProgressChanged) 1(bool dirty READ dirty WRITE setDirty NOTIFY dirtyChanged) PlanMasterController *masterController(void) |
| < true: Elemement is non-empty | |
Public Attributes | |
| QmlObjectListModel *polygons READ polygons QGeoCoordinate | bottomRight |
Additional Inherited Members | |
Protected Attributes inherited from PlanElementController | |
| PlanMasterController * | _masterController |
| bool | _flyView |
Definition at line 18 of file GeoFenceController.h.
| GeoFenceController::GeoFenceController | ( | PlanMasterController * | masterController, |
| QObject * | parent = nullptr |
||
| ) |
Definition at line 20 of file GeoFenceController.cc.
References breachReturnPointChanged(), PlanElementController::containsItemsChanged(), ObjectItemModelBase::countChanged(), FactMetaData::createMapFromJsonFile(), ObjectItemModelBase::dirtyChanged(), and Fact::rawValueChanged().
| GeoFenceController::~GeoFenceController | ( | ) |
Definition at line 43 of file GeoFenceController.cc.
| void GeoFenceController::addInclusionCircle | ( | QGeoCoordinate | topLeft, |
| QGeoCoordinate | bottomRight | ||
| ) |
Add a new inclusion circle to the fence
| topLeft | Top left coordinate or map viewport |
| bottomRight | Bottom right left coordinate or map viewport |
Definition at line 415 of file GeoFenceController.cc.
References QmlObjectListModel::append(), bottomRight, clearAllInteractive(), and QGCMapCircle::setInteractive().
|
inline |
Definition at line 60 of file GeoFenceController.h.
|
inline |
Definition at line 79 of file GeoFenceController.h.
Referenced by setBreachReturnPoint().
|
signal |
Referenced by GeoFenceController(), load(), and setBreachReturnPoint().
|
inline |
Definition at line 78 of file GeoFenceController.h.
| void GeoFenceController::clearAllInteractive | ( | void | ) |
Clears the interactive bit from all fence items.
Definition at line 456 of file GeoFenceController.cc.
References QmlObjectListModel::count(), and QmlObjectListModel::value().
Referenced by addInclusionCircle().
| QmlObjectListModel *polygons READ polygons GeoFenceController::CONSTANT | ( | QmlObjectListModel *circles READ circles | CONSTANT | ) |
Add a new inclusion polygon to the fence
| topLeft | Top left coordinate or map viewport |
| bottomRight | Bottom right left coordinate or map viewport |
|
finalvirtual |
Implements PlanElementController.
Definition at line 351 of file GeoFenceController.cc.
References QmlObjectListModel::count().
Referenced by PlanMasterController::containsItems().
| void GeoFenceController::deleteCircle | ( | int | index | ) |
Deletes the specified circle from the circle list
| index | Index of circle to delete |
Definition at line 446 of file GeoFenceController.cc.
References QmlObjectListModel::count(), and QmlObjectListModel::removeAt().
| void GeoFenceController::deletePolygon | ( | int | index | ) |
Deletes the specified polygon from the polygon list
| index | Index of polygon to delete |
Definition at line 436 of file GeoFenceController.cc.
References QmlObjectListModel::count(), and QmlObjectListModel::removeAt().
|
finalvirtual |
Implements PlanElementController.
Definition at line 256 of file GeoFenceController.cc.
Referenced by setDirty().
|
signal |
| bool GeoFenceController::isEmpty | ( | void | ) | const |
Definition at line 570 of file GeoFenceController.cc.
References QmlObjectListModel::count().
Referenced by PlanMasterController::isEmpty().
|
finalvirtual |
Implements PlanElementController.
Definition at line 106 of file GeoFenceController.cc.
References QmlObjectListModel::append(), breachReturnPointChanged(), errorString, JsonHelper::jsonVersionKey, QGCFencePolygon::loadFromJson(), QGCFenceCircle::loadFromJson(), JsonHelper::loadGeoCoordinate(), removeAll(), setDirty(), and JsonHelper::validateKeys().
Referenced by PlanMasterController::loadFromFile().
|
signal |
|
finalvirtual |
Implements PlanElementController.
Definition at line 226 of file GeoFenceController.cc.
References PlanElementController::_masterController, PlanManager::loadFromVehicle(), PlanMasterController::offline(), and syncInProgress().
| double GeoFenceController::paramCircularFence | ( | void | ) |
Definition at line 474 of file GeoFenceController.cc.
References Vehicle::apmFirmware(), ParameterManager::defaultComponentId, ParameterManager::getParameter(), Vehicle::isOfflineEditingVehicle(), ParameterManager::parameterExists(), Vehicle::parameterManager(), and Vehicle::px4Firmware().
|
signal |
|
inline |
Definition at line 77 of file GeoFenceController.h.
|
finalvirtual |
Removes all from controller only.
Implements PlanElementController.
Definition at line 208 of file GeoFenceController.cc.
References QmlObjectListModel::clearAndDeleteContents(), and setBreachReturnPoint().
Referenced by load(), and PlanMasterController::removeAll().
|
finalvirtual |
Removes all from vehicle and controller Signals removeAllComplete when done
Implements PlanElementController.
Definition at line 215 of file GeoFenceController.cc.
References PlanElementController::_masterController, PlanMasterController::offline(), GeoFenceManager::removeAll(), and syncInProgress().
Referenced by PlanMasterController::removeAllFromVehicle().
|
finalvirtual |
Implements PlanElementController.
Definition at line 177 of file GeoFenceController.cc.
References QmlObjectListModel::count(), JsonHelper::jsonVersionKey, JsonHelper::saveGeoCoordinate(), QGCFenceCircle::saveToJson(), QGCFencePolygon::saveToJson(), and QmlObjectListModel::value().
Referenced by PlanMasterController::saveToJson().
|
finalvirtual |
Sends the current plan element to the vehicle Signals sendComplete when done
Implements PlanElementController.
Definition at line 238 of file GeoFenceController.cc.
References PlanElementController::_masterController, PlanMasterController::offline(), GeoFenceManager::sendToVehicle(), setDirty(), and syncInProgress().
| void GeoFenceController::setBreachReturnPoint | ( | const QGeoCoordinate & | breachReturnPoint | ) |
Definition at line 64 of file GeoFenceController.cc.
References breachReturnPoint(), breachReturnPointChanged(), and setDirty().
Referenced by removeAll().
|
finalvirtual |
Implements PlanElementController.
Definition at line 262 of file GeoFenceController.cc.
References QmlObjectListModel::count(), dirty(), PlanElementController::dirtyChanged(), QGCMapCircle::setDirty(), QGCMapPolygon::setDirty(), and QmlObjectListModel::value().
Referenced by load(), PlanMasterController::removeAll(), sendToVehicle(), and setBreachReturnPoint().
|
finalvirtual |
Implements PlanElementController.
Definition at line 356 of file GeoFenceController.cc.
References PlanElementController::_flyView, PlanElementController::_masterController, Vehicle::initialPlanRequestComplete(), PlanMasterController::offline(), and syncInProgress().
|
finalvirtual |
Should be called immediately upon Component.onCompleted.
Reimplemented from PlanElementController.
Definition at line 48 of file GeoFenceController.cc.
References PlanElementController::_masterController, PlanMasterController::managerVehicle(), PlanMasterController::managerVehicleChanged(), and PlanElementController::start().
Referenced by PlanMasterController::startStaticActiveVehicle().
|
finalvirtual |
true: controller is waiting for the current load to complete
Implements PlanElementController.
Definition at line 466 of file GeoFenceController.cc.
References Vehicle::capabilityBits().
Referenced by PlanMasterController::removeAllFromVehicle().
|
finalvirtual |
Implements PlanElementController.
Definition at line 251 of file GeoFenceController.cc.
References PlanManager::inProgress().
Referenced by loadFromVehicle(), removeAllFromVehicle(), sendToVehicle(), showPlanFromManagerVehicle(), and PlanMasterController::syncInProgress().
| QmlObjectListModel *polygons READ polygons QGeoCoordinate GeoFenceController::bottomRight |
Definition at line 41 of file GeoFenceController.h.
Referenced by addInclusionCircle().