Marble::GeoDataDocumentWriter

Search for usage in LXR

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 (const QString &filename, const GeoDataDocument &document, const QString &documentIdentifier=QString())
 
static bool write (QIODevice *device, const GeoDataDocument &document, const QString &documentIdentifier)
 

Detailed Description

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

a file)

Definition at line 23 of file GeoDataDocumentWriter.h.

Member Function Documentation

◆ registerWriter()

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 54 of file GeoDataDocumentWriter.cpp.

◆ unregisterWriter()

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

Definition at line 59 of file GeoDataDocumentWriter.cpp.

◆ write() [1/2]

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 42 of file GeoDataDocumentWriter.cpp.

◆ write() [2/2]

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 22 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-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:15:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.