6#include "KmlTrackTagHandler.h"
7#include "GeoDataMultiGeometry.h"
8#include "GeoDataMultiTrack.h"
9#include "GeoDataPlacemark.h"
10#include "GeoDataTrack.h"
11#include "KmlElementDictionary.h"
12#include "KmlObjectTagHandler.h"
13#include "MarbleDebug.h"
20KML_DEFINE_TAG_HANDLER_GX22(Track)
22GeoNode *KmlTrackTagHandler::parse(GeoParser &parser)
const
24 Q_ASSERT(parser.isStartElement() && parser.isValidElement(
QLatin1StringView(kmlTag_Track)));
26 GeoStackItem parentItem = parser.parentElement();
27 auto track =
new GeoDataTrack();
28 KmlObjectTagHandler::parseIdentifiers(parser, track);
30 if (parentItem.represents(kmlTag_Placemark)) {
31 parentItem.nodeAs<GeoDataPlacemark>()->setGeometry(track);
33 }
else if (parentItem.represents(kmlTag_MultiTrack)) {
34 parentItem.nodeAs<GeoDataMultiTrack>()->append(track);
36 }
else if (parentItem.represents(kmlTag_MultiGeometry)) {
37 parentItem.nodeAs<GeoDataMultiGeometry>()->append(track);
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 Mon Nov 18 2024 12:15:45 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.