8#include "DgmlMapTagHandler.h"
12#include "DgmlAttributeDictionary.h"
13#include "DgmlElementDictionary.h"
15#include "GeoSceneDocument.h"
16#include "GeoSceneMap.h"
22DGML_DEFINE_TAG_HANDLER(Map)
24GeoNode *DgmlMapTagHandler::parse(GeoParser &parser)
const
26 Q_ASSERT(parser.isStartElement() && parser.isValidElement(
QLatin1StringView(dgmlTag_Map)));
28 QColor labelColor = parser.attribute(dgmlAttr_labelColor).trimmed();
33 QColor highlightBrushColor =
QColor(parser.attribute(dgmlAttr_highlightBrush).trimmed());
34 QColor highlightPenColor =
QColor(parser.attribute(dgmlAttr_highlightPen).trimmed());
36 GeoSceneMap *
map =
nullptr;
39 GeoStackItem parentItem = parser.parentElement();
40 if (parentItem.represents(dgmlTag_Document)) {
41 map = parentItem.nodeAs<GeoSceneDocument>()->
map();
42 map->setBackgroundColor(
QColor(parser.attribute(dgmlAttr_bgcolor).trimmed()));
43 map->setLabelColor(labelColor);
44 map->setHighlightBrushColor(highlightBrushColor);
45 map->setHighlightPenColor(highlightPenColor);
Binds a QML item to a specific geodetic location in screen coordinates.
bool isValid() const const
QFuture< void > map(Iterator begin, Iterator end, MapFunctor &&function)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:52:13 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.