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

marble

  • sources
  • kde-4.14
  • kdeedu
  • marble
  • src
  • lib
  • marble
  • geodata
  • writers
  • kml
KmlLodTagWriter.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 2012 Mayank Madan <maddiemadan@gmail.com>
9 //
10 
11 #include "KmlLodTagWriter.h"
12 
13 #include "GeoDataLod.h"
14 #include "GeoDataTypes.h"
15 #include "GeoWriter.h"
16 #include "GeoTagWriter.h"
17 #include "KmlElementDictionary.h"
18 #include "KmlObjectTagWriter.h"
19 
20 namespace Marble
21 {
22 
23 static GeoTagWriterRegistrar s_writerLod(
24  GeoTagWriter::QualifiedName( GeoDataTypes::GeoDataLodType,
25  kml::kmlTag_nameSpaceOgc22 ),
26  new KmlLodTagWriter);
27 
28 bool KmlLodTagWriter::write( const GeoNode *node,
29  GeoWriter& writer ) const
30 {
31  const GeoDataLod *lod = static_cast<const GeoDataLod*>( node );
32  writer.writeStartElement(kml::kmlTag_Lod);
33  KmlObjectTagWriter::writeIdentifiers( writer, lod );
34  writer.writeTextElement( kml::kmlTag_minLodPixels, QString::number(lod->minLodPixels()) );
35  writer.writeTextElement( kml::kmlTag_maxLodPixels, QString::number(lod->maxLodPixels()) );
36  writer.writeTextElement( kml::kmlTag_minFadeExtent, QString::number(lod->minFadeExtent()) );
37  writer.writeTextElement( kml::kmlTag_maxFadeExtent, QString::number(lod->maxFadeExtent()) );
38  writer.writeEndElement();
39  return true;
40 }
41 
42 }
KmlObjectTagWriter.h
GeoTagWriter.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_Lod
const char * kmlTag_Lod
Definition: KmlElementDictionary.cpp:109
Marble::kml::kmlTag_minFadeExtent
const char * kmlTag_minFadeExtent
Definition: KmlElementDictionary.cpp:121
Marble::kml::kmlTag_maxFadeExtent
const char * kmlTag_maxFadeExtent
Definition: KmlElementDictionary.cpp:113
Marble::KmlObjectTagWriter::writeIdentifiers
static void writeIdentifiers(GeoWriter &writer, const GeoDataObject *object)
Parses the id and targetId attributes and assign their values to the given object.
Definition: KmlObjectTagWriter.cpp:15
GeoWriter.h
Marble::s_writerLod
static GeoTagWriterRegistrar s_writerLod(GeoTagWriter::QualifiedName(GeoDataTypes::GeoDataLodType, kml::kmlTag_nameSpaceOgc22), new KmlLodTagWriter)
QString::number
QString number(int n, int base)
Marble::KmlLodTagWriter::write
virtual bool write(const GeoNode *node, GeoWriter &writer) const
Definition: KmlLodTagWriter.cpp:28
KmlElementDictionary.h
Marble::kml::kmlTag_maxLodPixels
const char * kmlTag_maxLodPixels
Definition: KmlElementDictionary.cpp:115
Marble::GeoWriter
Standard Marble way of writing XML This class is intended to be a standardised way of writing XML for...
Definition: GeoWriter.h:29
KmlLodTagWriter.h
GeoDataLod.h
Marble::GeoDataLod
The level of detail which indicates visibility and importance.
Definition: GeoDataLod.h:44
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::kml::kmlTag_nameSpaceOgc22
const char * kmlTag_nameSpaceOgc22
Definition: KmlElementDictionary.cpp:34
Marble::GeoDataLod::maxFadeExtent
qreal maxFadeExtent() const
Returns how "quickly" the region fades when the region is near. Returns the distance (counted from ma...
Definition: GeoDataLod.cpp:92
Marble::GeoDataLod::minLodPixels
qreal minLodPixels() const
Returns the minimum size that is needed for the region to be active Returns the minimum number of pix...
Definition: GeoDataLod.cpp:56
Marble::kml::kmlTag_minLodPixels
const char * kmlTag_minLodPixels
Definition: KmlElementDictionary.cpp:122
Marble::GeoDataTypes::GeoDataLodType
const char * GeoDataLodType
Definition: GeoDataTypes.cpp:57
QXmlStreamWriter::writeTextElement
void writeTextElement(const QString &qualifiedName, const QString &text)
GeoDataTypes.h
Marble::GeoDataLod::minFadeExtent
qreal minFadeExtent() const
Returns how "quickly" the region fades when the region is far away. Returns the distance (counted fro...
Definition: GeoDataLod.cpp:80
Marble::GeoDataLod::maxLodPixels
qreal maxLodPixels() const
Returns the maximum size that is needed for the region to be active Returns the maximum number of pix...
Definition: GeoDataLod.cpp:68
QXmlStreamWriter::writeEndElement
void writeEndElement()
QXmlStreamWriter::writeStartElement
void writeStartElement(const QString &qualifiedName)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:40 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
  • 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