This class is used to encapsulate the QGeoCoordinate associated with a Rally Point into a QObject such that it can be used in a QmlObjectListMode for Qml. More...
#include <RallyPoint.h>
Signals | |
| void | coordinateChanged (const QGeoCoordinate &coordinate) |
| void | altitudeFrameChanged (void) |
| void | terrainQueryFailedChanged (void) |
| void | dirtyChanged (bool dirty) |
Public Member Functions | |
| RallyPoint (const QGeoCoordinate &coordinate, QGroundControlQmlGlobal::AltitudeFrame altitudeFrame=QGroundControlQmlGlobal::AltitudeFrameRelative, QObject *parent=nullptr) | |
| RallyPoint (const RallyPoint &other, QObject *parent=nullptr) | |
| ~RallyPoint () | |
| const RallyPoint & | operator= (const RallyPoint &other) |
| QGeoCoordinate | coordinate (void) const |
| void | setCoordinate (const QGeoCoordinate &coordinate) |
| Fact * | latitude (void) |
| Fact * | longitude (void) |
| Fact * | altitude (void) |
| QGroundControlQmlGlobal::AltitudeFrame | altitudeFrame (void) const |
| void | setAltitudeFrame (QGroundControlQmlGlobal::AltitudeFrame altitudeFrame) |
| bool | terrainQueryFailed (void) const |
| bool | terrainQueryPending (void) const |
| true: a terrain answer is on its way and will change the altitude. A failed query is not pending. | |
| bool | dirty (void) const |
| void | setDirty (bool dirty) |
| Q_INVOKABLE void | changeAltitudeFrame (QGroundControlQmlGlobal::AltitudeFrame altitudeFrame, double seedAltitude=0, bool seedFromTerrain=false) |
| Q_INVOKABLE void | useTerrainAltitude (bool switchToAbsoluteOnFailure=false) |
Static Public Member Functions | |
| static double | getDefaultFactAltitude () |
| static MAV_FRAME | mavFrame (QGroundControlQmlGlobal::AltitudeFrame altitudeFrame) |
| static QGroundControlQmlGlobal::AltitudeFrame | altitudeFrameFromMavFrame (MAV_FRAME mavFrame) |
This class is used to encapsulate the QGeoCoordinate associated with a Rally Point into a QObject such that it can be used in a QmlObjectListMode for Qml.
Definition at line 20 of file RallyPoint.h.
| RallyPoint::RallyPoint | ( | const QGeoCoordinate & | coordinate, |
| QGroundControlQmlGlobal::AltitudeFrame | altitudeFrame = QGroundControlQmlGlobal::AltitudeFrameRelative, | ||
| QObject * | parent = nullptr ) |
Definition at line 7 of file RallyPoint.cc.
References altitudeFrame(), and coordinate().
Referenced by operator=(), and RallyPoint().
| RallyPoint::RallyPoint | ( | const RallyPoint & | other, |
| QObject * | parent = nullptr ) |
Definition at line 24 of file RallyPoint.cc.
References RallyPoint(), and Fact::rawValue().
| RallyPoint::~RallyPoint | ( | ) |
Definition at line 52 of file RallyPoint.cc.
|
inline |
Definition at line 51 of file RallyPoint.h.
Referenced by dirtyChanged().
|
inline |
Definition at line 53 of file RallyPoint.h.
Referenced by RallyPointController::addPoint(), changeAltitudeFrame(), mavFrame(), RallyPoint(), RallyPointController::save(), RallyPointController::sendToVehicle(), and setAltitudeFrame().
|
signal |
Referenced by setAltitudeFrame().
|
static |
Definition at line 251 of file RallyPoint.cc.
References QGroundControlQmlGlobal::AltitudeFrameAbsolute, QGroundControlQmlGlobal::AltitudeFrameRelative, QGroundControlQmlGlobal::AltitudeFrameTerrain, and mavFrame().
Referenced by RallyPointController::load().
| void RallyPoint::changeAltitudeFrame | ( | QGroundControlQmlGlobal::AltitudeFrame | altitudeFrame, |
| double | seedAltitude = 0, | ||
| bool | seedFromTerrain = false ) |
User-driven frame change. The frame switches immediately and the altitude is reset to seedAltitude, except Absolute with seedFromTerrain which asks for the terrain elevation at the point instead (see useTerrainAltitude). Selecting a frame other than Absolute also cancels a pending terrain request.
Definition at line 121 of file RallyPoint.cc.
References altitudeFrame(), QGroundControlQmlGlobal::AltitudeFrameAbsolute, setAltitudeFrame(), and useTerrainAltitude().
| QGeoCoordinate RallyPoint::coordinate | ( | void | ) | const |
Definition at line 274 of file RallyPoint.cc.
Referenced by RallyPointController::addPoint(), coordinateChanged(), operator=(), RallyPoint(), RallyPointController::save(), RallyPointController::sendToVehicle(), and setCoordinate().
|
signal |
References coordinate().
Referenced by operator=(), and setCoordinate().
|
inline |
Definition at line 62 of file RallyPoint.h.
Referenced by dirtyChanged(), and setDirty().
|
signal |
References altitude(), QGroundControlQmlGlobal::AltitudeFrameRelative, and dirty().
Referenced by setDirty().
|
static |
Definition at line 265 of file RallyPoint.cc.
Referenced by RallyPointController::addPoint().
|
inline |
Definition at line 47 of file RallyPoint.h.
|
inline |
Definition at line 49 of file RallyPoint.h.
|
static |
Definition at line 239 of file RallyPoint.cc.
References altitudeFrame(), QGroundControlQmlGlobal::AltitudeFrameAbsolute, and QGroundControlQmlGlobal::AltitudeFrameTerrain.
Referenced by altitudeFrameFromMavFrame(), RallyPointController::save(), and RallyPointController::sendToVehicle().
| const RallyPoint & RallyPoint::operator= | ( | const RallyPoint & | other | ) |
Definition at line 39 of file RallyPoint.cc.
References coordinate(), coordinateChanged(), RallyPoint(), Fact::rawValue(), and setAltitudeFrame().
| void RallyPoint::setAltitudeFrame | ( | QGroundControlQmlGlobal::AltitudeFrame | altitudeFrame | ) |
Definition at line 104 of file RallyPoint.cc.
References altitudeFrame(), altitudeFrameChanged(), and setDirty().
Referenced by changeAltitudeFrame(), and operator=().
| void RallyPoint::setCoordinate | ( | const QGeoCoordinate & | coordinate | ) |
Definition at line 93 of file RallyPoint.cc.
References coordinate(), coordinateChanged(), and setDirty().
| void RallyPoint::setDirty | ( | bool | dirty | ) |
Definition at line 113 of file RallyPoint.cc.
References dirty(), and dirtyChanged().
Referenced by setAltitudeFrame(), and setCoordinate().
|
inline |
Definition at line 57 of file RallyPoint.h.
|
signal |
|
inline |
true: a terrain answer is on its way and will change the altitude. A failed query is not pending.
Definition at line 60 of file RallyPoint.h.
Referenced by RallyPointController::terrainQueryPending().
| void RallyPoint::useTerrainAltitude | ( | bool | switchToAbsoluteOnFailure = false | ) |
Asks for the terrain elevation at the point. On success the point switches to the Absolute frame with that elevation as altitude and follows the terrain while it moves, until the altitude is edited. On failure the altitude is left unchanged and the frame too, unless switchToAbsoluteOnFailure is set. That lets the user enter an AMSL altitude when terrain data is not available.
Definition at line 145 of file RallyPoint.cc.
Referenced by RallyPointController::addPoint(), and changeAltitudeFrame().