Marble

KmlFlyToTagHandler.cpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2013 Mayank Madan <maddiemadan@gmail.com>
4
5#include "KmlFlyToTagHandler.h"
6#include "KmlObjectTagHandler.h"
7#include "GeoDataFlyTo.h"
8#include "GeoDataPlaylist.h"
9#include "GeoParser.h"
10#include "MarbleDebug.h"
11#include "KmlElementDictionary.h"
12
13namespace Marble
14{
15namespace kml
16{
17
18KML_DEFINE_TAG_HANDLER_GX22( FlyTo )
19
20GeoNode* KmlFlyToTagHandler::parse( GeoParser& parser ) const
21{
22 Q_ASSERT(parser.isStartElement() && parser.isValidElement(QLatin1String(kmlTag_FlyTo)));
23
24 GeoStackItem parentItem = parser.parentElement();
25
26 if (parentItem.is<GeoDataPlaylist>()) {
27 GeoDataFlyTo *flyTo = new GeoDataFlyTo;
28 KmlObjectTagHandler::parseIdentifiers( parser, flyTo );
29 parentItem.nodeAs<GeoDataPlaylist>()->addPrimitive( flyTo );
30 return flyTo;
31 }
32
33 return nullptr;
34}
35
36}
37}
38
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 Jun 14 2024 11:54:16 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.