8#include "KmlAltitudeModeTagHandler.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"
27KML_DEFINE_TAG_HANDLER(altitudeMode)
29GeoNode *KmlaltitudeModeTagHandler::parse(GeoParser &parser)
const
31 Q_ASSERT(parser.isStartElement() && parser.isValidElement(
QLatin1StringView(kmlTag_altitudeMode)));
44 GeoStackItem parentItem = parser.parentElement();
46 if (parentItem.is<GeoDataPlacemark>()) {
47 parentItem.nodeAs<GeoDataPlacemark>()->geometry()->setAltitudeMode(mode);
48 }
else if (parentItem.is<GeoDataPoint>()) {
49 parentItem.nodeAs<GeoDataPoint>()->setAltitudeMode(mode);
50 }
else if (parentItem.is<GeoDataLatLonAltBox>()) {
51 parentItem.nodeAs<GeoDataLatLonAltBox>()->setAltitudeMode(mode);
52 }
else if (parentItem.is<GeoDataTrack>()) {
53 parentItem.nodeAs<GeoDataTrack>()->setAltitudeMode(mode);
54 }
else if (parentItem.is<GeoDataGroundOverlay>()) {
55 parentItem.nodeAs<GeoDataGroundOverlay>()->setAltitudeMode(mode);
56 }
else if (parentItem.is<GeoDataAbstractView>()) {
57 parentItem.nodeAs<GeoDataAbstractView>()->setAltitudeMode(mode);
58 }
else if (parentItem.is<GeoDataModel>()) {
59 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.
@ ClampToGround
Altitude always sticks to ground level.
@ Absolute
Altitude is given relative to the sealevel.
QString trimmed() const const