7#include "KmlHrefTagHandler.h"
9#include "GeoDataGroundOverlay.h"
10#include "GeoDataIconStyle.h"
11#include "GeoDataItemIcon.h"
12#include "GeoDataLink.h"
13#include "GeoDataPhotoOverlay.h"
14#include "GeoDataScreenOverlay.h"
15#include "GeoDataSoundCue.h"
17#include "KmlElementDictionary.h"
23KML_DEFINE_TAG_HANDLER(href)
25GeoNode *KmlhrefTagHandler::parse(GeoParser &parser)
const
27 Q_ASSERT(parser.isStartElement() && parser.isValidElement(
QLatin1StringView(kmlTag_href)));
29 GeoStackItem parentItem = parser.parentElement();
33 if (parentItem.represents(kmlTag_Icon)) {
35 if (parentItem.is<GeoDataIconStyle>()) {
36 parentItem.nodeAs<GeoDataIconStyle>()->setIconPath(content);
37 }
else if (parentItem.is<GeoDataGroundOverlay>()) {
38 parentItem.nodeAs<GeoDataGroundOverlay>()->setIconFile(content);
39 }
else if (parentItem.is<GeoDataPhotoOverlay>()) {
40 parentItem.nodeAs<GeoDataPhotoOverlay>()->setIconFile(content);
41 }
else if (parentItem.is<GeoDataScreenOverlay>()) {
42 parentItem.nodeAs<GeoDataScreenOverlay>()->setIconFile(content);
44 }
else if (parentItem.represents(kmlTag_ItemIcon)) {
45 parentItem.nodeAs<GeoDataItemIcon>()->setIconPath(content);
46 }
else if (parentItem.is<GeoDataLink>()) {
47 parentItem.nodeAs<GeoDataLink>()->setHref(content);
48 }
else if (parentItem.is<GeoDataSoundCue>()) {
49 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 Sat Dec 21 2024 17:04:14 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.