Marble

DgmlSettingsTagHandler.cpp
1/*
2 SPDX-FileCopyrightText: 2007 Nikolas Zimmermann <zimmermann@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#include "DgmlSettingsTagHandler.h"
8
9#include "MarbleDebug.h"
10
11#include "DgmlElementDictionary.h"
12#include "GeoParser.h"
13#include "GeoSceneDocument.h"
14#include "GeoSceneSettings.h"
15
16namespace Marble
17{
18namespace dgml
19{
20DGML_DEFINE_TAG_HANDLER(Settings)
21
22GeoNode *DgmlSettingsTagHandler::parse(GeoParser &parser) const
23{
24 Q_ASSERT(parser.isStartElement() && parser.isValidElement(QLatin1StringView(dgmlTag_Settings)));
25
26 // Checking for parent item
27 GeoStackItem parentItem = parser.parentElement();
28 if (parentItem.represents(dgmlTag_Document))
29 return parentItem.nodeAs<GeoSceneDocument>()->settings();
30
31 return nullptr;
32}
33
34}
35}
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:14 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.