• 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
GeoDataModel.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 2013 Mayank Madan <maddiemadan@gmail.com>
9 // Copyright 2013 Sanjiban Bairagya <sanjiban22393@gmail.com>
10 //
11 
12 #include "GeoDataModel.h"
13 #include "GeoDataTypes.h"
14 
15 #include "stdio.h"
16 
17 namespace Marble {
18 
19 class GeoDataModelPrivate
20 {
21 public:
22  GeoDataModelPrivate();
23 
24  GeoDataCoordinates m_coordinates;
25  AltitudeMode m_altitudeMode;
26 
27  GeoDataScale m_scale;
28  GeoDataOrientation m_orientation;
29  GeoDataLocation m_location;
30  GeoDataLink m_link;
31  GeoDataResourceMap m_map;
32  QString m_targetHref;
33  QString m_sourceHref;
34 };
35 
36 GeoDataModelPrivate::GeoDataModelPrivate() :
37  m_coordinates(),
38  m_altitudeMode( ClampToGround ),
39  m_scale(),
40  m_orientation(),
41  m_location(),
42  m_link(),
43  m_map(),
44  m_targetHref(),
45  m_sourceHref()
46 {
47  // nothing to do
48 }
49 
50 GeoDataModel::GeoDataModel() :
51  GeoDataGeometry(),
52  d( new GeoDataModelPrivate )
53 {
54  // nothing to do
55 }
56 
57 GeoDataModel::GeoDataModel( const GeoDataModel &other ) :
58  GeoDataGeometry( other ),
59  d( new GeoDataModelPrivate( *other.d ) )
60 {
61  // nothing to do
62 }
63 
64 GeoDataModel &GeoDataModel::operator=( const GeoDataModel &other )
65 {
66  GeoDataGeometry::operator=( other );
67  *d = *other.d;
68  return *this;
69 }
70 
71 GeoDataModel::~GeoDataModel()
72 {
73  delete d;
74 }
75 
76 const char *GeoDataModel::nodeType() const
77 {
78  return GeoDataTypes::GeoDataModelType;
79 }
80 
81 const GeoDataCoordinates &GeoDataModel::coordinates() const
82 {
83  return d->m_coordinates;
84 }
85 
86 GeoDataCoordinates &GeoDataModel::coordinates()
87 {
88  return d->m_coordinates;
89 }
90 
91 const GeoDataLocation &GeoDataModel::location() const
92 {
93  return d->m_location;
94 }
95 
96 GeoDataLocation &GeoDataModel::location()
97 {
98  return d->m_location;
99 }
100 
101 void GeoDataModel::setCoordinates(const GeoDataCoordinates &coordinates)
102 {
103  d->m_coordinates = coordinates;
104 }
105 
106 void GeoDataModel::setLocation(const GeoDataLocation &location)
107 {
108  d->m_location = location;
109 }
110 
111 AltitudeMode GeoDataModel::altitudeMode() const
112 {
113  return d->m_altitudeMode;
114 }
115 
116 void GeoDataModel::setAltitudeMode( const AltitudeMode altitudeMode )
117 {
118  d->m_altitudeMode = altitudeMode;
119 }
120 
121 const GeoDataLink &GeoDataModel::link() const
122 {
123  return d->m_link;
124 }
125 
126 GeoDataLink &GeoDataModel::link()
127 {
128  return d->m_link;
129 }
130 
131 void GeoDataModel::setLink( const GeoDataLink &link )
132 {
133  d->m_link = link;
134 }
135 
136 const GeoDataScale &GeoDataModel::scale() const
137 {
138  return d->m_scale;
139 }
140 
141 GeoDataScale &GeoDataModel::scale()
142 {
143  return d->m_scale;
144 }
145 
146 void GeoDataModel::setScale(const GeoDataScale &scale)
147 {
148  d->m_scale=scale;
149 }
150 
151 const GeoDataOrientation &GeoDataModel::orientation() const
152 {
153  return d->m_orientation;
154 }
155 
156 GeoDataOrientation &GeoDataModel::orientation()
157 {
158  return d->m_orientation;
159 }
160 
161 void GeoDataModel::setOrientation(const GeoDataOrientation &orientation)
162 {
163  d->m_orientation=orientation;
164 }
165 
166 const GeoDataResourceMap &GeoDataModel::resourceMap() const
167 {
168  return d->m_map;
169 }
170 
171 GeoDataResourceMap &GeoDataModel::resourceMap()
172 {
173  return d->m_map;
174 }
175 
176 void GeoDataModel::setResourceMap(const GeoDataResourceMap &map)
177 {
178  d->m_map=map;
179 }
180 
181 QString GeoDataModel::targetHref() const
182 {
183  return d->m_map.targetHref();
184 }
185 
186 void GeoDataModel::setTargetHref(const QString &targetHref)
187 {
188  d->m_map.setTargetHref( targetHref );
189 }
190 
191 QString GeoDataModel::sourceHref() const
192 {
193  return d->m_map.sourceHref();
194 }
195 
196 void GeoDataModel::setSourceHref(const QString &sourceHref)
197 {
198  d->m_map.setSourceHref( sourceHref );
199 }
200 
201 }
Marble::GeoDataCoordinates
A 3d point representation.
Definition: GeoDataCoordinates.h:52
Marble::GeoDataModel::setTargetHref
void setTargetHref(const QString &targetHref)
Definition: GeoDataModel.cpp:186
Marble::GeoDataModel::altitudeMode
AltitudeMode altitudeMode() const
Definition: GeoDataModel.cpp:111
Marble::GeoDataModel::location
const GeoDataLocation & location() const
Definition: GeoDataModel.cpp:91
Marble::GeoDataModel::setAltitudeMode
void setAltitudeMode(const AltitudeMode altitudeMode)
Definition: GeoDataModel.cpp:116
Marble::GeoDataGeometry
A base class for all geodata features.
Definition: GeoDataGeometry.h:47
Marble::GeoDataModel::orientation
const GeoDataOrientation & orientation() const
Definition: GeoDataModel.cpp:151
Marble::GeoDataLink
Definition: GeoDataLink.h:22
Marble::GeoDataModel::setLocation
void setLocation(const GeoDataLocation &location)
Definition: GeoDataModel.cpp:106
Marble::GeoDataModel::operator=
GeoDataModel & operator=(const GeoDataModel &other)
Definition: GeoDataModel.cpp:64
GeoDataModel.h
Marble::GeoDataModel::setLink
void setLink(const GeoDataLink &link)
Definition: GeoDataModel.cpp:131
Marble::GeoDataModel
Definition: GeoDataModel.h:29
Marble::GeoDataModel::resourceMap
const GeoDataResourceMap & resourceMap() const
Definition: GeoDataModel.cpp:166
Marble::GeoDataModel::setScale
void setScale(const GeoDataScale &scale)
Definition: GeoDataModel.cpp:146
Marble::GeoDataModel::setCoordinates
void setCoordinates(const GeoDataCoordinates &coordinates)
Definition: GeoDataModel.cpp:101
Marble::AltitudeMode
AltitudeMode
Definition: MarbleGlobal.h:145
Marble::GeoDataModel::nodeType
virtual const char * nodeType() const
Provides type information for downcasting a GeoNode.
Definition: GeoDataModel.cpp:76
Marble::GeoDataModel::sourceHref
QString sourceHref() const
Definition: GeoDataModel.cpp:191
Marble::GeoDataModel::scale
const GeoDataScale & scale() const
Definition: GeoDataModel.cpp:136
Marble::GeoDataModel::~GeoDataModel
~GeoDataModel()
Definition: GeoDataModel.cpp:71
Marble::GeoDataModel::link
const GeoDataLink & link() const
Definition: GeoDataModel.cpp:121
Marble::GeoDataGeometry::operator=
GeoDataGeometry & operator=(const GeoDataGeometry &other)
Definition: GeoDataGeometry.cpp:87
Marble::GeoDataScale
Definition: GeoDataScale.h:22
Marble::GeoDataModel::targetHref
QString targetHref() const
Definition: GeoDataModel.cpp:181
Marble::GeoDataResourceMap
Definition: GeoDataResourceMap.h:22
Marble::GeoDataModel::setOrientation
void setOrientation(const GeoDataOrientation &orientation)
Definition: GeoDataModel.cpp:161
Marble::ClampToGround
Altitude always sticks to ground level.
Definition: MarbleGlobal.h:146
Marble::GeoDataLocation
Definition: GeoDataLocation.h:23
Marble::GeoDataModel::GeoDataModel
GeoDataModel()
Definition: GeoDataModel.cpp:50
Marble::GeoDataTypes::GeoDataModelType
const char * GeoDataModelType
Definition: GeoDataTypes.cpp:55
Marble::GeoDataOrientation
Definition: GeoDataOrientation.h:21
GeoDataTypes.h
Marble::GeoDataModel::coordinates
const GeoDataCoordinates & coordinates() const
Definition: GeoDataModel.cpp:81
Marble::GeoDataModel::setResourceMap
void setResourceMap(const GeoDataResourceMap &map)
Definition: GeoDataModel.cpp:176
Marble::GeoDataModel::setSourceHref
void setSourceHref(const QString &sourceHref)
Definition: GeoDataModel.cpp:196
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