#include <GeoFenceController.h>
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 () | |
| Q_INVOKABLE void | addInclusionPolygon (QGeoCoordinate topLeft, QGeoCoordinate bottomRight) |
| Q_INVOKABLE void | addInclusionCircle (QGeoCoordinate topLeft, QGeoCoordinate bottomRight) |
| Q_INVOKABLE void | deletePolygon (int index) |
| Q_INVOKABLE void | deleteCircle (int index) |
| Q_INVOKABLE 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 (void) |
Additional Inherited Members | |
| Protected Attributes inherited from PlanElementController | |
| PlanMasterController * | _masterController |
| bool | _flyView |
Definition at line 15 of file GeoFenceController.h.
| GeoFenceController::GeoFenceController | ( | PlanMasterController * | masterController, |
| QObject * | parent = nullptr ) |
Definition at line 21 of file GeoFenceController.cc.
References breachReturnPointChanged(), PlanElementController::containsItemsChanged(), ObjectItemModelBase::countChanged(), ObjectItemModelBase::dirtyChanged(), GeoFenceController(), PlanElementController::masterController(), PlanElementController::PlanElementController(), and Fact::rawValueChanged().
Referenced by GeoFenceController().
| GeoFenceController::~GeoFenceController | ( | ) |
Definition at line 44 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 411 of file GeoFenceController.cc.
References clearAllInteractive(), and QGCMapCircle::setInteractive().
| void GeoFenceController::addInclusionPolygon | ( | QGeoCoordinate | topLeft, |
| QGeoCoordinate | bottomRight ) |
Add a new inclusion polygon to the fence
| topLeft | Top left coordinate or map viewport |
| bottomRight | Bottom right left coordinate or map viewport |
Definition at line 378 of file GeoFenceController.cc.
References QGCMapPolygon::appendVertex(), clearAllInteractive(), and QGCMapPolygon::setInteractive().
|
inline |
Definition at line 57 of file GeoFenceController.h.
|
inline |
Definition at line 76 of file GeoFenceController.h.
Referenced by breachReturnPointChanged(), paramCircularFenceChanged(), and setBreachReturnPoint().
|
signal |
References breachReturnPoint().
Referenced by GeoFenceController(), load(), and setBreachReturnPoint().
|
inline |
Definition at line 75 of file GeoFenceController.h.
Referenced by paramCircularFenceChanged().
| void GeoFenceController::clearAllInteractive | ( | void | ) |
Clears the interactive bit from all fence items.
Definition at line 452 of file GeoFenceController.cc.
Referenced by addInclusionCircle(), and addInclusionPolygon().
|
finalvirtual |
Implements PlanElementController.
Definition at line 347 of file GeoFenceController.cc.
| void GeoFenceController::deleteCircle | ( | int | index | ) |
Deletes the specified circle from the circle list
| index | Index of circle to delete |
Definition at line 442 of file GeoFenceController.cc.
| void GeoFenceController::deletePolygon | ( | int | index | ) |
Deletes the specified polygon from the polygon list
| index | Index of polygon to delete |
Definition at line 432 of file GeoFenceController.cc.
|
finalvirtual |
Implements PlanElementController.
Definition at line 257 of file GeoFenceController.cc.
Referenced by paramCircularFenceChanged(), and setDirty().
|
signal |
| bool GeoFenceController::isEmpty | ( | void | ) | const |
Definition at line 566 of file GeoFenceController.cc.
|
finalvirtual |
Implements PlanElementController.
Definition at line 107 of file GeoFenceController.cc.
References breachReturnPointChanged(), JsonParsing::jsonVersionKey, QGCFenceCircle::loadFromJson(), QGCFencePolygon::loadFromJson(), GeoJsonHelper::loadGeoCoordinate(), removeAll(), setDirty(), and JsonParsing::validateKeys().
|
signal |
|
finalvirtual |
Implements PlanElementController.
Definition at line 227 of file GeoFenceController.cc.
References PlanElementController::_masterController, and syncInProgress().
| double GeoFenceController::paramCircularFence | ( | void | ) |
Definition at line 470 of file GeoFenceController.cc.
References ParameterManager::defaultComponentId.
|
signal |
References breachReturnPoint(), circles(), dirty(), and polygons().
|
inline |
Definition at line 74 of file GeoFenceController.h.
Referenced by paramCircularFenceChanged().
|
finalvirtual |
Removes all from controller only.
Implements PlanElementController.
Definition at line 209 of file GeoFenceController.cc.
References setBreachReturnPoint().
Referenced by load().
|
finalvirtual |
Removes all from vehicle and controller Signals removeAllComplete when done
Implements PlanElementController.
Definition at line 216 of file GeoFenceController.cc.
References PlanElementController::_masterController, and syncInProgress().
|
finalvirtual |
Implements PlanElementController.
Definition at line 178 of file GeoFenceController.cc.
References JsonParsing::jsonVersionKey, GeoJsonHelper::saveGeoCoordinate(), QGCFenceCircle::saveToJson(), and QGCFencePolygon::saveToJson().
|
finalvirtual |
Sends the current plan element to the vehicle Signals sendComplete when done
Implements PlanElementController.
Definition at line 239 of file GeoFenceController.cc.
References PlanElementController::_masterController, setDirty(), and syncInProgress().
| void GeoFenceController::setBreachReturnPoint | ( | const QGeoCoordinate & | breachReturnPoint | ) |
Definition at line 65 of file GeoFenceController.cc.
References breachReturnPoint(), breachReturnPointChanged(), and setDirty().
Referenced by removeAll().
|
finalvirtual |
Implements PlanElementController.
Definition at line 263 of file GeoFenceController.cc.
References dirty(), and PlanElementController::dirtyChanged().
Referenced by load(), sendToVehicle(), and setBreachReturnPoint().
|
finalvirtual |
Implements PlanElementController.
Definition at line 352 of file GeoFenceController.cc.
References PlanElementController::_flyView, PlanElementController::_masterController, and syncInProgress().
|
finalvirtual |
Should be called immediately upon Component.onCompleted.
Reimplemented from PlanElementController.
Definition at line 49 of file GeoFenceController.cc.
References PlanElementController::_masterController, PlanMasterController::managerVehicleChanged(), and PlanElementController::start().
|
finalvirtual |
true: controller is waiting for the current load to complete
Implements PlanElementController.
Definition at line 462 of file GeoFenceController.cc.
|
finalvirtual |
Implements PlanElementController.
Definition at line 252 of file GeoFenceController.cc.
Referenced by loadFromVehicle(), removeAllFromVehicle(), sendToVehicle(), and showPlanFromManagerVehicle().