• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • sources
  • kde-4.12
  • kdeedu
  • marble
  • src
  • lib
  • marble
  • geodata
  • data
GeoDataSimpleArrayData.cpp
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2011 Niko Sams <niko.sams@gmail.com>
9 //
10 
11 #include "GeoDataSimpleArrayData.h"
12 
13 #include "GeoDataTypes.h"
14 #include "MarbleDebug.h"
15 
16 #include <QMap>
17 #include <QLinkedList>
18 
19 namespace Marble {
20 
21 class GeoDataSimpleArrayDataPrivate
22 {
23 public:
24  GeoDataSimpleArrayDataPrivate()
25  {
26  }
27 
28  QList< QVariant > m_values;
29 };
30 
31 GeoDataSimpleArrayData::GeoDataSimpleArrayData()
32  : d( new GeoDataSimpleArrayDataPrivate() )
33 {
34 }
35 
36 GeoDataSimpleArrayData::GeoDataSimpleArrayData( const GeoDataSimpleArrayData& other )
37  : GeoDataObject( other ), d( new GeoDataSimpleArrayDataPrivate( *other.d ) )
38 {
39 }
40 
41 GeoDataSimpleArrayData::~GeoDataSimpleArrayData()
42 {
43  delete d;
44 }
45 
46 int GeoDataSimpleArrayData::size() const
47 {
48  return d->m_values.size();
49 }
50 
51 QVariant GeoDataSimpleArrayData::valueAt(int index) const
52 {
53  return d->m_values.at( index );
54 }
55 
56 QList< QVariant > GeoDataSimpleArrayData::valuesList() const
57 {
58  return d->m_values;
59 }
60 
61 void GeoDataSimpleArrayData::append( const QVariant& value )
62 {
63  d->m_values.append( value );
64 }
65 
66 
67 const char* GeoDataSimpleArrayData::nodeType() const
68 {
69  return GeoDataTypes::GeoDataSimpleArrayDataType;
70 }
71 
72 void GeoDataSimpleArrayData::pack( QDataStream& stream ) const
73 {
74  GeoDataObject::pack( stream );
75 }
76 
77 void GeoDataSimpleArrayData::unpack( QDataStream& stream )
78 {
79  GeoDataObject::unpack( stream );
80 }
81 
82 }
Marble::GeoDataSimpleArrayData::~GeoDataSimpleArrayData
~GeoDataSimpleArrayData()
Definition: GeoDataSimpleArrayData.cpp:41
Marble::GeoDataObject
A base class for all geodata objects.
Definition: GeoDataObject.h:48
Marble::GeoDataObject::pack
virtual void pack(QDataStream &stream) const
Reimplemented from Serializable.
Definition: GeoDataObject.cpp:114
MarbleDebug.h
Marble::GeoDataSimpleArrayData::pack
virtual void pack(QDataStream &stream) const
Reimplemented from Serializable.
Definition: GeoDataSimpleArrayData.cpp:72
Marble::GeoDataSimpleArrayData::append
void append(const QVariant &value)
Append a value to the array.
Definition: GeoDataSimpleArrayData.cpp:61
Marble::GeoDataSimpleArrayData
Definition: GeoDataSimpleArrayData.h:22
Marble::GeoDataSimpleArrayData::GeoDataSimpleArrayData
GeoDataSimpleArrayData()
Definition: GeoDataSimpleArrayData.cpp:31
Marble::GeoDataSimpleArrayData::unpack
virtual void unpack(QDataStream &stream)
Reimplemented from Serializable.
Definition: GeoDataSimpleArrayData.cpp:77
GeoDataSimpleArrayData.h
Marble::GeoDataSimpleArrayData::nodeType
virtual const char * nodeType() const
Provides type information for downcasting a GeoNode.
Definition: GeoDataSimpleArrayData.cpp:67
Marble::GeoDataSimpleArrayData::size
int size() const
Returns the number of value in the array.
Definition: GeoDataSimpleArrayData.cpp:46
Marble::GeoDataObject::unpack
virtual void unpack(QDataStream &steam)
Reimplemented from Serializable.
Definition: GeoDataObject.cpp:120
Marble::GeoDataSimpleArrayData::valuesList
QList< QVariant > valuesList() const
Returns all values in the array.
Definition: GeoDataSimpleArrayData.cpp:56
GeoDataTypes.h
Marble::GeoDataSimpleArrayData::valueAt
QVariant valueAt(int index) const
Returns the value at index index.
Definition: GeoDataSimpleArrayData.cpp:51
Marble::GeoDataTypes::GeoDataSimpleArrayDataType
const char * GeoDataSimpleArrayDataType
Definition: GeoDataTypes.cpp:69
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:50 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal