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"
24KML_DEFINE_TAG_HANDLER( href )
26GeoNode* 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 );
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 Fri Jul 26 2024 11:57:57 by
doxygen 1.11.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.