![]() |
Mapper
0.9.0
API documentation
|
Map importer for the xml based map format. More...
#include <xml_file_format_p.h>
Public Member Functions | |
XMLFileImporter (const QString &path, Map *map, MapView *view) | |
XMLFileImporter ()=delete | |
XMLFileImporter (const XMLFileImporter &)=delete | |
XMLFileImporter (XMLFileImporter &&)=delete | |
~XMLFileImporter () override | |
XMLFileImporter & | operator= (const XMLFileImporter &)=delete |
XMLFileImporter & | operator= (XMLFileImporter &&)=delete |
![]() | |
Importer (const QString &path, Map *map, MapView *view) | |
Creates a new Importer with the given input path, map, and view. More... | |
~Importer () override | |
Destroys this Importer. More... | |
bool | loadSymbolsOnly () const noexcept |
Returns true if only symbols (and colors) are to be imported. More... | |
void | setLoadSymbolsOnly (bool value) |
If set to true, importers shall import only symbols (and colors). More... | |
bool | doImport () |
Imports the map and view. More... | |
![]() | |
ImportExport (QIODevice *device=nullptr) | |
Creates a new importer or exporter with the given IO device. More... | |
ImportExport (const ImportExport &)=delete | |
ImportExport (ImportExport &&)=delete | |
virtual | ~ImportExport () |
Destroys an importer or exporter. More... | |
virtual bool | supportsQIODevice () const noexcept |
Returns true when the importer/exporter supports QIODevice. More... | |
QIODevice * | device () const noexcept |
Returns the input device if it has been set or created. More... | |
void | setDevice (QIODevice *device) |
Sets a custom input device to be used for import. More... | |
void | setOption (const QString &name, const QVariant &value) |
Sets an option in this importer or exporter. More... | |
QVariant | option (const QString &name) const |
Retrieves the value of an option in this instance. More... | |
void | addWarning (const QString &str) |
Adds a string to the current list of warnings. More... | |
const std::vector< QString > & | warnings () const noexcept |
Returns the current list of warnings collected by this object. More... | |
Protected Member Functions | |
bool | importImplementation () override |
Actual implementation of the import. More... | |
void | importElements () |
void | handleBarrier (const std::function< void()> &reader) |
void | addWarningUnsupportedElement () |
void | importMapNotes () |
void | importGeoreferencing () |
void | importColors () |
void | importSymbols () |
void | importMapParts () |
void | importTemplates () |
void | importView () |
void | importPrint () |
void | importUndo () |
void | importRedo () |
![]() | |
virtual void | prepare () |
Event handler called from doImport() to prepare the import process. More... | |
virtual void | validate () |
Event handler called from doImport() to complete to postprocess imported data. More... | |
virtual void | importFailed () |
Event handler called from doImport() to complete to cleanup a failed import attempt. More... | |
Additional Inherited Members | |
![]() | |
const QString | path |
The input path. More... | |
Map *const | map |
The Map to import or export. More... | |
MapView *const | view |
The MapView to import or export. More... | |
Map importer for the xml based map format.
OpenOrienteering::XMLFileImporter::XMLFileImporter | ( | const QString & | path, |
Map * | map, | ||
MapView * | view | ||
) |
|
delete |
|
delete |
|
delete |
|
overridedefault |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
overrideprotectedvirtual |
Actual implementation of the import.
This function shall read the input and populate the map and view from it. Importers which support input from QIODevice should use the device(). They must not open or close this device.
If information might be lost in the process, a message shall be recorded by calling addWarning() with a translated, useful description of the issue. If a fatal error is encountered, then this method may either throw an exception, or log an error message with addWarning() and return false. The line between errors and warnings is somewhat of a judgement call on the part of the author, but generally an Importer should not succeed unless the map is populated sufficiently to be useful.
Implements OpenOrienteering::Importer.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
delete |
|
delete |