• 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
GeoDataPlacemark_p.h
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 2009 Patrick Spendrin <ps_ml@gmx.de>
9 //
10 
11 #ifndef MARBLE_GEODATAPLACEMARKPRIVATE_H
12 #define MARBLE_GEODATAPLACEMARKPRIVATE_H
13 
14 #include "GeoDataFeature_p.h"
15 
16 #include "GeoDataMultiTrack.h"
17 #include "GeoDataTrack.h"
18 #include "GeoDataTypes.h"
19 
20 namespace Marble
21 {
22 
23 class GeoDataPlacemarkPrivate : public GeoDataFeaturePrivate
24 {
25  public:
26  GeoDataPlacemarkPrivate()
27  : m_geometry( new GeoDataPoint ),
28  m_area( -1.0 ),
29  m_population( -1 )
30  {
31  }
32 
33  virtual ~GeoDataPlacemarkPrivate()
34  {
35  delete m_geometry;
36  }
37 
38  void operator=( const GeoDataPlacemarkPrivate& other )
39  {
40  GeoDataFeaturePrivate::operator=( other );
41 
42  GeoDataGeometry * geometry = 0;
43  if ( other.m_geometry ) {
44  switch( other.m_geometry->geometryId() ) {
45  case InvalidGeometryId:
46  break;
47  case GeoDataPointId:
48  geometry = new GeoDataPoint( *static_cast<GeoDataPoint*>( other.m_geometry ) );
49  break;
50  case GeoDataLineStringId:
51  geometry = new GeoDataLineString( *static_cast<GeoDataLineString*>( other.m_geometry ) );
52  break;
53  case GeoDataLinearRingId:
54  geometry = new GeoDataLinearRing( *static_cast<GeoDataLinearRing*>( other.m_geometry ) );
55  break;
56  case GeoDataPolygonId:
57  geometry = new GeoDataPolygon( *static_cast<GeoDataPolygon*>( other.m_geometry ) );
58  break;
59  case GeoDataMultiGeometryId:
60  geometry = new GeoDataMultiGeometry( *static_cast<GeoDataMultiGeometry*>( other.m_geometry ) );
61  break;
62  case GeoDataTrackId:
63  geometry = new GeoDataTrack( *static_cast<GeoDataTrack*>( other.m_geometry ) );
64  break;
65  case GeoDataMultiTrackId:
66  geometry = new GeoDataMultiTrack( *static_cast<GeoDataMultiTrack*>( other.m_geometry ) );
67  break;
68  case GeoDataModelId:
69  break;
70  default: break;
71  }
72  }
73  delete m_geometry;
74  m_geometry = geometry;
75 
76  m_countrycode = other.m_countrycode;
77  m_area = other.m_area;
78  m_population = other.m_population;
79  m_state = other.m_state;
80  }
81 
82  virtual GeoDataFeaturePrivate* copy()
83  {
84  GeoDataPlacemarkPrivate* copy = new GeoDataPlacemarkPrivate;
85  *copy = *this;
86  return copy;
87  }
88 
89  virtual const char* nodeType() const
90  {
91  return GeoDataTypes::GeoDataPlacemarkType;
92  }
93 
94  virtual EnumFeatureId featureId() const
95  {
96  return GeoDataPlacemarkId;
97  }
98 
99  // Data for a Placemark in addition to those in GeoDataFeature.
100  GeoDataGeometry *m_geometry; // any GeoDataGeometry entry like locations
101  QString m_countrycode; // Country code.
102  qreal m_area; // Area in square kilometer
103  qint64 m_population; // population in number of inhabitants
104  QString m_state; // State
105 };
106 
107 } // namespace Marble
108 
109 #endif
Marble::GeoDataPointId
Definition: Serializable.h:42
Marble::GeoDataPoint
A Geometry object representing a 3d point.
Definition: GeoDataPoint.h:47
Marble::GeoDataMultiTrackId
Definition: Serializable.h:47
Marble::GeoDataMultiTrack
Definition: GeoDataMultiTrack.h:25
Marble::GeoDataTrack
A geometry for tracking objects made of (time, coordinates) pairs.
Definition: GeoDataTrack.h:54
Marble::GeoDataLinearRing
A LinearRing that allows to store a closed, contiguous set of line segments.
Definition: GeoDataLinearRing.h:68
Marble::GeoDataPlacemarkPrivate::nodeType
virtual const char * nodeType() const
Definition: GeoDataPlacemark_p.h:89
Marble::GeoDataPlacemarkPrivate::~GeoDataPlacemarkPrivate
virtual ~GeoDataPlacemarkPrivate()
Definition: GeoDataPlacemark_p.h:33
Marble::GeoDataPlacemarkPrivate
Definition: GeoDataPlacemark_p.h:23
Marble::GeoDataGeometry
A base class for all geodata features.
Definition: GeoDataGeometry.h:47
Marble::GeoDataTypes::GeoDataPlacemarkType
const char * GeoDataPlacemarkType
Definition: GeoDataTypes.cpp:62
Marble::GeoDataPlacemarkPrivate::copy
virtual GeoDataFeaturePrivate * copy()
Definition: GeoDataPlacemark_p.h:82
GeoDataTrack.h
Marble::GeoDataLinearRingId
Definition: Serializable.h:44
Marble::GeoDataPlacemarkPrivate::featureId
virtual EnumFeatureId featureId() const
Definition: GeoDataPlacemark_p.h:94
Marble::GeoDataFeaturePrivate
Definition: GeoDataFeature_p.h:30
GeoDataFeature_p.h
Marble::GeoDataPolygon
A polygon that can have "holes".
Definition: GeoDataPolygon.h:81
Marble::GeoDataPlacemarkPrivate::m_countrycode
QString m_countrycode
Definition: GeoDataPlacemark_p.h:101
Marble::GeoDataMultiGeometryId
Definition: Serializable.h:46
Marble::GeoDataPlacemarkPrivate::m_area
qreal m_area
Definition: GeoDataPlacemark_p.h:102
Marble::GeoDataLineString
A LineString that allows to store a contiguous set of line segments.
Definition: GeoDataLineString.h:75
Marble::GeoDataModelId
Definition: Serializable.h:48
Marble::GeoDataPlacemarkPrivate::m_population
qint64 m_population
Definition: GeoDataPlacemark_p.h:103
GeoDataMultiTrack.h
Marble::GeoDataPlacemarkPrivate::operator=
void operator=(const GeoDataPlacemarkPrivate &other)
Definition: GeoDataPlacemark_p.h:38
Marble::GeoDataTrackId
Definition: Serializable.h:49
Marble::EnumFeatureId
EnumFeatureId
Definition: Serializable.h:30
Marble::GeoDataPlacemarkId
Definition: Serializable.h:34
Marble::GeoDataPlacemarkPrivate::m_state
QString m_state
Definition: GeoDataPlacemark_p.h:104
Marble::GeoDataFeaturePrivate::operator=
void operator=(const GeoDataFeaturePrivate &other)
Definition: GeoDataFeature_p.h:79
Marble::GeoDataMultiGeometry
Definition: GeoDataMultiGeometry.h:33
GeoDataTypes.h
Marble::GeoDataLineStringId
Definition: Serializable.h:43
Marble::GeoDataPlacemarkPrivate::GeoDataPlacemarkPrivate
GeoDataPlacemarkPrivate()
Definition: GeoDataPlacemark_p.h:26
Marble::GeoDataPolygonId
Definition: Serializable.h:45
Marble::InvalidGeometryId
Definition: Serializable.h:41
Marble::GeoDataPlacemarkPrivate::m_geometry
GeoDataGeometry * m_geometry
Definition: GeoDataPlacemark_p.h:100
Marble::GeoDataGeometry::geometryId
virtual EnumGeometryId geometryId() const
Definition: GeoDataGeometry.cpp:82
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