Marble

KmlSchemaDataTagWriter.cpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2014 Abhinav Gangwar <abhgang@gmail.com>
4//
5
6#include "KmlSchemaDataTagWriter.h"
7
8#include <QString>
9
10#include "KmlElementDictionary.h"
11
12#include "GeoWriter.h"
13
14#include "GeoDataTypes.h"
15
16#include "GeoDataSchemaData.h"
17#include "GeoDataSimpleData.h"
18
19namespace Marble
20{
21
22static GeoTagWriterRegistrar s_writerSchemaData(
23 GeoTagWriter::QualifiedName( GeoDataTypes::GeoDataSchemaDataType,
24 kml::kmlTag_nameSpaceOgc22 ),
25 new KmlSchemaDataTagWriter );
26
27bool KmlSchemaDataTagWriter::write( const GeoNode *node, GeoWriter& writer ) const
28{
29 const GeoDataSchemaData *schemaData = static_cast<const GeoDataSchemaData*>( node );
30 writer.writeStartElement( kml::kmlTag_SchemaData );
31 QString schemaUrl = schemaData->schemaUrl();
32 writer.writeAttribute( "schemaUrl", schemaUrl );
33
34 for( const GeoDataSimpleData& data: schemaData->simpleDataList() ) {
35 writeElement( &data, writer );
36 }
37 writer.writeEndElement();
38
39 return true;
40}
41
42}
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 Tue Mar 26 2024 11:18:17 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.