• 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
GeoDataLocation.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 Sanjiban Bairagya <sanjiban22393@gmail.com>
9 //
10 
11 #include "GeoDataLocation.h"
12 #include "GeoDataTypes.h"
13 #include "GeoDataCoordinates.h"
14 
15 namespace Marble {
16 
17 class GeoDataLocationPrivate
18 {
19 public:
20 
21  GeoDataCoordinates m_coordinates;
22 
23  GeoDataLocationPrivate();
24 };
25 
26 GeoDataLocationPrivate::GeoDataLocationPrivate() :
27  m_coordinates()
28 {
29  // nothing to do
30 }
31 
32 GeoDataLocation::GeoDataLocation() : d( new GeoDataLocationPrivate )
33 {
34  // nothing to do
35 }
36 
37 GeoDataLocation::GeoDataLocation( const Marble::GeoDataLocation &other ) :
38  GeoDataObject( other ), d( new GeoDataLocationPrivate( *other.d ) )
39 {
40  // nothing to do
41 }
42 
43 GeoDataLocation &GeoDataLocation::operator=( const GeoDataLocation &other )
44 {
45  GeoDataObject::operator=( other );
46  *d = *other.d;
47  return *this;
48 }
49 
50 GeoDataLocation::~GeoDataLocation()
51 {
52  delete d;
53 }
54 
55 const char *GeoDataLocation::nodeType() const
56 {
57  return GeoDataTypes::GeoDataLocationType;
58 }
59 
60 qreal GeoDataLocation::altitude() const
61 {
62  return d->m_coordinates.altitude();
63 }
64 
65 void GeoDataLocation::setAltitude(qreal altitude)
66 {
67 
68  d->m_coordinates.setAltitude(altitude);
69 }
70 
71 qreal GeoDataLocation::latitude(GeoDataCoordinates::Unit unit) const
72 {
73  return d->m_coordinates.latitude(unit);
74 }
75 
76 void GeoDataLocation::setLatitude(qreal latitude, GeoDataCoordinates::Unit unit)
77 {
78  d->m_coordinates.setLatitude(latitude, unit);
79 }
80 
81 qreal GeoDataLocation::longitude( GeoDataCoordinates::Unit unit ) const
82 {
83  return d->m_coordinates.longitude(unit);
84 }
85 
86 void GeoDataLocation::setLongitude(qreal longitude, GeoDataCoordinates::Unit unit)
87 {
88  d->m_coordinates.setLongitude(longitude, unit);
89 }
90 
91 
92 }
Marble::GeoDataCoordinates::Unit
Unit
enum used constructor to specify the units used
Definition: GeoDataCoordinates.h:64
GeoDataCoordinates.h
Marble::GeoDataLocation::nodeType
virtual const char * nodeType() const
Provides type information for downcasting a GeoNode.
Definition: GeoDataLocation.cpp:55
Marble::GeoDataLocation::altitude
qreal altitude() const
Returns the distance to earth's surface in meters, interpreted according to altitudeMode.
Definition: GeoDataLocation.cpp:60
Marble::GeoDataLocation::~GeoDataLocation
~GeoDataLocation()
Definition: GeoDataLocation.cpp:50
Marble::GeoDataObject
A base class for all geodata objects.
Definition: GeoDataObject.h:48
Marble::GeoDataLocation::longitude
qreal longitude(GeoDataCoordinates::Unit) const
Definition: GeoDataLocation.cpp:81
Marble::GeoDataLocation::setLatitude
void setLatitude(qreal latitude, GeoDataCoordinates::Unit unit)
Definition: GeoDataLocation.cpp:76
Marble::GeoDataLocation::setAltitude
void setAltitude(qreal altitude)
Definition: GeoDataLocation.cpp:65
Marble::GeoDataLocation::d
GeoDataLocationPrivate *const d
Definition: GeoDataLocation.h:51
GeoDataLocation.h
Marble::GeoDataTypes::GeoDataLocationType
const char * GeoDataLocationType
Definition: GeoDataTypes.cpp:52
Marble::GeoDataLocation::latitude
qreal latitude(GeoDataCoordinates::Unit) const
Definition: GeoDataLocation.cpp:71
Marble::GeoDataLocation::operator=
GeoDataLocation & operator=(const GeoDataLocation &other)
Definition: GeoDataLocation.cpp:43
Marble::GeoDataLocation
Definition: GeoDataLocation.h:23
Marble::GeoDataObject::operator=
GeoDataObject & operator=(const GeoDataObject &)
Definition: GeoDataObject.cpp:54
GeoDataTypes.h
Marble::GeoDataLocation::GeoDataLocation
GeoDataLocation()
Definition: GeoDataLocation.cpp:32
Marble::GeoDataLocation::setLongitude
void setLongitude(qreal longitude, GeoDataCoordinates::Unit unit)
Definition: GeoDataLocation.cpp:86
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