Marble

GeoDataData.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2010 Harshit Jain <[email protected]>
4 //
5 
6 #ifndef MARBLE_GEODATADATA_H
7 #define MARBLE_GEODATADATA_H
8 
9 #include "GeoDataObject.h"
10 
11 #include "geodata_export.h"
12 
13 class QVariant;
14 
15 namespace Marble
16 {
17 
18 class GeoDataDataPrivate;
19 
20 /**
21  */
22 class GEODATA_EXPORT GeoDataData : public GeoDataObject
23 {
24  public:
25  GeoDataData();
26 
27  /** Convenience constructor that sets name and value directly */
28  GeoDataData( const QString &name, const QVariant &value );
29 
30  GeoDataData( const GeoDataData& other );
31  bool operator==( const GeoDataData& other ) const;
32  bool operator!=( const GeoDataData& other ) const;
33  ~GeoDataData() override;
34 
35  /**
36  * @brief assignment operator
37  */
38  GeoDataData& operator=( const GeoDataData& other );
39 
40  /// Provides type information for downcasting a GeoData
41  const char* nodeType() const override;
42 
43  /**
44  * @brief return a reference to the value of data;
45  */
46  QVariant& valueRef();
47  const QVariant& valueRef() const;
48 
49  /**
50  * @brief return the value of data
51  */
52  QVariant value() const;
53 
54  /**
55  * @brief set the value of data
56  * @param value the value to be set
57  */
58  void setValue( const QVariant& value );
59 
60  /**
61  * @brief return the name of data
62  */
63  QString name() const;
64 
65  /**
66  * @brief set the name of data
67  * @param name the name to be set
68  */
69  void setName( const QString& name );
70 
71  /**
72  * @brief return the displayName of data
73  */
74  QString displayName() const;
75 
76  /**
77  * @brief set the displayName of data
78  * @param displayName the displayName to be set
79  */
80  void setDisplayName( const QString& displayName );
81 
82  /// Serialize the contents of the feature to @p stream.
83  void pack( QDataStream& stream ) const override;
84 
85  /// Unserialize the contents of the feature from @p stream.
86  void unpack( QDataStream& stream ) override;
87 
88  private:
89  GeoDataDataPrivate * const d;
90 };
91 
92 }
93 
94 #endif //MARBLE_GEODATADATA_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.
AKONADI_CALENDAR_EXPORT QString displayName(Akonadi::ETMCalendar *calendar, const Akonadi::Collection &collection)
QString name(StandardShortcut id)
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.