• 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
KmlCameraTagWriter.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 2013 Mayank Madan <maddiemadan@gmail.com>
9 //
10 
11 
12 #include "KmlCameraTagWriter.h"
13 
14 #include "GeoDataCamera.h"
15 #include "GeoDataTypes.h"
16 #include "GeoWriter.h"
17 #include "KmlGroundOverlayWriter.h"
18 #include "KmlElementDictionary.h"
19 
20 namespace Marble
21 {
22 
23 bool KmlCameraTagWriter::write( const GeoNode *node, GeoWriter& writer ) const
24 {
25  const GeoDataCamera *camera = static_cast<const GeoDataCamera*>(node);
26 
27  writer.writeStartElement( kml::kmlTag_Camera );
28 
29  writer.writeElement( "longitude", QString::number( camera->longitude( GeoDataCoordinates::Degree ), 'f', 10 ) );
30  writer.writeElement( "latitude", QString::number( camera->latitude( GeoDataCoordinates::Degree ), 'f', 10 ) );
31  writer.writeElement( "altitude", QString::number( camera->altitude(), 'f', 10 ) );
32  writer.writeElement( "roll", QString::number( camera->roll()) );
33  writer.writeElement( "tilt", QString::number( camera->tilt()) );
34  writer.writeElement( "heading", QString::number( camera->heading()) );
35 
36 
37  writer.writeTextElement( kml::kmlTag_altitudeMode, KmlGroundOverlayWriter::altitudeModeToString(camera->altitudeMode()) );
38 
39  writer.writeEndElement();
40 
41  return true;
42 }
43 
44 }
45 
Marble::GeoDataCamera::latitude
qreal latitude(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
retrieves the latitude of the GeoDataCamera object use the unit parameter to switch between Radian an...
Definition: GeoDataCamera.cpp:80
KmlCameraTagWriter.h
Marble::GeoNode
A shared base class for all classes that are mapped to a specific tag (ie.
Definition: GeoDocument.h:60
Marble::KmlGroundOverlayWriter::altitudeModeToString
static QString altitudeModeToString(AltitudeMode mode)
Definition: KmlGroundOverlayWriter.cpp:53
Marble::kml::kmlTag_altitudeMode
const char * kmlTag_altitudeMode
Definition: KmlElementDictionary.cpp:41
Marble::kml::kmlTag_Camera
const char * kmlTag_Camera
Definition: KmlElementDictionary.cpp:46
Marble::GeoDataCamera
Definition: GeoDataCamera.h:22
KmlGroundOverlayWriter.h
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
GeoDataCamera.h
Marble::GeoDataCamera::tilt
qreal tilt() const
Definition: GeoDataCamera.cpp:123
KmlElementDictionary.h
Marble::GeoDataCamera::longitude
qreal longitude(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
retrieves the longitude of the GeoDataCamera object use the unit parameter to switch between Radian a...
Definition: GeoDataCamera.cpp:91
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::GeoDataCamera::altitudeMode
AltitudeMode altitudeMode() const
Definition: GeoDataCamera.cpp:134
Marble::GeoDataCamera::heading
qreal heading() const
Definition: GeoDataCamera.cpp:112
GeoDataTypes.h
Marble::KmlCameraTagWriter::write
virtual bool write(const GeoNode *node, GeoWriter &writer) const
Definition: KmlCameraTagWriter.cpp:23
Marble::GeoDataCamera::roll
qreal roll() const
Definition: GeoDataCamera.cpp:107
Marble::GeoDataCamera::altitude
qreal altitude() const
retrieves the altitude of the GeoDataCamera object
Definition: GeoDataCamera.cpp:69
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