Marble
7#include "KmlHotSpotTagHandler.h"
9#include "MarbleDebug.h"
11#include "KmlElementDictionary.h"
12#include "GeoDataIconStyle.h"
13#include "GeoDataHotSpot.h"
20KML_DEFINE_TAG_HANDLER( hotSpot )
22GeoNode* KmlhotSpotTagHandler::parse( GeoParser& parser )
const
24 Q_ASSERT(parser.isStartElement() && parser.isValidElement(
QLatin1String(kmlTag_hotSpot)));
26 GeoStackItem parentItem = parser.parentElement();
28 if ( parentItem.represents( kmlTag_IconStyle ) ) {
29 QPointF pf( parser.attribute(
"x" ).trimmed().toFloat(),
30 parser.attribute(
"y" ).trimmed().toFloat() );
34 GeoDataHotSpot::Units xunits;
35 GeoDataHotSpot::Units yunits;
38 xunits = GeoDataHotSpot::Pixels;
40 xunits = GeoDataHotSpot::InsetPixels;
42 xunits = GeoDataHotSpot::Fraction;
46 yunits = GeoDataHotSpot::Pixels;
48 yunits = GeoDataHotSpot::InsetPixels;
50 yunits = GeoDataHotSpot::Fraction;
53 parentItem.nodeAs<GeoDataIconStyle>()->setHotSpot( pf, xunits, yunits );
Binds a QML item to a specific geodetic location in screen coordinates.
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.