Marble

KmlAnimatedUpdateTagHandler.cpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2014 Sanjiban Bairagya <sanjiban22393@gmail.com>
4
5#include "KmlAnimatedUpdateTagHandler.h"
6#include "GeoDataAnimatedUpdate.h"
7#include "GeoDataPlaylist.h"
8#include "GeoParser.h"
9#include "KmlElementDictionary.h"
10#include "KmlObjectTagHandler.h"
11
12namespace Marble
13{
14namespace kml
15{
16namespace gx
17{
18KML_DEFINE_TAG_HANDLER_GX22(AnimatedUpdate)
19
20GeoNode *KmlAnimatedUpdateTagHandler::parse(GeoParser &parser) const
21{
22 Q_ASSERT(parser.isStartElement() && parser.isValidElement(QLatin1StringView(kmlTag_AnimatedUpdate)));
23
24 GeoStackItem parentItem = parser.parentElement();
25
26 auto animatedUpdate = new GeoDataAnimatedUpdate;
27 KmlObjectTagHandler::parseIdentifiers(parser, animatedUpdate);
28
29 if (parentItem.is<GeoDataPlaylist>()) {
30 parentItem.nodeAs<GeoDataPlaylist>()->addPrimitive(animatedUpdate);
31 return animatedUpdate;
32 } else {
33 delete animatedUpdate;
34 }
35
36 return nullptr;
37}
38}
39}
40}
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 Mon Nov 4 2024 16:37:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.