Marble

KmlLodTagWriter.cpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2012 Mayank Madan <maddiemadan@gmail.com>
4//
5
6#include "KmlLodTagWriter.h"
7
8#include "GeoDataLod.h"
9#include "GeoDataTypes.h"
10#include "GeoWriter.h"
11#include "KmlElementDictionary.h"
12#include "KmlObjectTagWriter.h"
13
14namespace Marble
15{
16
17static GeoTagWriterRegistrar s_writerLod(
18 GeoTagWriter::QualifiedName( GeoDataTypes::GeoDataLodType,
19 kml::kmlTag_nameSpaceOgc22 ),
20 new KmlLodTagWriter);
21
22bool KmlLodTagWriter::write( const GeoNode *node,
23 GeoWriter& writer ) const
24{
25 const GeoDataLod *lod = static_cast<const GeoDataLod*>( node );
26 writer.writeStartElement(kml::kmlTag_Lod);
27 KmlObjectTagWriter::writeIdentifiers( writer, lod );
28 writer.writeTextElement( kml::kmlTag_minLodPixels, QString::number(lod->minLodPixels()) );
29 writer.writeTextElement( kml::kmlTag_maxLodPixels, QString::number(lod->maxLodPixels()) );
30 writer.writeTextElement( kml::kmlTag_minFadeExtent, QString::number(lod->minFadeExtent()) );
31 writer.writeTextElement( kml::kmlTag_maxFadeExtent, QString::number(lod->maxFadeExtent()) );
32 writer.writeEndElement();
33 return true;
34}
35
36}
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.
QString number(double n, char format, int precision)
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.