Marble

DgmlVectorTagWriter.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 "DgmlVectorTagWriter.h"
7
8#include "GeoWriter.h"
9#include "GeoSceneVector.h"
10#include "GeoSceneTypes.h"
11#include "DgmlElementDictionary.h"
12
13namespace Marble
14{
15
16static GeoTagWriterRegistrar s_writerVector( GeoTagWriter::QualifiedName( GeoSceneTypes::GeoSceneVectorType, dgml::dgmlTag_nameSpace20 ), new DgmlVectorTagWriter() );
17
18bool DgmlVectorTagWriter::write( const GeoNode *node, GeoWriter& writer ) const
19{
20 const GeoSceneVector *vector = static_cast<const GeoSceneVector*>( node );
21 writer.writeStartElement( dgml::dgmlTag_Vector );
22 writer.writeAttribute( "name", vector->name() );
23 writer.writeAttribute( "feature", vector->feature() );
24
25 writer.writeStartElement( dgml::dgmlTag_SourceFile );
26 writer.writeAttribute( "format", vector->fileFormat() );
27 writer.writeCharacters( vector->sourceFile() );
28 writer.writeEndElement();
29
30 writer.writeStartElement( dgml::dgmlTag_Pen );
31 writer.writeAttribute( "color", vector->pen().color().name() );
32 writer.writeEndElement();
33
34 writer.writeEndElement();
35 return true;
36}
37
38}
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 14 2024 11:54:17 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.