• 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
KmlObjectTagWriter.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 2014 Dennis Nienhüser <earthwings@gentoo.org>
9 //
10 
11 #include "KmlObjectTagWriter.h"
12 
13 namespace Marble {
14 
15 void KmlObjectTagWriter::writeIdentifiers( GeoWriter &writer, const GeoDataObject *object )
16 {
17  if ( object && !object->id().isEmpty() ) {
18  writer.writeAttribute( "id", object->id().toUtf8() );
19  }
20  if ( object && !object->targetId().isEmpty() ) {
21  writer.writeAttribute( "targetId", object->targetId().toUtf8() );
22  }
23 }
24 
25 }
KmlObjectTagWriter.h
Marble::GeoDataObject
A base class for all geodata objects.
Definition: GeoDataObject.h:48
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
QString::isEmpty
bool isEmpty() const
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
Marble::GeoDataObject::targetId
QString targetId() const
Get the targetId of the object to be replaced.
Definition: GeoDataObject.cpp:85
QXmlStreamWriter::writeAttribute
void writeAttribute(const QString &qualifiedName, const QString &value)
Marble::GeoDataObject::id
QString id() const
Get the id of the object.
Definition: GeoDataObject.cpp:75
QString::toUtf8
QByteArray toUtf8() const
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