7#include "KmlPointTagHandler.h"
9#include "MarbleDebug.h"
11#include "GeoDataMultiGeometry.h"
12#include "GeoDataPhotoOverlay.h"
13#include "GeoDataPlacemark.h"
14#include "GeoDataPoint.h"
16#include "KmlElementDictionary.h"
17#include "KmlObjectTagHandler.h"
23KML_DEFINE_TAG_HANDLER(Point)
25GeoNode *KmlPointTagHandler::parse(GeoParser &parser)
const
27 Q_ASSERT(parser.isStartElement() && parser.isValidElement(
QLatin1StringView(kmlTag_Point)));
30 GeoStackItem parentItem = parser.parentElement();
31 if (parentItem.represents(kmlTag_Placemark)) {
32 return parentItem.nodeAs<GeoDataPlacemark>();
34 }
else if (parentItem.represents(kmlTag_MultiGeometry)) {
35 auto point =
new GeoDataPoint;
36 KmlObjectTagHandler::parseIdentifiers(parser, point);
37 parentItem.nodeAs<GeoDataMultiGeometry>()->append(point);
39 }
else if (parentItem.represents(kmlTag_PhotoOverlay)) {
40 GeoDataPoint *point = &parentItem.nodeAs<GeoDataPhotoOverlay>()->point();
41 KmlObjectTagHandler::parseIdentifiers(parser, point);
Binds a QML item to a specific geodetic location in screen coordinates.
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.