Marble
7 #include "KmlHotSpotTagHandler.h"
9 #include "MarbleDebug.h"
11 #include "KmlElementDictionary.h"
12 #include "GeoDataIconStyle.h"
13 #include "GeoDataHotSpot.h"
14 #include "GeoParser.h"
20 KML_DEFINE_TAG_HANDLER( hotSpot )
22 GeoNode* 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 );
QString trimmed() const const
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Oct 4 2023 04:09:42 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.