Marble

GeoDataSimpleField.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_GEODATASIMPLEFIELD_H
7#define MARBLE_GEODATASIMPLEFIELD_H
8
9#include "GeoDocument.h"
10#include "geodata_export.h"
11
12class QDataStream;
13class QString;
14
15namespace Marble
16{
17
18class GeoDataSimpleFieldPrivate;
19
20/**
21 */
22class GEODATA_EXPORT GeoDataSimpleField : public GeoNode
23{
24public:
25 GeoDataSimpleField();
26 GeoDataSimpleField(const GeoDataSimpleField &other);
27 bool operator==(const GeoDataSimpleField &other) const;
28 bool operator!=(const GeoDataSimpleField &other) const;
29 ~GeoDataSimpleField() override;
30
31 /*
32 * @brief Enum for different values of type attribute of SimpleField
33 */
34 enum SimpleFieldType {
35 String,
36 Int,
37 UInt,
38 Short,
39 UShort,
40 Float,
41 Double,
42 Bool
43 };
44
45 /*
46 * @brief Return the value of type attribute of simple field
47 */
48 SimpleFieldType type() const;
49
50 /*
51 * @brief Sets the value of type attribute
52 * @param type The of type attribute
53 */
54 void setType(SimpleFieldType type);
55
56 /*
57 * @brief Returns the value of name attribute of simple field
58 */
59 QString name() const;
60
61 /*
62 * @brief Set the value of name attribute of SimpleField
63 * @param value The value to be set as name attribute
64 */
65 void setName(const QString &value);
66
67 /*
68 * @brief Returns the value of displayField child element of SimpleField tag
69 */
70 QString displayName() const;
71
72 /*
73 * @brief Set the value for displayName tag
74 * @param displayName The value to be set for displayName tag
75 */
76 void setDisplayName(const QString &displayName);
77
78 /*
79 * @brief The assignment operator
80 * @param rhs The object to be duplicated
81 */
82 GeoDataSimpleField &operator=(const GeoDataSimpleField &rhs);
83
84 /*
85 * @brief Provides information for downcasting a GeoNode
86 */
87 const char *nodeType() const override;
88
89 /*
90 * @brief Serialize SimpleField to a stream
91 * @param stream The stream
92 */
93 virtual void pack(QDataStream &stream) const;
94
95 /*
96 * @brief Unserialize SimpleField from a stream
97 * @param stream The stream
98 */
99 virtual void unpack(QDataStream &stream);
100
101private:
102 GeoDataSimpleFieldPrivate *const d;
103};
104
105}
106
107#endif // MARBLE_GEODATASIMPLEFIELD_H
AKONADI_CALENDAR_EXPORT QString displayName(Akonadi::ETMCalendar *calendar, const Akonadi::Collection &collection)
QString name(GameStandardAction id)
KIOCORE_EXPORT bool operator!=(const UDSEntry &entry, const UDSEntry &other)
KIOCORE_EXPORT bool operator==(const UDSEntry &entry, const UDSEntry &other)
VehicleSection::Type type(QStringView coachNumber, QStringView coachClassification)
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.