Marble

GeoDataSchema.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_GEODATASCHEMA_H
7#define MARBLE_GEODATASCHEMA_H
8
9// Qt
10#include <QHash>
11#include <QList>
12
13// Marble
14#include "GeoDataObject.h"
15#include "geodata_export.h"
16
17class QDataStream;
18
19namespace Marble
20{
21
22class GeoDataSchemaPrivate;
23class GeoDataSimpleField;
24
25/**
26 */
27class GEODATA_EXPORT GeoDataSchema : public GeoDataObject
28{
29public:
30 GeoDataSchema();
31 explicit GeoDataSchema(const QHash<QString, GeoDataSimpleField> &simpleFields);
32 GeoDataSchema(const GeoDataSchema &other);
33 GeoDataSchema &operator=(const GeoDataSchema &other);
34 bool operator==(const GeoDataSchema &other) const;
35 bool operator!=(const GeoDataSchema &other) const;
36 ~GeoDataSchema() override;
37
38 /*
39 * @brief Returns the name attribute of schema
40 */
41 QString schemaName() const;
42
43 /*
44 * @brief Sets the name attribute of the schema
45 * @param name The name to be set
46 */
47 void setSchemaName(const QString &name);
48
49 /*
50 * @brief Returns the SimpleField child of schema
51 * @param name The value of name attribute of SimpleField which is to be returned
52 */
53 GeoDataSimpleField &simpleField(const QString &name) const;
54
55 /*
56 * @brief Adds a SimpleField to schema
57 * @param value The SimpleField to be added
58 */
59 void addSimpleField(const GeoDataSimpleField &value);
60
61 /*
62 * @brief dump a vector containing all simple fields of schema
63 */
64 QList<GeoDataSimpleField> simpleFields() const;
65
66 const char *nodeType() const override;
67
68 void pack(QDataStream &stream) const override;
69
70 void unpack(QDataStream &stream) override;
71
72private:
73 GeoDataSchemaPrivate *const d;
74};
75
76}
77
78#endif // MARBLE_GEODATASCHEMA_H
KIOCORE_EXPORT bool operator!=(const UDSEntry &entry, const UDSEntry &other)
KIOCORE_EXPORT bool operator==(const UDSEntry &entry, const UDSEntry &other)
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 Mon Nov 4 2024 16:37:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.