Marble
8 #include "DgmlSectionTagHandler.h"
10 #include "MarbleDebug.h"
12 #include "DgmlElementDictionary.h"
13 #include "DgmlAttributeDictionary.h"
14 #include "DgmlAuxillaryDictionary.h"
15 #include "GeoParser.h"
16 #include "GeoSceneLegend.h"
17 #include "GeoSceneSection.h"
23 DGML_DEFINE_TAG_HANDLER(Section)
25 GeoNode* DgmlSectionTagHandler::parse(GeoParser& parser)
const
28 Q_ASSERT(parser.isStartElement() && parser.isValidElement(
QLatin1String(dgmlTag_Section)));
33 QString radio = parser.attribute(dgmlAttr_radio);
34 int spacing = parser.attribute(dgmlAttr_spacing).
toInt();
36 GeoSceneSection* section =
nullptr;
39 GeoStackItem parentItem = parser.parentElement();
40 if (parentItem.represents(dgmlTag_Legend)) {
41 section =
new GeoSceneSection( name );
42 section->setCheckable( checkable == dgmlValue_true || checkable == dgmlValue_on );
43 section->setConnectTo( connectTo );
44 section->setSpacing( spacing );
45 section->setRadio( radio );
46 parentItem.nodeAs<GeoSceneLegend>()->addSection( section );
QString trimmed() const const
int toInt(bool *ok, int base) const const
Binds a QML item to a specific geodetic location in screen coordinates.
QString toLower() const const
QString name(StandardShortcut id)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Sep 25 2023 03:50:18 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.