7#include "KmlAltitudeTagHandler.h"
9#include "MarbleDebug.h"
11#include "KmlElementDictionary.h"
13#include "MarbleGlobal.h"
14#include "GeoDataLookAt.h"
15#include "GeoDataCamera.h"
16#include "GeoDataGroundOverlay.h"
18#include "GeoDataCoordinates.h"
19#include "GeoDataLocation.h"
25KML_DEFINE_TAG_HANDLER( altitude )
26 GeoNode *KmlaltitudeTagHandler::parse(GeoParser & parser)
const
28 Q_ASSERT(parser.isStartElement() && parser.isValidElement(
QLatin1String(kmlTag_altitude)));
30 GeoStackItem parentItem = parser.parentElement();
32 qreal
const altitude = parser.readElementText().trimmed().toDouble();
33 if ( parentItem.is<GeoDataLookAt>() ){
34 parentItem.nodeAs<GeoDataLookAt>()->setAltitude( altitude );
35 }
else if ( parentItem.is<GeoDataCamera>() ){
36 parentItem.nodeAs<GeoDataCamera>()->setAltitude( altitude );
37 }
else if ( parentItem.is<GeoDataGroundOverlay>() ) {
38 parentItem.nodeAs<GeoDataGroundOverlay>()->setAltitude( altitude );
39 }
else if ( parentItem.is<GeoDataLocation>() ) {
40 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 Jul 26 2024 11:57:57 by
doxygen 1.11.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.