Marble

GeoDataSchema.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2014 Abhinav Gangwar <[email protected]>
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 
17 class QDataStream;
18 
19 namespace Marble
20 {
21 
22 class GeoDataSchemaPrivate;
23 class GeoDataSimpleField;
24 
25 /**
26  */
27 class GEODATA_EXPORT GeoDataSchema : public GeoDataObject
28 {
29 public:
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 
72 private:
73  GeoDataSchemaPrivate * const d;
74 
75 };
76 
77 }
78 
79 #endif // MARBLE_GEODATASCHEMA_H
bool operator==(const Qt3DRender::QGraphicsApiFilter &reference, const Qt3DRender::QGraphicsApiFilter &sample)
bool operator!=(const Qt3DRender::QGraphicsApiFilter &reference, const Qt3DRender::QGraphicsApiFilter &sample)
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Oct 2 2023 03:52:08 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.