• 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
KmlTimeStampTagWriter.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 Javier Becerra <javier@auva.es>
9 //
10 
11 #include "KmlTimeStampTagWriter.h"
12 
13 #include "GeoDataTimeStamp.h"
14 #include "GeoDataTypes.h"
15 #include "GeoWriter.h"
16 #include "KmlElementDictionary.h"
17 
18 #include <QDateTime>
19 
20 namespace Marble
21 {
22 
23 static GeoTagWriterRegistrar s_writerTimeStamp( GeoTagWriter::QualifiedName(GeoDataTypes::GeoDataTimeStampType,
24  kml::kmlTag_nameSpace22),
25  new KmlTimeStampTagWriter() );
26 
27 
28 bool KmlTimeStampTagWriter::write( const GeoNode *node,
29  GeoWriter& writer ) const
30 {
31  const GeoDataTimeStamp *timestamp = static_cast<const GeoDataTimeStamp*>(node);
32 
33  if( timestamp->when().isValid() )
34  {
35  writer.writeStartElement( kml::kmlTag_TimeStamp );
36 
37  writer.writeStartElement( kml::kmlTag_when);
38 
39  QString timestampString;
40 
41  timestampString = timestamp->when().toString(Qt::ISODate);
42  writer.writeCharacters( timestampString );
43 
44  writer.writeEndElement();
45  writer.writeEndElement();
46  }
47  return true;
48 }
49 
50 }
Marble::GeoDataTimeStamp
Definition: GeoDataTimeStamp.h:27
Marble::GeoDataTypes::GeoDataTimeStampType
const char * GeoDataTimeStampType
Definition: GeoDataTypes.cpp:75
Marble::GeoNode
A shared base class for all classes that are mapped to a specific tag (ie.
Definition: GeoDocument.h:60
GeoDataTimeStamp.h
Marble::kml::kmlTag_TimeStamp
const char * kmlTag_TimeStamp
Definition: KmlElementDictionary.cpp:187
Marble::kml::kmlTag_nameSpace22
const char * kmlTag_nameSpace22
Definition: KmlElementDictionary.cpp:33
GeoWriter.h
Marble::kml::kmlTag_when
const char * kmlTag_when
Definition: KmlElementDictionary.cpp:200
KmlElementDictionary.h
Marble::GeoDataTimeStamp::when
QDateTime when() const
return the when time of timestamp
Definition: GeoDataTimeStamp.cpp:53
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::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::s_writerTimeStamp
static GeoTagWriterRegistrar s_writerTimeStamp(GeoTagWriter::QualifiedName(GeoDataTypes::GeoDataTimeStampType, kml::kmlTag_nameSpace22), new KmlTimeStampTagWriter())
GeoDataTypes.h
Marble::KmlTimeStampTagWriter::write
virtual bool write(const GeoNode *node, GeoWriter &writer) const
Definition: KmlTimeStampTagWriter.cpp:28
KmlTimeStampTagWriter.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