Marble
6#include "KmlFlyToModeTagHandler.h"
7#include "GeoDataFlyTo.h"
9#include "KmlElementDictionary.h"
10#include "MarbleDebug.h"
16KML_DEFINE_TAG_HANDLER_GX22(flyToMode)
18GeoNode *KmlflyToModeTagHandler::parse(GeoParser &parser)
const
20 Q_ASSERT(parser.isStartElement() && parser.isValidElement(QLatin1StringView(kmlTag_flyToMode)));
22 QString content = parser.readElementText().trimmed();
24 GeoDataFlyTo::FlyToMode mode;
25 if (content == QLatin1StringView(
"smooth")) {
26 mode = GeoDataFlyTo::Smooth;
27 }
else if (content == QLatin1StringView(
"bounce")) {
28 mode = GeoDataFlyTo::Bounce;
30 mDebug() <<
"Unknown mode " << content <<
", using 'bounce' instead.";
31 mode = GeoDataFlyTo::Bounce;
34 GeoStackItem parentItem = parser.parentElement();
36 if (parentItem.is<GeoDataFlyTo>()) {
37 parentItem.nodeAs<GeoDataFlyTo>()->setFlyToMode(mode);
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:52:09 by
doxygen 1.13.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.