7#include "KmlLongitudeTagHandler.h"
9#include "MarbleDebug.h"
11#include "KmlElementDictionary.h"
13#include "GeoDataCamera.h"
14#include "GeoDataCoordinates.h"
15#include "GeoDataLocation.h"
16#include "GeoDataLookAt.h"
18#include "MarbleGlobal.h"
24KML_DEFINE_TAG_HANDLER(longitude)
26GeoNode *KmllongitudeTagHandler::parse(GeoParser &parser)
const
28 Q_ASSERT(parser.isStartElement() && parser.isValidElement(
QLatin1StringView(kmlTag_longitude)));
30 GeoStackItem parentItem = parser.parentElement();
31 if (parentItem.is<GeoDataLookAt>()) {
32 qreal longitude = parser.readElementText().trimmed().toDouble();
33 parentItem.nodeAs<GeoDataLookAt>()->setLongitude(longitude, GeoDataCoordinates::Degree);
34 }
else if (parentItem.is<GeoDataCamera>()) {
35 qreal longitude = parser.readElementText().trimmed().toDouble();
36 parentItem.nodeAs<GeoDataCamera>()->setLongitude(longitude, GeoDataCoordinates::Degree);
37 }
else if (parentItem.is<GeoDataLocation>()) {
38 qreal longitude = parser.readElementText().trimmed().toDouble();
39 parentItem.nodeAs<GeoDataLocation>()->setLongitude(longitude, GeoDataCoordinates::Degree);
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.