Marble
7 #include "DgmlItemTagHandler.h"
9 #include "MarbleDebug.h"
11 #include "DgmlElementDictionary.h"
12 #include "DgmlAttributeDictionary.h"
13 #include "DgmlAuxillaryDictionary.h"
14 #include "GeoParser.h"
15 #include "GeoSceneSection.h"
16 #include "GeoSceneItem.h"
22 DGML_DEFINE_TAG_HANDLER(
Item)
24 GeoNode* DgmlItemTagHandler::parse(GeoParser& parser)
const
27 Q_ASSERT(parser.isStartElement() && parser.isValidElement(
QLatin1String(dgmlTag_Item)));
29 QString name = parser.attribute(dgmlAttr_name).trimmed();
32 int spacing = parser.attribute(dgmlAttr_spacing).
toInt();
34 GeoSceneItem *item =
nullptr;
37 GeoStackItem parentItem = parser.parentElement();
38 if (parentItem.represents(dgmlTag_Section)) {
39 item =
new GeoSceneItem( name );
40 item->setCheckable( checkable == dgmlValue_true || checkable == dgmlValue_on );
41 item->setConnectTo( connectTo );
42 item->setSpacing( spacing );
43 parentItem.nodeAs<GeoSceneSection>()->addItem( item );
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
const char * name(StandardAction id)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 21 2023 04:12:25 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.