Marble

GeoDataSimpleArrayData.cpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2011 Niko Sams <niko.sams@gmail.com>
4//
5
6#include "GeoDataSimpleArrayData.h"
7
8#include "GeoDataTypes.h"
9#include "MarbleDebug.h"
10
11namespace Marble {
12
13class GeoDataSimpleArrayDataPrivate
14{
15public:
16 GeoDataSimpleArrayDataPrivate()
17 {
18 }
19
20 QList< QVariant > m_values;
21};
22
23GeoDataSimpleArrayData::GeoDataSimpleArrayData()
24 : d( new GeoDataSimpleArrayDataPrivate() )
25{
26}
27
28GeoDataSimpleArrayData::GeoDataSimpleArrayData( const GeoDataSimpleArrayData& other )
29 : GeoDataObject( other ), d( new GeoDataSimpleArrayDataPrivate( *other.d ) )
30{
31}
32
33bool GeoDataSimpleArrayData::operator==( const GeoDataSimpleArrayData &other ) const
34{
35 return equals(other) && d->m_values == other.d->m_values;
36}
37
38bool GeoDataSimpleArrayData::operator!=( const GeoDataSimpleArrayData &other ) const
39{
40 return !this->operator==(other);
41}
42
43GeoDataSimpleArrayData::~GeoDataSimpleArrayData()
44{
45 delete d;
46}
47
48int GeoDataSimpleArrayData::size() const
49{
50 return d->m_values.size();
51}
52
53QVariant GeoDataSimpleArrayData::valueAt(int index) const
54{
55 return d->m_values.at( index );
56}
57
58QList< QVariant > GeoDataSimpleArrayData::valuesList() const
59{
60 return d->m_values;
61}
62
63void GeoDataSimpleArrayData::append( const QVariant& value )
64{
65 d->m_values.append( value );
66}
67
68
69const char* GeoDataSimpleArrayData::nodeType() const
70{
71 return GeoDataTypes::GeoDataSimpleArrayDataType;
72}
73
74void GeoDataSimpleArrayData::pack( QDataStream& stream ) const
75{
76 GeoDataObject::pack( stream );
77}
78
79void GeoDataSimpleArrayData::unpack( QDataStream& stream )
80{
81 GeoDataObject::unpack( stream );
82}
83
84}
bool equals(const QVariant &lhs, const QVariant &rhs)
Binds a QML item to a specific geodetic location in screen coordinates.
void append(QList< T > &&value)
bool operator==(const QGraphicsApiFilter &reference, const QGraphicsApiFilter &sample)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 14 2024 11:54:16 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.