Marble

GeoDataSchemaData.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2014 Abhinav Gangwar <abhgang@gmail.com>
4//
5
6#ifndef MARBLE_GEODATASCHEMADATA_H
7#define MARBLE_GEODATASCHEMADATA_H
8
9// Qt
10#include <QList>
11
12// Marble
13#include "GeoDocument.h"
14
15#include "geodata_export.h"
16
17namespace Marble
18{
19
20class GeoDataExtendedData;
21class GeoDataSchemaDataPrivate;
22class GeoDataSimpleData;
23
24/**
25 */
26class GEODATA_EXPORT GeoDataSchemaData : public GeoNode
27{
28public:
29 GeoDataSchemaData();
30 GeoDataSchemaData(const GeoDataSchemaData &other);
31 GeoDataSchemaData &operator=(const GeoDataSchemaData &rhs);
32 bool operator==(const GeoDataSchemaData &other) const;
33 bool operator!=(const GeoDataSchemaData &other) const;
34 ~GeoDataSchemaData() override;
35
36 /*
37 * @brief Returns the id for schema which defines custom data
38 */
39 QString schemaUrl() const;
40
41 /*
42 * @brief Set the schemaUrl attribute of SchemaData to @p schemaUrl
43 */
44 void setSchemaUrl(const QString &schemaUrl);
45
46 /*
47 * @brief Returns the SimpleData having name attribute @p name
48 */
49 GeoDataSimpleData &simpleData(const QString &name) const;
50
51 /*
52 * @brief Adds a SimpleData @p simpleData to schemaDataHash
53 */
54 void addSimpleData(const GeoDataSimpleData &simpleData);
55
56 /*
57 * @brief Dump a list containing all SimpleData values stored in schemaDataHash
58 */
59 QList<GeoDataSimpleData> simpleDataList() const;
60
61 /*
62 * @brief Set the parent @parent
63 */
64 void setParent(GeoDataExtendedData *parent);
65
66 /*
67 * @brief Get the parent
68 */
69 const GeoDataExtendedData *parent() const;
70 GeoDataExtendedData *parent();
71
72 /*
73 * @brief Provides information for downcasting a GeoNode
74 */
75 const char *nodeType() const override;
76
77 /*
78 * @brief Serialize SchemaData to a stream @p stream
79 */
80 virtual void pack(QDataStream &stream) const;
81
82 /*
83 * @brief Unserialize SchemaData from a stream @p stream
84 */
85 virtual void unpack(QDataStream &stream);
86
87private:
88 GeoDataSchemaDataPrivate *const d;
89};
90
91} // namespace Marble
92
93#endif // MARBLE_GEODATASCHEMADATA_H
KIOCORE_EXPORT bool operator!=(const UDSEntry &entry, const UDSEntry &other)
bool operator==(const StyleDelim &l, const StyleDelim &r)
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 Sat Dec 21 2024 17:04:14 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.