Marble

KmlSchemaTagWriter.cpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2014 Abhinav Gangwar <abhgang@gmail.com>
4//
5
6#include "KmlSchemaTagWriter.h"
7
8#include "GeoDataSchema.h"
9#include "GeoDataSimpleField.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_writerSchema(
19 GeoTagWriter::QualifiedName( GeoDataTypes::GeoDataSchemaType,
20 kml::kmlTag_nameSpaceOgc22),
21 new KmlSchemaTagWriter );
22
23bool KmlSchemaTagWriter::write( const GeoNode *node, GeoWriter& writer ) const
24{
25 const GeoDataSchema *schema = static_cast<const GeoDataSchema*>( node );
26 writer.writeStartElement( kml::kmlTag_Schema );
27 KmlObjectTagWriter::writeIdentifiers( writer, schema );
28 QString name = schema->schemaName();
29 writer.writeAttribute( "name", name );
30
31 for( const GeoDataSimpleField &simpleField: schema->simpleFields() ) {
32 writeElement( &simpleField, 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.
QString name(StandardShortcut id)
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.