7#include "KmlAltitudeTagHandler.h"
9#include "MarbleDebug.h"
11#include "KmlElementDictionary.h"
13#include "GeoDataCamera.h"
14#include "GeoDataCoordinates.h"
15#include "GeoDataGroundOverlay.h"
16#include "GeoDataLocation.h"
17#include "GeoDataLookAt.h"
24KML_DEFINE_TAG_HANDLER(altitude)
25GeoNode *KmlaltitudeTagHandler::parse(GeoParser &parser)
const
27 Q_ASSERT(parser.isStartElement() && parser.isValidElement(
QLatin1StringView(kmlTag_altitude)));
29 GeoStackItem parentItem = parser.parentElement();
31 qreal
const altitude = parser.readElementText().trimmed().toDouble();
32 if (parentItem.is<GeoDataLookAt>()) {
33 parentItem.nodeAs<GeoDataLookAt>()->setAltitude(altitude);
34 }
else if (parentItem.is<GeoDataCamera>()) {
35 parentItem.nodeAs<GeoDataCamera>()->setAltitude(altitude);
36 }
else if (parentItem.is<GeoDataGroundOverlay>()) {
37 parentItem.nodeAs<GeoDataGroundOverlay>()->setAltitude(altitude);
38 }
else if (parentItem.is<GeoDataLocation>()) {
39 parentItem.nodeAs<GeoDataLocation>()->setAltitude(altitude);
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:52:13 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.