Marble
7#include "KmlStyleUrlTagHandler.h"
11#include "GeoDataFeature.h"
12#include "GeoDataStyleMap.h"
13#include "KmlElementDictionary.h"
14#include "MarbleDebug.h"
22KML_DEFINE_TAG_HANDLER(styleUrl)
24GeoNode *KmlstyleUrlTagHandler::parse(GeoParser &parser)
const
26 Q_ASSERT(parser.isStartElement() && parser.isValidElement(QLatin1StringView(kmlTag_styleUrl)));
28 GeoStackItem parentItem = parser.parentElement();
29 GeoStackItem grandParentItem = parser.parentElement();
31 if (parentItem.represents(kmlTag_Pair)) {
32 QString content = parser.readElementText().trimmed();
34 QString key = parentItem.nodeAs<GeoDataStyleMap>()->lastKey();
35 (*parentItem.nodeAs<GeoDataStyleMap>())[key] = content;
36 parentItem.nodeAs<GeoDataStyleMap>()->setLastKey(QString());
38 }
else if (parentItem.is<GeoDataFeature>()) {
39 QString content = parser.readElementText().
trimmed();
41 parentItem.nodeAs<GeoDataFeature>()->setStyleUrl(content);
Binds a QML item to a specific geodetic location in screen coordinates.
QString trimmed() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:52:09 by
doxygen 1.13.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.