Marble

KmlMultiTrackTagWriter.cpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2012 Thibaut Gridel <tgridel@free.fr>
4//
5
6#include "KmlMultiTrackTagWriter.h"
7
8#include "GeoDataMultiTrack.h"
9#include "GeoDataTrack.h"
10#include "GeoDataTypes.h"
11#include "GeoWriter.h"
12#include "KmlElementDictionary.h"
13#include "KmlObjectTagWriter.h"
14
15namespace Marble
16{
17
18static GeoTagWriterRegistrar s_writerMultiTrack(
19 GeoTagWriter::QualifiedName( GeoDataTypes::GeoDataMultiTrackType,
20 kml::kmlTag_nameSpaceOgc22 ),
21 new KmlMultiTrackTagWriter );
22
23bool KmlMultiTrackTagWriter::write( const GeoNode *node, GeoWriter& writer ) const
24{
25 const GeoDataMultiTrack *geometry = static_cast<const GeoDataMultiTrack*>( node );
26
27 writer.writeStartElement( "gx:MultiTrack" );
28 KmlObjectTagWriter::writeIdentifiers( writer, geometry );
29
30 for ( int i = 0; i < geometry->size(); ++i )
31 {
32 writeElement( &geometry->at( i ), writer );
33 }
34
35 writer.writeEndElement();
36
37 return true;
38}
39
40}
QPair< QString, QString > QualifiedName
Object Name and Namespace Pair This type is intended to be used in a similar way to.
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 Fri Jun 21 2024 12:00:07 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.