6#include "KmlStateTagHandler.h"
8#include "MarbleDebug.h"
10#include "GeoDataItemIcon.h"
11#include "GeoDataParser.h"
12#include "KmlElementDictionary.h"
18KML_DEFINE_TAG_HANDLER(state)
20GeoNode *KmlstateTagHandler::parse(GeoParser &parser)
const
22 Q_ASSERT(parser.isStartElement() && parser.isValidElement(
QLatin1StringView(kmlTag_state)));
24 GeoStackItem parentItem = parser.parentElement();
26 GeoDataItemIcon::ItemIconStates itemIconState;
28 if (parentItem.represents(kmlTag_ItemIcon)) {
32 for (
const QString &value : iconStateTextList) {
34 itemIconState |= GeoDataItemIcon::Open;
36 itemIconState |= GeoDataItemIcon::Closed;
38 itemIconState |= GeoDataItemIcon::Error;
40 itemIconState |= GeoDataItemIcon::Fetching0;
42 itemIconState |= GeoDataItemIcon::Fetching1;
44 itemIconState |= GeoDataItemIcon::Fetching2;
46 mDebug() <<
"Cannot parse state value" << value;
50 parentItem.nodeAs<GeoDataItemIcon>()->setState(itemIconState);
Binds a QML item to a specific geodetic location in screen coordinates.
QStringList split(QChar sep, Qt::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
QString trimmed() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:14 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.