• 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
  • writers
  • kml
KmlLookAtTagWriter.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 //
10 
11 
12 #include "KmlLookAtTagWriter.h"
13 
14 #include "GeoDataLookAt.h"
15 #include "GeoDataTypes.h"
16 #include "GeoWriter.h"
17 #include "KmlElementDictionary.h"
18 
19 namespace Marble
20 {
21 
22 static GeoTagWriterRegistrar s_writerLookAt( GeoTagWriter::QualifiedName(GeoDataTypes::GeoDataLookAtType,
23  kml::kmlTag_nameSpace22),
24  new KmlLookAtTagWriter() );
25 
26 
27 bool KmlLookAtTagWriter::write( const GeoNode *node,
28  GeoWriter& writer ) const
29 {
30  const GeoDataLookAt *lookAt = static_cast<const GeoDataLookAt*>(node);
31 
32  writer.writeStartElement( kml::kmlTag_LookAt );
33 
34  writer.writeElement( "longitude", QString::number( lookAt->longitude( GeoDataCoordinates::Degree ), 'f', 10 ) );
35  writer.writeElement( "latitude", QString::number( lookAt->latitude( GeoDataCoordinates::Degree ), 'f', 10 ) );
36  writer.writeElement( "altitude", QString::number( lookAt->altitude(), 'f', 10 ) );
37  writer.writeElement( "range", QString::number( lookAt->range(), 'f', 10 ) );
38 
39  writer.writeEndElement();
40 
41  return true;
42 }
43 
44 }
Marble::s_writerLookAt
static GeoTagWriterRegistrar s_writerLookAt(GeoTagWriter::QualifiedName(GeoDataTypes::GeoDataGroundOverlayType, kml::kmlTag_nameSpace22), new KmlGroundOverlayWriter)
KmlLookAtTagWriter.h
Marble::GeoDataTypes::GeoDataLookAtType
const char * GeoDataLookAtType
Definition: GeoDataTypes.cpp:54
Marble::GeoDataLookAt::longitude
qreal longitude(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
retrieves the longitude of the GeoDataLookAt object use the unit parameter to switch between Radian a...
Definition: GeoDataLookAt.cpp:91
Marble::GeoNode
A shared base class for all classes that are mapped to a specific tag (ie.
Definition: GeoDocument.h:60
Marble::kml::kmlTag_nameSpace22
const char * kmlTag_nameSpace22
Definition: KmlElementDictionary.cpp:33
Marble::GeoDataLookAt::range
qreal range() const
Retrieve the distance (in meters) between the camera and the object looked at.
Definition: GeoDataLookAt.cpp:107
Marble::GeoDataCoordinates::Degree
Definition: GeoDataCoordinates.h:66
Marble::GeoWriter::writeElement
void writeElement(const QString &namespaceUri, const QString &key, const QString &value)
Convenience method to write value with key prefixed format namespaceUri.
Definition: GeoWriter.cpp:84
GeoWriter.h
Marble::KmlLookAtTagWriter::write
virtual bool write(const GeoNode *node, GeoWriter &writer) const
Definition: KmlLookAtTagWriter.cpp:27
GeoDataLookAt.h
KmlElementDictionary.h
Marble::kml::kmlTag_LookAt
const char * kmlTag_LookAt
Definition: KmlElementDictionary.cpp:111
Marble::GeoWriter
Standard Marble way of writing XML This class is intended to be a standardised way of writing XML for...
Definition: GeoWriter.h:28
Marble::GeoDataLookAt::altitude
qreal altitude() const
retrieves the altitude of the GeoDataLookAt object
Definition: GeoDataLookAt.cpp:69
Marble::GeoTagWriter::QualifiedName
QPair< QString, QString > QualifiedName
Object Name and Namespace Pair This type is intended to be used in a similar way to.
Definition: GeoTagWriter.h:48
Marble::GeoDataLookAt::latitude
qreal latitude(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
retrieves the latitude of the GeoDataLookAt object use the unit parameter to switch between Radian an...
Definition: GeoDataLookAt.cpp:80
Marble::GeoDataLookAt
Definition: GeoDataLookAt.h:23
GeoDataTypes.h
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