Marble::GeoDataDocumentWriter

Marble::GeoDataDocumentWriter Class Reference

#include <GeoDataDocumentWriter.h>

Static Public Member Functions

static void registerWriter (GeoWriterBackend *writer, const QString &fileExtension)
 
static void unregisterWriter (GeoWriterBackend *writer, const QString &fileExtension)
 
static bool write (QIODevice *device, const GeoDataDocument &document, const QString &documentIdentifier)
 
static bool write (const QString &filename, const GeoDataDocument &document, const QString &documentIdentifier=QString())
 

Detailed Description

Write GeoDataDocument content to I/O devices (e.g.

a file)

Definition at line 28 of file GeoDataDocumentWriter.h.

Member Function Documentation

void Marble::GeoDataDocumentWriter::registerWriter ( GeoWriterBackend *  writer,
const QString fileExtension 
)
static

Registers a plugin as a backend for writing a certain file extension.

Usually called by the MARBLE_ADD_WRITER macro.

Parameters
writerBackend to register
fileExtensionFile extension to associate the backend with

Definition at line 58 of file GeoDataDocumentWriter.cpp.

bool Marble::GeoDataDocumentWriter::write ( QIODevice device,
const GeoDataDocument document,
const QString documentIdentifier 
)
static

Write the content of the given GeoDataDocument to the given I/O device.

Parameters
deviceAn I/O device open for writing
documentA GeoDataDocument with content to write
documentIdentifierXML document identifier or file extension that determines
Returns
True if writing is successful, false otherwise

Definition at line 26 of file GeoDataDocumentWriter.cpp.

bool Marble::GeoDataDocumentWriter::write ( const QString filename,
const GeoDataDocument document,
const QString documentIdentifier = QString() 
)
static

Convenience method that uses a QFile as QIODevice and determines the document type from the filename extension.

Parameters
filenameTarget file's name
documentDocument to write
documentIdentifierXML document identifier or filename extension that determines the content type. Use an empty string (default) to determine it automatically
Returns
True if writing is successful, false otherwise

Definition at line 46 of file GeoDataDocumentWriter.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jul 6 2020 23:19:02 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.