Marble
8 #include "KmlExtrudeTagHandler.h"
9 #include "MarbleDebug.h"
10 #include "KmlElementDictionary.h"
12 #include "GeoDataGeometry.h"
13 #include "GeoDataPoint.h"
14 #include "GeoDataPolygon.h"
15 #include "GeoDataLineString.h"
16 #include "GeoDataLinearRing.h"
17 #include "GeoDataPlacemark.h"
19 #include "GeoParser.h"
25 KML_DEFINE_TAG_HANDLER( extrude )
27 GeoNode* KmlextrudeTagHandler::parse( GeoParser& parser )
const
29 Q_ASSERT(parser.isStartElement() && parser.isValidElement(
QLatin1String(kmlTag_extrude)));
31 GeoStackItem parentItem = parser.parentElement();
33 GeoDataGeometry* geometry;
34 bool validParents =
false;
36 if( parentItem.is<GeoDataPoint>() ) {
37 geometry = parentItem.nodeAs<GeoDataPoint>();
39 }
else if( parentItem.is<GeoDataPlacemark>() ) {
40 geometry = parentItem.nodeAs<GeoDataPlacemark>()->geometry();
42 }
else if( parentItem.is<GeoDataPolygon>() ) {
43 geometry = parentItem.nodeAs<GeoDataPolygon>();
45 }
else if( parentItem.is<GeoDataLineString>() ) {
46 geometry = parentItem.nodeAs<GeoDataLineString>();
48 }
else if( parentItem.is<GeoDataLinearRing>() ) {
49 geometry = parentItem.nodeAs<GeoDataLinearRing>();
57 geometry->setExtrude(extrude);
QString trimmed() const const
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Sep 25 2023 03:50:19 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.