• 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
  • gpx
GpxParser.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 "GpxParser.h"
11 #include "GPXElementDictionary.h"
12 #include "GeoDataDocument.h"
13 
14 namespace Marble {
15 
16 GpxParser::GpxParser()
17  : GeoParser( 0 )
18 {
19 }
20 
21 GpxParser::~GpxParser()
22 {
23 }
24 
25 bool GpxParser::isValidRootElement()
26 {
27  return isValidElement(gpx::gpxTag_gpx);
28 }
29 
30 bool GpxParser::isValidElement(const QString& tagName) const
31 {
32  if (!GeoParser::isValidElement(tagName))
33  return false;
34 
35  return ( namespaceUri() == gpx::gpxTag_nameSpace10
36  || namespaceUri() == gpx::gpxTag_nameSpace11
37  || namespaceUri() == gpx::gpxTag_nameSpaceGarminTrackPointExt1);
38 }
39 
40 GeoDocument* GpxParser::createDocument() const
41 {
42  return new GeoDataDocument;
43 }
44 
45 }
GeoDataDocument.h
Marble::gpx::gpxTag_nameSpace11
const char * gpxTag_nameSpace11
Definition: GPXElementDictionary.cpp:32
QXmlStreamReader::namespaceUri
QStringRef namespaceUri() const
Marble::gpx::gpxTag_gpx
const char * gpxTag_gpx
Definition: GPXElementDictionary.cpp:36
Marble::GeoParser
Definition: GeoParser.h:40
Marble::gpx::gpxTag_nameSpace10
const char * gpxTag_nameSpace10
Definition: GPXElementDictionary.cpp:31
Marble::GpxParser::~GpxParser
virtual ~GpxParser()
Definition: GpxParser.cpp:21
QString
Marble::GeoParser::isValidElement
virtual bool isValidElement(const QString &tagName) const
Definition: GeoParser.cpp:117
GpxParser.h
GPXElementDictionary.h
Marble::gpx::gpxTag_nameSpaceGarminTrackPointExt1
const char * gpxTag_nameSpaceGarminTrackPointExt1
Definition: GPXElementDictionary.cpp:54
Marble::GpxParser::GpxParser
GpxParser()
Definition: GpxParser.cpp:16
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:39 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