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

marble

  • Marble
  • GeoWriter
Public Member Functions | List of all members
Marble::GeoWriter Class Reference

#include <GeoWriter.h>

Inheritance diagram for Marble::GeoWriter:
Inheritance graph
[legend]

Public Member Functions

 GeoWriter ()
 
void setDocumentType (const QString &documentType)
 
bool write (QIODevice *device, const GeoNode *feature)
 
void writeElement (const QString &namespaceUri, const QString &key, const QString &value)
 
void writeElement (const QString &key, const QString &value)
 
void writeOptionalElement (const QString &key, const QString &value, const QString &defaultValue=QString())
 
template<class T >
void writeOptionalElement (const QString &key, const T &value, const T &defaultValue=T())
 
- Public Member Functions inherited from QXmlStreamWriter
 QXmlStreamWriter ()
 
 QXmlStreamWriter (QIODevice *device)
 
 QXmlStreamWriter (QString *string)
 
 QXmlStreamWriter (QByteArray *array)
 
 ~QXmlStreamWriter ()
 
bool autoFormatting () const
 
int autoFormattingIndent () const
 
QTextCodec * codec () const
 
QIODevice * device () const
 
bool hasError () const
 
void setAutoFormatting (bool enable)
 
void setAutoFormattingIndent (int spacesOrTabs)
 
void setCodec (QTextCodec *codec)
 
void setCodec (const char *codecName)
 
void setDevice (QIODevice *device)
 
void writeAttribute (const QString &namespaceUri, const QString &name, const QString &value)
 
void writeAttribute (const QXmlStreamAttribute &attribute)
 
void writeAttribute (const QString &qualifiedName, const QString &value)
 
void writeAttributes (const QXmlStreamAttributes &attributes)
 
void writeCDATA (const QString &text)
 
void writeCharacters (const QString &text)
 
void writeComment (const QString &text)
 
void writeCurrentToken (const QXmlStreamReader &reader)
 
void writeDefaultNamespace (const QString &namespaceUri)
 
void writeDTD (const QString &dtd)
 
void writeEmptyElement (const QString &namespaceUri, const QString &name)
 
void writeEmptyElement (const QString &qualifiedName)
 
void writeEndDocument ()
 
void writeEndElement ()
 
void writeEntityReference (const QString &name)
 
void writeNamespace (const QString &namespaceUri, const QString &prefix)
 
void writeProcessingInstruction (const QString &target, const QString &data)
 
void writeStartDocument ()
 
void writeStartDocument (const QString &version)
 
void writeStartDocument (const QString &version, bool standalone)
 
void writeStartElement (const QString &namespaceUri, const QString &name)
 
void writeStartElement (const QString &qualifiedName)
 
void writeTextElement (const QString &namespaceUri, const QString &name, const QString &text)
 
void writeTextElement (const QString &qualifiedName, const QString &text)
 

Additional Inherited Members

- Properties inherited from QXmlStreamWriter
 autoFormatting
 
 autoFormattingIndent
 

Detailed Description

Standard Marble way of writing XML This class is intended to be a standardised way of writing XML for marble.

It works with the GeoData classes and writes XML based on the type of output format that the writer is currently working with.

Definition at line 29 of file GeoWriter.h.

Constructor & Destructor Documentation

Marble::GeoWriter::GeoWriter ( )

Definition at line 22 of file GeoWriter.cpp.

Member Function Documentation

void Marble::GeoWriter::setDocumentType ( const QString &  documentType)

Set the current document type.

The current Document Type defines which set of handlers are to be used when writing the GeoDocument. This string should correspond with the string used to register the required Tag Writers in

See also
GeoTagWriter

Definition at line 79 of file GeoWriter.cpp.

bool Marble::GeoWriter::write ( QIODevice *  device,
const GeoNode *  feature 
)

The main API call to use the XML writer.

To use the XML writer you need to provide an IODevice to write the XML to and a QList of GeoDataFeatures which contains the data you wish to write. To define the type of XML document that is to be written you need to set the current Document Type for this GeoWriter. See

See also
setDocumentType()

Definition at line 28 of file GeoWriter.cpp.

void Marble::GeoWriter::writeElement ( const QString &  namespaceUri,
const QString &  key,
const QString &  value 
)

Convenience method to write <key>value</key> with key prefixed format namespaceUri.

Definition at line 84 of file GeoWriter.cpp.

void Marble::GeoWriter::writeElement ( const QString &  key,
const QString &  value 
)

Convenience method to write <key>value</key>

Definition at line 91 of file GeoWriter.cpp.

void Marble::GeoWriter::writeOptionalElement ( const QString &  key,
const QString &  value,
const QString &  defaultValue = QString() 
)

Convenience method to write <key>value</key> if value is not equal to defaultValue.

Otherwise, nothing is written.

Definition at line 98 of file GeoWriter.cpp.

template<class T >
void Marble::GeoWriter::writeOptionalElement ( const QString &  key,
const T &  value,
const T &  defaultValue = T() 
)
inline

Definition at line 71 of file GeoWriter.h.


The documentation for this class was generated from the following files:
  • GeoWriter.h
  • GeoWriter.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:45 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