7#include "KmlLatitudeTagHandler.h"
9#include "MarbleDebug.h"
11#include "KmlElementDictionary.h"
12#include "MarbleGlobal.h"
14#include "GeoDataCamera.h"
15#include "GeoDataCoordinates.h"
16#include "GeoDataLocation.h"
17#include "GeoDataLookAt.h"
24KML_DEFINE_TAG_HANDLER(latitude)
25GeoNode *KmllatitudeTagHandler::parse(GeoParser &parser)
const
27 Q_ASSERT(parser.isStartElement() && parser.isValidElement(
QLatin1StringView(kmlTag_latitude)));
29 GeoStackItem parentItem = parser.parentElement();
31 if (parentItem.is<GeoDataLookAt>()) {
32 qreal latitude = parser.readElementText().trimmed().toDouble();
33 parentItem.nodeAs<GeoDataLookAt>()->setLatitude(latitude, GeoDataCoordinates::Degree);
34 }
else if (parentItem.is<GeoDataCamera>()) {
35 qreal latitude = parser.readElementText().trimmed().toDouble();
36 parentItem.nodeAs<GeoDataCamera>()->setLatitude(latitude, GeoDataCoordinates::Degree);
37 }
else if (parentItem.is<GeoDataLocation>()) {
38 qreal latitude = parser.readElementText().trimmed().toDouble();
39 parentItem.nodeAs<GeoDataLocation>()->setLatitude(latitude, 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 Fri Nov 8 2024 12:02:43 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.