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

marble

  • sources
  • kde-4.12
  • kdeedu
  • marble
  • src
  • lib
  • marble
  • geodata
  • handlers
  • kml
KmlLatitudeTagHandler.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 2010 Gaurav Gupta <1989.gaurav@googlemail.com>
9 // Copyright 2013 Sanjiban Bairagya <sanjiban22393@gmail.com>
10 //
11 
12 #include "KmlLatitudeTagHandler.h"
13 
14 #include "MarbleDebug.h"
15 
16 #include "KmlElementDictionary.h"
17 #include "MarbleGlobal.h"
18 
19 #include "GeoDataLookAt.h"
20 #include "GeoDataCamera.h"
21 #include "GeoParser.h"
22 #include "GeoDataCoordinates.h"
23 #include "GeoDataLocation.h"
24 
25 namespace Marble
26 {
27 namespace kml
28 {
29  KML_DEFINE_TAG_HANDLER( latitude )
30  GeoNode *KmllatitudeTagHandler::parse( GeoParser & parser ) const
31  {
32  Q_ASSERT( parser.isStartElement()
33  && parser.isValidElement( kmlTag_latitude ) );
34 
35  GeoStackItem parentItem = parser.parentElement();
36 
37  if ( parentItem.is<GeoDataLookAt>() ) {
38  qreal latitude = parser.readElementText().trimmed().toDouble();
39  parentItem.nodeAs<GeoDataLookAt>()->setLatitude(latitude, GeoDataCoordinates::Degree);
40  } else if ( parentItem.is<GeoDataCamera>() ) {
41  qreal latitude = parser.readElementText().trimmed().toDouble();
42  parentItem.nodeAs<GeoDataCamera>()->setLatitude(latitude, GeoDataCoordinates::Degree);
43  } else if ( parentItem.is<GeoDataLocation>() ) {
44  qreal latitude = parser.readElementText().trimmed().toDouble();
45  parentItem.nodeAs<GeoDataLocation>()->setLatitude(latitude, GeoDataCoordinates::Degree);
46  }
47  return 0;
48  }
49  }
50 }
GeoDataCoordinates.h
Marble::GeoStackItem::nodeAs
T * nodeAs()
Definition: GeoParser.h:120
Marble::GeoNode
A shared base class for all classes that are mapped to a specific tag (ie.
Definition: GeoDocument.h:60
GeoParser.h
Marble::GeoDataCamera
Definition: GeoDataCamera.h:22
MarbleDebug.h
Marble::GeoDataCoordinates::Degree
Definition: GeoDataCoordinates.h:66
Marble::GeoParser
Definition: GeoParser.h:40
GeoDataCamera.h
KmlLatitudeTagHandler.h
Marble::kml::KmllatitudeTagHandler
Definition: KmlLatitudeTagHandler.h:21
GeoDataLookAt.h
KmlElementDictionary.h
Marble::GeoStackItem
Definition: GeoParser.h:97
KML_DEFINE_TAG_HANDLER
#define KML_DEFINE_TAG_HANDLER(Name)
Definition: KmlElementDictionary.h:237
MarbleGlobal.h
GeoDataLocation.h
Marble::GeoDataLookAt
Definition: GeoDataLookAt.h:23
Marble::GeoDataLocation
Definition: GeoDataLocation.h:23
Marble::kml::kmlTag_latitude
const char * kmlTag_latitude
Definition: KmlElementDictionary.cpp:94
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:50 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
  • kstars
  • libkdeedu
  •   keduvocdocument
  • 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