Marble
8#include "DgmlLayerTagHandler.h"
10#include "MarbleDebug.h"
12#include "DgmlAttributeDictionary.h"
13#include "DgmlAuxillaryDictionary.h"
14#include "DgmlElementDictionary.h"
16#include "GeoSceneLayer.h"
17#include "GeoSceneMap.h"
23DGML_DEFINE_TAG_HANDLER(Layer)
25GeoNode *DgmlLayerTagHandler::parse(GeoParser &parser)
const
28 Q_ASSERT(parser.isStartElement() && parser.isValidElement(QLatin1StringView(dgmlTag_Layer)));
30 QString
name = parser.attribute(dgmlAttr_name).
trimmed();
31 QString backend = parser.attribute(dgmlAttr_backend).
toLower().
trimmed();
32 QString role = parser.attribute(dgmlAttr_role).
toLower().
trimmed();
34 GeoSceneLayer *layer =
nullptr;
37 GeoStackItem parentItem = parser.parentElement();
38 if (parentItem.represents(dgmlTag_Map)) {
39 layer =
new GeoSceneLayer(name);
40 layer->setBackend(backend);
42 parentItem.nodeAs<GeoSceneMap>()->addLayer(layer);
QString name(StandardAction id)
Binds a QML item to a specific geodetic location in screen coordinates.
QString toLower() const const
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.