Marble

DgmlHeadTagHandler.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 "DgmlHeadTagHandler.h"
8
9#include "MarbleDebug.h"
10
11#include "DgmlElementDictionary.h"
12#include "GeoParser.h"
13#include "GeoSceneDocument.h"
14#include "GeoSceneHead.h"
15
16namespace Marble
17{
18namespace dgml
19{
20DGML_DEFINE_TAG_HANDLER(Head)
21
22GeoNode *DgmlHeadTagHandler::parse(GeoParser &parser) const
23{
24 Q_ASSERT(parser.isStartElement() && parser.isValidElement(QLatin1StringView(dgmlTag_Head)));
25
26 // Checking for parent item
27 GeoStackItem parentItem = parser.parentElement();
28 if (parentItem.represents(dgmlTag_Document))
29 return parentItem.nodeAs<GeoSceneDocument>()->head();
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 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.