• 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
KmlFlyToTagWriter.cpp
Go to the documentation of this file.
1 
2 //
3 // This file is part of the Marble Virtual Globe.
4 //
5 // This program is free software licensed under the GNU LGPL. You can
6 // find a copy of this license in LICENSE.txt in the top directory of
7 // the source code.
8 //
9 // Copyright 2013 Mayank Madan <maddiemadan@gmail.com>
10 //
11 
12 #include "KmlFlyToTagWriter.h"
13 
14 #include "GeoDataFlyTo.h"
15 #include "GeoDataTypes.h"
16 #include "GeoWriter.h"
17 #include "KmlElementDictionary.h"
18 
19 namespace Marble
20 {
21 
22 bool KmlFlyToTagWriter::write( const GeoNode *node, GeoWriter& writer ) const
23 {
24  const GeoDataFlyTo *flyTo = static_cast<const GeoDataFlyTo*>( node );
25  writer.writeStartElement( kml::kmlTag_nameSpaceGx22, kml::kmlTag_FlyTo );
26  writer.writeElement( kml::kmlTag_nameSpaceGx22, kml::kmlTag_duration, QString::number( flyTo->duration()) );
27  QString const flyToModeString = flyTo->flyToMode() == GeoDataFlyTo::Smooth ? "smooth" : "bounce";
28  writer.writeElement( kml::kmlTag_nameSpaceGx22, kml::kmlTag_flyToMode, flyToModeString );
29  writeElement( flyTo->view(), writer );
30  writer.writeEndElement();
31  return true;
32 }
33 
34 }
Marble::kml::kmlTag_nameSpaceGx22
const char * kmlTag_nameSpaceGx22
Definition: KmlElementDictionary.cpp:35
KmlFlyToTagWriter.h
Marble::GeoNode
A shared base class for all classes that are mapped to a specific tag (ie.
Definition: GeoDocument.h:60
Marble::kml::kmlTag_flyToMode
const char * kmlTag_flyToMode
Definition: KmlElementDictionary.cpp:71
Marble::kml::kmlTag_FlyTo
const char * kmlTag_FlyTo
Definition: KmlElementDictionary.cpp:206
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
KmlElementDictionary.h
Marble::GeoDataFlyTo
Definition: GeoDataFlyTo.h:22
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::GeoDataFlyTo::Smooth
Definition: GeoDataFlyTo.h:27
Marble::GeoDataFlyTo::flyToMode
FlyToMode flyToMode() const
Definition: GeoDataFlyTo.cpp:88
Marble::GeoTagWriter::writeElement
bool writeElement(const GeoNode *object, GeoWriter &writer) const
Definition: GeoTagWriter.cpp:29
Marble::kml::kmlTag_duration
const char * kmlTag_duration
Definition: KmlElementDictionary.cpp:63
Marble::GeoDataFlyTo::duration
double duration() const
Definition: GeoDataFlyTo.cpp:78
GeoDataFlyTo.h
GeoDataTypes.h
Marble::KmlFlyToTagWriter::write
virtual bool write(const GeoNode *node, GeoWriter &writer) const
Definition: KmlFlyToTagWriter.cpp:22
Marble::GeoDataFlyTo::view
const GeoDataAbstractView * view() const
Definition: GeoDataFlyTo.cpp:63
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