6#include "KmlGxAltitudeModeTagHandler.h"
8#include "MarbleDebug.h"
10#include "KmlElementDictionary.h"
12#include "GeoDataAbstractView.h"
13#include "GeoDataGeometry.h"
14#include "GeoDataGroundOverlay.h"
15#include "GeoDataLatLonAltBox.h"
16#include "GeoDataModel.h"
17#include "GeoDataPlacemark.h"
18#include "GeoDataPoint.h"
19#include "GeoDataTrack.h"
29KML_DEFINE_TAG_HANDLER_GX22(altitudeMode)
31GeoNode *KmlaltitudeModeTagHandler::parse(GeoParser &parser)
const
33 Q_ASSERT(parser.isStartElement() && parser.isValidElement(
QLatin1StringView(kmlTag_altitudeMode)));
49 mDebug() <<
"Unknown altitude mode " << content <<
", falling back to 'clampToGround'";
53 GeoStackItem parentItem = parser.parentElement();
55 if (parentItem.is<GeoDataPlacemark>()) {
56 parentItem.nodeAs<GeoDataPlacemark>()->geometry()->setAltitudeMode(mode);
57 }
else if (parentItem.is<GeoDataPoint>()) {
58 parentItem.nodeAs<GeoDataPoint>()->setAltitudeMode(mode);
59 }
else if (parentItem.is<GeoDataLatLonAltBox>()) {
60 parentItem.nodeAs<GeoDataLatLonAltBox>()->setAltitudeMode(mode);
61 }
else if (parentItem.is<GeoDataTrack>()) {
62 parentItem.nodeAs<GeoDataTrack>()->setAltitudeMode(mode);
63 }
else if (parentItem.is<GeoDataGroundOverlay>()) {
64 parentItem.nodeAs<GeoDataGroundOverlay>()->setAltitudeMode(mode);
65 }
else if (parentItem.is<GeoDataAbstractView>()) {
66 parentItem.nodeAs<GeoDataAbstractView>()->setAltitudeMode(mode);
67 }
else if (parentItem.is<GeoDataModel>()) {
68 parentItem.nodeAs<GeoDataModel>()->setAltitudeMode(mode);
Binds a QML item to a specific geodetic location in screen coordinates.
@ RelativeToGround
Altitude is always given relative to ground level.
@ ClampToSeaFloor
Altitude always sticks to sea floor.
@ ClampToGround
Altitude always sticks to ground level.
@ RelativeToSeaFloor
Altitude is given relative to the sea floor.
@ Absolute
Altitude is given relative to the sealevel.
QString trimmed() const const