Marble

KmlFolderTagWriter.cpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2010 Gaurav Gupta <1989.gaurav@googlemail.com>
4//
5
6#include "KmlFolderTagWriter.h"
7
8#include "GeoDataFolder.h"
9#include "GeoWriter.h"
10#include "KmlElementDictionary.h"
11
12#include "GeoDataTypes.h"
13
14#include <QList>
15
16namespace Marble
17{
18
19static GeoTagWriterRegistrar s_writerDocument(GeoTagWriter::QualifiedName(QString::fromLatin1(GeoDataTypes::GeoDataFolderType),
20 QString::fromLatin1(kml::kmlTag_nameSpaceOgc22)),
21 new KmlFolderTagWriter());
22
23bool KmlFolderTagWriter::writeMid(const GeoNode *node, GeoWriter &writer) const
24{
25 const auto folder = static_cast<const GeoDataFolder *>(node);
26
27 // Write all containing features
28 QList<GeoDataFeature *>::ConstIterator it = folder->constBegin();
29 QList<GeoDataFeature *>::ConstIterator const end = folder->constEnd();
30
31 for (; it != end; ++it) {
32 writeElement(*it, writer);
33 }
34
35 return true;
36}
37
38KmlFolderTagWriter::KmlFolderTagWriter()
39 : KmlFeatureTagWriter(QString::fromLatin1(kml::kmlTag_Folder))
40{
41 // nothing to do
42}
43
44}
QPair< QString, QString > QualifiedName
Object Name and Namespace Pair This type is intended to be used in a similar way to.
QAction * end(const QObject *recvr, const char *slot, QObject *parent)
Binds a QML item to a specific geodetic location in screen coordinates.
QString fromLatin1(QByteArrayView str)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 8 2024 12:02:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.