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

marble

  • sources
  • kde-4.14
  • 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  m_isBalloonVisible( false )
31  {
32  }
33 
34  virtual ~GeoDataPlacemarkPrivate()
35  {
36  delete m_geometry;
37  }
38 
39  GeoDataPlacemarkPrivate& operator=( const GeoDataPlacemarkPrivate& other )
40  {
41  if ( this == &other ) {
42  return *this;
43  }
44 
45  GeoDataFeaturePrivate::operator=( other );
46 
47  GeoDataGeometry * geometry = 0;
48  if ( other.m_geometry ) {
49  switch( other.m_geometry->geometryId() ) {
50  case InvalidGeometryId:
51  break;
52  case GeoDataPointId:
53  geometry = new GeoDataPoint( *static_cast<const GeoDataPoint*>( other.m_geometry ) );
54  break;
55  case GeoDataLineStringId:
56  geometry = new GeoDataLineString( *static_cast<const GeoDataLineString*>( other.m_geometry ) );
57  break;
58  case GeoDataLinearRingId:
59  geometry = new GeoDataLinearRing( *static_cast<const GeoDataLinearRing*>( other.m_geometry ) );
60  break;
61  case GeoDataPolygonId:
62  geometry = new GeoDataPolygon( *static_cast<const GeoDataPolygon*>( other.m_geometry ) );
63  break;
64  case GeoDataMultiGeometryId:
65  geometry = new GeoDataMultiGeometry( *static_cast<const GeoDataMultiGeometry*>( other.m_geometry ) );
66  break;
67  case GeoDataTrackId:
68  geometry = new GeoDataTrack( *static_cast<const GeoDataTrack*>( other.m_geometry ) );
69  break;
70  case GeoDataMultiTrackId:
71  geometry = new GeoDataMultiTrack( *static_cast<const GeoDataMultiTrack*>( other.m_geometry ) );
72  break;
73  case GeoDataModelId:
74  break;
75  default: break;
76  }
77  }
78  delete m_geometry;
79  m_geometry = geometry;
80 
81  m_countrycode = other.m_countrycode;
82  m_area = other.m_area;
83  m_population = other.m_population;
84  m_state = other.m_state;
85 
86  return *this;
87  }
88 
89  virtual GeoDataFeaturePrivate* copy()
90  {
91  GeoDataPlacemarkPrivate* copy = new GeoDataPlacemarkPrivate;
92  *copy = *this;
93  return copy;
94  }
95 
96  virtual const char* nodeType() const
97  {
98  return GeoDataTypes::GeoDataPlacemarkType;
99  }
100 
101  virtual EnumFeatureId featureId() const
102  {
103  return GeoDataPlacemarkId;
104  }
105 
106  // Data for a Placemark in addition to those in GeoDataFeature.
107  GeoDataGeometry *m_geometry; // any GeoDataGeometry entry like locations
108  QString m_countrycode; // Country code.
109  qreal m_area; // Area in square kilometer
110  qint64 m_population; // population in number of inhabitants
111  QString m_state; // State
112  bool m_isBalloonVisible; //Visibility of balloon
113 };
114 
115 } // namespace Marble
116 
117 #endif
Marble::GeoDataPlacemarkPrivate::operator=
GeoDataPlacemarkPrivate & operator=(const GeoDataPlacemarkPrivate &other)
Definition: GeoDataPlacemark_p.h:39
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::GeoDataPlacemarkPrivate::m_isBalloonVisible
bool m_isBalloonVisible
Definition: GeoDataPlacemark_p.h:112
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:96
Marble::GeoDataPlacemarkPrivate::~GeoDataPlacemarkPrivate
virtual ~GeoDataPlacemarkPrivate()
Definition: GeoDataPlacemark_p.h:34
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:66
Marble::GeoDataPlacemarkPrivate::copy
virtual GeoDataFeaturePrivate * copy()
Definition: GeoDataPlacemark_p.h:89
GeoDataTrack.h
Marble::GeoDataLinearRingId
Definition: Serializable.h:44
Marble::GeoDataPlacemarkPrivate::featureId
virtual EnumFeatureId featureId() const
Definition: GeoDataPlacemark_p.h:101
Marble::GeoDataFeaturePrivate
Definition: GeoDataFeature_p.h:31
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:108
Marble::GeoDataMultiGeometryId
Definition: Serializable.h:46
Marble::GeoDataPlacemarkPrivate::m_area
qreal m_area
Definition: GeoDataPlacemark_p.h:109
QString
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:110
GeoDataMultiTrack.h
Marble::GeoDataTrackId
Definition: Serializable.h:49
Marble::EnumFeatureId
EnumFeatureId
Definition: Serializable.h:30
Marble::GeoDataFeaturePrivate::operator=
GeoDataFeaturePrivate & operator=(const GeoDataFeaturePrivate &other)
Definition: GeoDataFeature_p.h:82
Marble::GeoDataPlacemarkId
Definition: Serializable.h:34
Marble::GeoDataPlacemarkPrivate::m_state
QString m_state
Definition: GeoDataPlacemark_p.h:111
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:107
Marble::GeoDataGeometry::geometryId
virtual EnumGeometryId geometryId() const
Definition: GeoDataGeometry.cpp:82
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:39 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
  • 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