Marble

DgmlGeodataTagWriter.cpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2011 Utku Aydın <utkuaydin34@gmail.com>
4//
5
6#include "DgmlGeodataTagWriter.h"
7
8#include "GeoWriter.h"
9#include "GeoSceneGeodata.h"
10#include "GeoSceneTypes.h"
11#include "DgmlElementDictionary.h"
12
13namespace Marble
14{
15
16static GeoTagWriterRegistrar s_writerGeodata( GeoTagWriter::QualifiedName( GeoSceneTypes::GeoSceneGeodataType, dgml::dgmlTag_nameSpace20 ), new DgmlGeodataTagWriter() );
17
18bool DgmlGeodataTagWriter::write( const GeoNode *node, GeoWriter& writer ) const
19{
20 const GeoSceneGeodata *geodata = static_cast<const GeoSceneGeodata*>( node );
21 writer.writeStartElement( dgml::dgmlTag_Geodata );
22 writer.writeAttribute( "name", geodata->name() );
23
24 writer.writeStartElement( dgml::dgmlTag_SourceFile );
25 writer.writeCharacters( geodata->sourceFile() );
26 writer.writeEndElement();
27
28 writer.writeEndElement();
29 return true;
30}
31
32}
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.