Marble
8 #include "DgmlMapTagHandler.h"
12 #include "DgmlElementDictionary.h"
13 #include "DgmlAttributeDictionary.h"
14 #include "GeoParser.h"
15 #include "GeoSceneDocument.h"
16 #include "GeoSceneMap.h"
22 DGML_DEFINE_TAG_HANDLER(Map)
24 GeoNode* DgmlMapTagHandler::parse(GeoParser& parser)
const
26 Q_ASSERT(parser.isStartElement() && parser.isValidElement(
QLatin1String(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(Sequence &sequence, MapFunctor function)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Oct 2 2023 03:52:07 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.