Marble
7 #include "KmlHrefTagHandler.h"
9 #include "MarbleDebug.h"
10 #include "KmlElementDictionary.h"
11 #include "GeoDataIconStyle.h"
12 #include "GeoDataGroundOverlay.h"
13 #include "GeoDataLink.h"
14 #include "GeoDataPhotoOverlay.h"
15 #include "GeoDataScreenOverlay.h"
16 #include "GeoDataSoundCue.h"
17 #include "GeoDataItemIcon.h"
18 #include "GeoParser.h"
24 KML_DEFINE_TAG_HANDLER( href )
26 GeoNode* KmlhrefTagHandler::parse( GeoParser& parser )
const
28 Q_ASSERT(parser.isStartElement() && parser.isValidElement(
QLatin1String(kmlTag_href)));
30 GeoStackItem parentItem = parser.parentElement();
34 if ( parentItem.represents( kmlTag_Icon ) ) {
36 if ( parentItem.is<GeoDataIconStyle>() ) {
37 parentItem.nodeAs<GeoDataIconStyle>()->setIconPath( content );
38 }
else if ( parentItem.is<GeoDataGroundOverlay>() ) {
39 parentItem.nodeAs<GeoDataGroundOverlay>()->setIconFile( content );
40 }
else if ( parentItem.is<GeoDataPhotoOverlay>() ) {
41 parentItem.nodeAs<GeoDataPhotoOverlay>()->setIconFile( content );
42 }
else if ( parentItem.is<GeoDataScreenOverlay>() ) {
43 parentItem.nodeAs<GeoDataScreenOverlay>()->setIconFile( content );
45 }
else if ( parentItem.represents( kmlTag_ItemIcon ) ) {
46 parentItem.nodeAs<GeoDataItemIcon>()->setIconPath( content );
47 }
else if ( parentItem.is<GeoDataLink>() ) {
48 parentItem.nodeAs<GeoDataLink>()->setHref( content );
49 }
else if ( parentItem.is<GeoDataSoundCue>() ) {
50 parentItem.nodeAs<GeoDataSoundCue>()->setHref( content );
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 Mon Oct 2 2023 03:52:08 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.