6#ifndef MARBLE_GEOPARSER_H
7#define MARBLE_GEOPARSER_H
11#include <QXmlStreamReader>
13#include "geodata_export.h"
18using GeoDataGenericSourceType = int;
29 explicit GeoParser(GeoDataGenericSourceType sourceType);
45 GeoDocument *releaseDocument();
46 GeoDocument *activeDocument()
52 virtual bool isValidElement(
const QString &tagName)
const;
55 GeoStackItem parentElement(
unsigned int depth = 0)
const;
58 void raiseWarning(
const QString &);
61 QString attribute(
const char *attributeName)
const;
71 virtual bool isValidRootElement() = 0;
73 virtual GeoDocument *createDocument()
const = 0;
76 GeoDocument *m_document;
77 GeoDataGenericSourceType m_source;
93 GeoStackItem(
const GeoParser::QualifiedName &qualifiedName, GeoNode *node)
94 : m_qualifiedName(qualifiedName)
100 bool represents(
const char *tagName)
const
109 Q_ASSERT(
dynamic_cast<T *
>(m_node) !=
nullptr);
110 return static_cast<T *
>(m_node);
116 return nullptr !=
dynamic_cast<T *
>(m_node);
119 GeoParser::QualifiedName qualifiedName()
const
121 return m_qualifiedName;
123 GeoNode *associatedNode()
const
129 friend class GeoParser;
130 void assignNode(GeoNode *node)
134 GeoParser::QualifiedName m_qualifiedName;
135 GeoNode *m_node =
nullptr;
QVariant read(const QByteArray &data, int versionOverride=0)
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:15:45 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.