#include <RallyPointController.h>
Signals | |
| void | currentRallyPointChanged (QObject *rallyPoint) |
| void | loadComplete (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 | |
| RallyPointController (PlanMasterController *masterController, QObject *parent=nullptr) | |
| ~RallyPointController () | |
| Q_INVOKABLE void | addPoint (QGeoCoordinate point) |
| Q_INVOKABLE void | removePoint (QObject *rallyPoint) |
| void | start (bool flyView) final |
| Should be called immediately upon Component.onCompleted. | |
| bool | supported (void) const final |
| true: controller is waiting for the current load to complete | |
| 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 * | points (void) |
| QString | editorQml (void) const |
| QObject * | currentRallyPoint (void) const |
| void | setCurrentRallyPoint (QObject *rallyPoint) |
| bool | isEmpty (void) const |
| bool | terrainQueryPending (void) const |
| true: a rally point is still waiting on terrain data for its altitude | |
| 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 13 of file RallyPointController.h.
|
explicit |
Definition at line 17 of file RallyPointController.cc.
References PlanElementController::containsItemsChanged(), ObjectItemModelBase::countChanged(), ObjectItemModelBase::dirtyChanged(), PlanElementController::masterController(), PlanElementController::PlanElementController(), and RallyPointController().
Referenced by RallyPointController().
| RallyPointController::~RallyPointController | ( | ) |
Definition at line 26 of file RallyPointController.cc.
| void RallyPointController::addPoint | ( | QGeoCoordinate | point | ) |
Definition at line 282 of file RallyPointController.cc.
References PlanElementController::_masterController, RallyPoint::altitudeFrame(), QGroundControlQmlGlobal::AltitudeFrameRelative, Vehicle::apmFirmware(), SettingsManager::appSettings(), RallyPoint::coordinate(), Vehicle::fixedWing(), RallyPoint::getDefaultFactAltitude(), SettingsManager::instance(), Vehicle::px4Firmware(), setCurrentRallyPoint(), setDirty(), and RallyPoint::useTerrainAltitude().
|
finalvirtual |
Implements PlanElementController.
Definition at line 362 of file RallyPointController.cc.
|
inline |
Definition at line 45 of file RallyPointController.h.
|
signal |
Referenced by setCurrentRallyPoint().
|
inlinefinalvirtual |
Implements PlanElementController.
Definition at line 38 of file RallyPointController.h.
Referenced by loadComplete(), and setDirty().
| QString RallyPointController::editorQml | ( | void | ) | const |
Definition at line 240 of file RallyPointController.cc.
| bool RallyPointController::isEmpty | ( | void | ) | const |
Definition at line 391 of file RallyPointController.cc.
|
finalvirtual |
Implements PlanElementController.
Definition at line 70 of file RallyPointController.cc.
References RallyPoint::altitudeFrameFromMavFrame(), QGroundControlQmlGlobal::AltitudeFrameRelative, JsonParsing::jsonVersionKey, GeoJsonHelper::loadGeoCoordinate(), removeAll(), setDirty(), and JsonParsing::validateKeys().
|
signal |
References dirty().
|
finalvirtual |
Implements PlanElementController.
Definition at line 187 of file RallyPointController.cc.
References PlanElementController::_masterController, and syncInProgress().
|
inline |
Definition at line 43 of file RallyPointController.h.
|
finalvirtual |
Removes all from controller only.
Implements PlanElementController.
Definition at line 169 of file RallyPointController.cc.
References setCurrentRallyPoint(), and setDirty().
Referenced by load().
|
finalvirtual |
Removes all from vehicle and controller Signals removeAllComplete when done
Implements PlanElementController.
Definition at line 176 of file RallyPointController.cc.
References PlanElementController::_masterController, and syncInProgress().
| void RallyPointController::removePoint | ( | QObject * | rallyPoint | ) |
Definition at line 330 of file RallyPointController.cc.
References setCurrentRallyPoint().
|
finalvirtual |
Implements PlanElementController.
Definition at line 152 of file RallyPointController.cc.
References RallyPoint::altitudeFrame(), RallyPoint::coordinate(), JsonParsing::jsonVersionKey, RallyPoint::mavFrame(), and GeoJsonHelper::saveGeoCoordinate().
|
finalvirtual |
Sends the current plan element to the vehicle Signals sendComplete when done
Implements PlanElementController.
Definition at line 199 of file RallyPointController.cc.
References PlanElementController::_masterController, RallyPoint::altitudeFrame(), RallyPoint::coordinate(), RallyPoint::mavFrame(), setDirty(), and syncInProgress().
| void RallyPointController::setCurrentRallyPoint | ( | QObject * | rallyPoint | ) |
Definition at line 349 of file RallyPointController.cc.
References currentRallyPointChanged().
Referenced by addPoint(), removeAll(), and removePoint().
|
finalvirtual |
Implements PlanElementController.
Definition at line 222 of file RallyPointController.cc.
References dirty(), and PlanElementController::dirtyChanged().
Referenced by addPoint(), load(), removeAll(), and sendToVehicle().
|
finalvirtual |
Implements PlanElementController.
Definition at line 367 of file RallyPointController.cc.
References PlanElementController::_flyView, PlanElementController::_masterController, and syncInProgress().
|
finalvirtual |
Should be called immediately upon Component.onCompleted.
Reimplemented from PlanElementController.
Definition at line 31 of file RallyPointController.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 325 of file RallyPointController.cc.
|
finalvirtual |
Implements PlanElementController.
Definition at line 217 of file RallyPointController.cc.
Referenced by loadFromVehicle(), removeAllFromVehicle(), sendToVehicle(), and showPlanFromManagerVehicle().
| bool RallyPointController::terrainQueryPending | ( | void | ) | const |
true: a rally point is still waiting on terrain data for its altitude
Definition at line 313 of file RallyPointController.cc.
References RallyPoint::terrainQueryPending().