Marble

KmlDocumentTagWriter.cpp
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2009 Andrew Manson <[email protected]>
4 //
5 
6 #include "KmlDocumentTagWriter.h"
7 
8 #include "GeoDocument.h"
9 #include "GeoDataDocument.h"
10 #include "GeoWriter.h"
11 #include "KmlElementDictionary.h"
12 #include "GeoDataStyle.h"
13 #include "GeoDataStyleMap.h"
14 #include "MarbleDebug.h"
15 #include "GeoDataExtendedData.h"
16 #include "GeoDataTimeStamp.h"
17 #include "GeoDataTimeSpan.h"
18 #include "GeoDataSchema.h"
19 
20 #include "GeoDataTypes.h"
21 
22 #include <QVector>
23 
24 namespace Marble
25 {
26 
27 static GeoTagWriterRegistrar s_writerDocument( GeoTagWriter::QualifiedName(GeoDataTypes::GeoDataDocumentType,
28  kml::kmlTag_nameSpaceOgc22),
29  new KmlDocumentTagWriter() );
30 
31 KmlDocumentTagWriter::KmlDocumentTagWriter() :
32  KmlFeatureTagWriter( kml::kmlTag_Document )
33 {
34  // nothing to do
35 }
36 
37 bool KmlDocumentTagWriter::writeMid( const GeoNode *node, GeoWriter& writer ) const
38 {
39  const GeoDataDocument *document = static_cast<const GeoDataDocument*>(node);
40 
41  for( const GeoDataStyle::ConstPtr &style: document->styles() ) {
42  writeElement( style.data(), writer );
43  }
44  for( const GeoDataStyleMap &map: document->styleMaps() ) {
45  writeElement( &map, writer );
46  }
47  for( const GeoDataSchema &schema: document->schemas() ) {
48  writeElement( &schema, writer );
49  }
50 
52  QVector<GeoDataFeature*>::ConstIterator const end = document->constEnd();
53 
54  for ( ; it != end; ++it ) {
55  writeElement( *it, writer );
56  }
57 
58  return true;
59 }
60 
61 }
QPair< QString, QString > QualifiedName
Object Name and Namespace Pair This type is intended to be used in a similar way to.
Definition: GeoTagWriter.h:44
Binds a QML item to a specific geodetic location in screen coordinates.
QVector::const_iterator constBegin() const const
const QList< QKeySequence > & end()
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 21 2023 04:12:27 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.