• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • sources
  • kde-4.14
  • kdeedu
  • marble
  • src
  • plugins
  • runner
  • kml
KmlParser.cpp
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2011 Thibaut Gridel <tgridel@free.fr>
9 
10 #include "KmlParser.h"
11 #include "KmlElementDictionary.h"
12 #include "GeoDataDocument.h"
13 
14 namespace Marble {
15 
16 KmlParser::KmlParser()
17  : GeoParser( 0 )
18 {
19 }
20 
21 KmlParser::~KmlParser()
22 {
23 }
24 
25 bool KmlParser::isValidRootElement()
26 {
27  return isValidElement(kml::kmlTag_kml);
28 }
29 
30 bool KmlParser::isValidElement(const QString& tagName) const
31 {
32  if (!GeoParser::isValidElement(tagName))
33  return false;
34 
35  return (namespaceUri() == kml::kmlTag_nameSpace20 ||
36  namespaceUri() == kml::kmlTag_nameSpace21 ||
37  namespaceUri() == kml::kmlTag_nameSpace22 ||
38  namespaceUri() == kml::kmlTag_nameSpaceGx22 ||
39  namespaceUri() == kml::kmlTag_nameSpaceOgc22 );
40 }
41 
42 GeoDocument* KmlParser::createDocument() const
43 {
44  return new KmlDocument;
45 }
46 
47 }
GeoDataDocument.h
Marble::kml::kmlTag_nameSpaceGx22
const char * kmlTag_nameSpaceGx22
Definition: KmlElementDictionary.cpp:35
QXmlStreamReader::namespaceUri
QStringRef namespaceUri() const
Marble::kml::kmlTag_nameSpace22
const char * kmlTag_nameSpace22
Definition: KmlElementDictionary.cpp:33
Marble::GeoParser
Definition: GeoParser.h:40
KmlElementDictionary.h
QString
Marble::kml::kmlTag_nameSpaceOgc22
const char * kmlTag_nameSpaceOgc22
Definition: KmlElementDictionary.cpp:34
Marble::GeoParser::isValidElement
virtual bool isValidElement(const QString &tagName) const
Definition: GeoParser.cpp:117
Marble::KmlParser::KmlParser
KmlParser()
Definition: KmlParser.cpp:16
Marble::kml::kmlTag_nameSpace21
const char * kmlTag_nameSpace21
Definition: KmlElementDictionary.cpp:32
Marble::kml::kmlTag_nameSpace20
const char * kmlTag_nameSpace20
Definition: KmlElementDictionary.cpp:31
KmlParser.h
Marble::KmlParser::~KmlParser
virtual ~KmlParser()
Definition: KmlParser.cpp:21
Marble::kml::kmlTag_kml
const char * kmlTag_kml
Definition: KmlElementDictionary.cpp:91
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:40 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal