File indexing completed on 2025-01-05 03:59:00
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2014 Abhinav Gangwar <abhgang@gmail.com> 0004 // 0005 0006 #ifndef MARBLE_GEODATASIMPLEDATA_H 0007 #define MARBLE_GEODATASIMPLEDATA_H 0008 0009 #include "GeoDocument.h" 0010 #include "digikam_export.h" 0011 0012 // Qt 0013 #include <QString> 0014 #include <QDataStream> 0015 0016 0017 namespace Marble 0018 { 0019 0020 class GeoDataSimpleDataPrivate; 0021 0022 /** 0023 */ 0024 class DIGIKAM_EXPORT GeoDataSimpleData : public GeoNode 0025 { 0026 public: 0027 GeoDataSimpleData(); 0028 GeoDataSimpleData( const GeoDataSimpleData &other ); 0029 ~GeoDataSimpleData() override; 0030 0031 /* 0032 * @brief Returns the value of name attribute of SimpleData tag 0033 */ 0034 QString name() const; 0035 0036 /* 0037 * @brief Set the name of SimpleData to @p name 0038 */ 0039 void setName( const QString &name ); 0040 0041 /* 0042 * @brief Returns the data defined by SimpleData 0043 */ 0044 QString data() const; 0045 0046 /* 0047 * @brief Set the value of data defined by SimpleData to @p data 0048 */ 0049 void setData( const QString &data ); 0050 0051 /* 0052 * Assignment operator 0053 */ 0054 GeoDataSimpleData &operator=( const GeoDataSimpleData &rhs ); 0055 0056 /* 0057 * @brief Equality operator 0058 */ 0059 bool operator==( const GeoDataSimpleData &other ) const; 0060 bool operator!=( const GeoDataSimpleData &other ) const; 0061 0062 /* 0063 * Provides information for downcasting a GeoNode 0064 */ 0065 const char* nodeType() const override; 0066 0067 /* 0068 * Seriliaze SimpleData to stream @p stream 0069 */ 0070 virtual void pack( QDataStream &stream ) const; 0071 0072 /* 0073 * Unseriliaze SimpleData from stream @p stream 0074 */ 0075 virtual void unpack( QDataStream &stream ); 0076 0077 private: 0078 GeoDataSimpleDataPrivate * const d; 0079 }; 0080 0081 } // namespace Marble 0082 0083 #endif // MARBLE_GEODATASIMPLEDATA_H