Marble

GeoDataSimpleArrayData.cpp
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2011 Niko Sams <[email protected]>
4 //
5 
6 #include "GeoDataSimpleArrayData.h"
7 
8 #include "GeoDataTypes.h"
9 #include "MarbleDebug.h"
10 
11 namespace Marble {
12 
13 class GeoDataSimpleArrayDataPrivate
14 {
15 public:
16  GeoDataSimpleArrayDataPrivate()
17  {
18  }
19 
20  QList< QVariant > m_values;
21 };
22 
23 GeoDataSimpleArrayData::GeoDataSimpleArrayData()
24  : d( new GeoDataSimpleArrayDataPrivate() )
25 {
26 }
27 
28 GeoDataSimpleArrayData::GeoDataSimpleArrayData( const GeoDataSimpleArrayData& other )
29  : GeoDataObject( other ), d( new GeoDataSimpleArrayDataPrivate( *other.d ) )
30 {
31 }
32 
33 bool GeoDataSimpleArrayData::operator==( const GeoDataSimpleArrayData &other ) const
34 {
35  return equals(other) && d->m_values == other.d->m_values;
36 }
37 
38 bool GeoDataSimpleArrayData::operator!=( const GeoDataSimpleArrayData &other ) const
39 {
40  return !this->operator==(other);
41 }
42 
43 GeoDataSimpleArrayData::~GeoDataSimpleArrayData()
44 {
45  delete d;
46 }
47 
48 int GeoDataSimpleArrayData::size() const
49 {
50  return d->m_values.size();
51 }
52 
53 QVariant GeoDataSimpleArrayData::valueAt(int index) const
54 {
55  return d->m_values.at( index );
56 }
57 
58 QList< QVariant > GeoDataSimpleArrayData::valuesList() const
59 {
60  return d->m_values;
61 }
62 
63 void GeoDataSimpleArrayData::append( const QVariant& value )
64 {
65  d->m_values.append( value );
66 }
67 
68 
69 const char* GeoDataSimpleArrayData::nodeType() const
70 {
71  return GeoDataTypes::GeoDataSimpleArrayDataType;
72 }
73 
74 void GeoDataSimpleArrayData::pack( QDataStream& stream ) const
75 {
76  GeoDataObject::pack( stream );
77 }
78 
79 void GeoDataSimpleArrayData::unpack( QDataStream& stream )
80 {
81  GeoDataObject::unpack( stream );
82 }
83 
84 }
void append(const T &value)
bool operator==(const Qt3DRender::QGraphicsApiFilter &reference, const Qt3DRender::QGraphicsApiFilter &sample)
void pack(QDataStream &stream) const override
Reimplemented from Serializable.
Binds a QML item to a specific geodetic location in screen coordinates.
void unpack(QDataStream &steam) override
Reimplemented from Serializable.
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.