|
QGroundControl
Ground Control Station for MAVLink Drones
|
#include <GeoMapItem.h>
Inheritance diagram for GeoMapItem:
Collaboration diagram for GeoMapItem:Public Types | |
| enum class | AltitudeMode { ClampToGround , Absolute } |
| How the coordinate's vertical position is resolved. More... | |
Signals | |
| void | coordinateChanged () |
| void | anchorPointChanged () |
| void | sceneChanged () |
| void | surfaceModelChanged () |
| void | altitudeModeChanged () |
| void | projectedChanged () |
| void | scenePositionChanged () |
| void | delegate3DChanged () |
| void | node3DChanged () |
| void | crossfade3DChanged () |
| void | contentOpacity2DChanged () |
Public Member Functions | |
| GeoMapItem (QQuickItem *parent=nullptr) | |
| ~GeoMapItem () override | |
| QGeoCoordinate | coordinate () const |
| void | setCoordinate (const QGeoCoordinate &coordinate) |
| QPointF | anchorPoint () const |
| void | setAnchorPoint (const QPointF &anchorPoint) |
| GeoScene * | scene () const |
| void | setScene (GeoScene *scene) |
| SurfacePatchModel * | surfaceModel () const |
| void | setSurfaceModel (SurfacePatchModel *surfaceModel) |
| AltitudeMode | altitudeMode () const |
| void | setAltitudeMode (AltitudeMode mode) |
| bool | projected () const |
| QVector3D | scenePosition () const |
| QQmlComponent * | delegate3D () const |
| void | setDelegate3D (QQmlComponent *delegate3D) |
| QObject * | node3D () const |
| bool | crossfade3D () const |
| void | setCrossfade3D (bool crossfade3D) |
| qreal | contentOpacity2D () const |
GeoMap counterpart of QtLocation's MapQuickItem: anchors its QML content at a geographic coordinate, projected through the scene's camera into the 2D overlay above the View3D. Meant to be used as the base of marker controls (e.g. GeoMapPin) that declare their visuals as ordinary children. The item tracks camera pose, scene re-anchoring, terrain-scale transitions, and (in ClampToGround mode) terrain height refinement. While the coordinate is behind the camera or beyond the horizon the item parks off-screen and projected is false.
Consumers parent the item into the GeoMap control and wire scene (required) and surfaceModel (required for ClampToGround) from the map's properties.
Definition at line 38 of file GeoMapItem.h.
|
strong |
How the coordinate's vertical position is resolved.
| Enumerator | |
|---|---|
| ClampToGround | sit on the rendered terrain surface (default) |
| Absolute | use coordinate.altitude (NaN treated as 0) |
Definition at line 59 of file GeoMapItem.h.
|
explicit |
Definition at line 29 of file GeoMapItem.cc.
|
override |
Definition at line 34 of file GeoMapItem.cc.
|
inline |
Definition at line 84 of file GeoMapItem.h.
|
signal |
Referenced by setAltitudeMode().
|
inline |
Pixel offset from this item's top-left placed at the projected coordinate (e.g. the tip of a pin, or the center for a centered marker)
Definition at line 72 of file GeoMapItem.h.
Referenced by setAnchorPoint().
|
signal |
Referenced by setAnchorPoint().
|
inline |
Opacity for this item's 2D visuals: fades out during the 2D->3D transition when a delegate3D is set, 1.0 otherwise. Bind children's opacity to it (multiplying any dimming of their own).
Definition at line 120 of file GeoMapItem.h.
|
signal |
|
inline |
Definition at line 66 of file GeoMapItem.h.
Referenced by setCoordinate().
|
signal |
Referenced by setCoordinate().
|
inline |
Whether the delegate3D node crossfades with 2D content during the 2D<->3D transition (default). When false the node stays fully opaque in both modes (for items with no 2D counterpart, e.g. the flight path).
Definition at line 113 of file GeoMapItem.h.
Referenced by setCrossfade3D().
|
signal |
Referenced by setCrossfade3D().
|
inline |
Optional 3D counterpart of this item's 2D visuals: a QQuick3DNode component instantiated into the scene's content3D container. The item keeps the node's position on scenePosition, crossfades node opacity (terrainScale) against contentOpacity2D (1 - terrainScale), and syncs node visibility to this item's visible and coordinate validity.
Definition at line 102 of file GeoMapItem.h.
Referenced by setDelegate3D().
|
signal |
Referenced by setDelegate3D().
|
inline |
The instantiated delegate3D node (null while there is no delegate, scene or content3D container)
Definition at line 108 of file GeoMapItem.h.
|
signal |
|
inline |
False while the coordinate cannot be projected on screen (invalid, no camera, behind the camera or beyond the horizon)
Definition at line 90 of file GeoMapItem.h.
|
signal |
|
inline |
Definition at line 76 of file GeoMapItem.h.
Referenced by setScene().
|
signal |
Referenced by setScene().
|
inline |
Origin-relative scene position of the coordinate (z pre-scaled by verticalScale and terrainScale), matching the rendered surface. Valid even while not projected, so 3D content can bind to it directly.
Definition at line 95 of file GeoMapItem.h.
|
signal |
| void GeoMapItem::setAltitudeMode | ( | AltitudeMode | mode | ) |
Definition at line 109 of file GeoMapItem.cc.
References altitudeModeChanged().
| void GeoMapItem::setAnchorPoint | ( | const QPointF & | anchorPoint | ) |
Definition at line 50 of file GeoMapItem.cc.
References anchorPoint(), and anchorPointChanged().
| void GeoMapItem::setCoordinate | ( | const QGeoCoordinate & | coordinate | ) |
Definition at line 39 of file GeoMapItem.cc.
References coordinate(), and coordinateChanged().
| void GeoMapItem::setCrossfade3D | ( | bool | crossfade3D | ) |
Definition at line 140 of file GeoMapItem.cc.
References crossfade3D(), and crossfade3DChanged().
| void GeoMapItem::setDelegate3D | ( | QQmlComponent * | delegate3D | ) |
Definition at line 119 of file GeoMapItem.cc.
References delegate3D(), and delegate3DChanged().
| void GeoMapItem::setScene | ( | GeoScene * | scene | ) |
Definition at line 60 of file GeoMapItem.cc.
References GeoScene::cameraChanged(), GeoScene::content3DChanged(), scene(), sceneChanged(), GeoScene::sceneOriginChanged(), and GeoScene::terrainScaleChanged().
| void GeoMapItem::setSurfaceModel | ( | SurfacePatchModel * | surfaceModel | ) |
Definition at line 88 of file GeoMapItem.cc.
References surfaceModel(), surfaceModelChanged(), and SurfacePatchModel::terrainHeightsChanged().
|
inline |
Definition at line 80 of file GeoMapItem.h.
Referenced by setSurfaceModel().
|
signal |
Referenced by setSurfaceModel().