Marble
9 #include "GeoDataParser.h"
12 #include "MarbleDebug.h"
15 #include "GeoDataDocument.h"
16 #include "GeoDocument.h"
17 #include "GeoTagHandler.h"
24 #include "KmlElementDictionary.h"
29 GeoDataParser::GeoDataParser(GeoDataSourceType source)
34 GeoDataParser::~GeoDataParser()
38 bool GeoDataParser::isValidRootElement()
40 if (m_source == GeoData_UNKNOWN)
42 if (GeoParser::isValidElement(kml::kmlTag_kml))
44 m_source = GeoData_KML;
52 switch ((GeoDataSourceType) m_source) {
55 return isValidElement(kml::kmlTag_kml);
62 bool GeoDataParser::isValidElement(
const QString& tagName)
const
64 if (!GeoParser::isValidElement(tagName))
67 switch ((GeoDataSourceType) m_source) {
70 const QStringRef namespaceUri = this->namespaceUri();
71 return (namespaceUri ==
QLatin1String(kml::kmlTag_nameSpace20) ||
87 GeoDocument* GeoDataParser::createDocument()
const
89 return new GeoDataDocument;
93 GeoDataDocument* geoDataDoc(GeoParser& parser)
95 GeoDocument* document = parser.activeDocument();
96 Q_ASSERT(document->isGeoDataDocument());
97 return static_cast<GeoDataDocument*
>(document);
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 Thu Sep 21 2023 04:12:26 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.