Marble

KmlRangeTagHandler.cpp
1#include "KmlRangeTagHandler.h"
2
3#include "MarbleDebug.h"
4
5#include "KmlElementDictionary.h"
6
7#include "MarbleGlobal.h"
8#include "GeoDataLookAt.h"
9#include "GeoParser.h"
10#include "GeoDataCoordinates.h"
11
12
13namespace Marble
14{
15namespace kml
16{
17KML_DEFINE_TAG_HANDLER (range)
18 GeoNode *KmlrangeTagHandler::parse (GeoParser & parser) const
19 {
20 Q_ASSERT (parser.isStartElement ()
21 && parser.isValidElement (kmlTag_range));
22
23 GeoStackItem parentItem = parser.parentElement ();
24
25 if ( parentItem.is<GeoDataLookAt>() ){
26
27 QString rangeTemp = parser.readElementText().trimmed();
28 qreal range = rangeTemp.toDouble();
29
30 parentItem.nodeAs<GeoDataLookAt>()->setRange( range );
31 }
32
33 return nullptr;
34 }
35}
36}
37
Binds a QML item to a specific geodetic location in screen coordinates.
double toDouble(bool *ok) const const
QString trimmed() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:18:17 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.