• 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
GeoDataScale.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 // Sanjiban Bairagya <sanjiban22393@gmail.com>
10 //
11 
12 #include "GeoDataScale.h"
13 #include "GeoDataTypes.h"
14 
15 namespace Marble {
16 
17 class GeoDataScalePrivate
18 {
19 public:
20  double m_x;
21 
22  double m_y;
23 
24  double m_z;
25 
26  GeoDataScalePrivate();
27 };
28 
29 GeoDataScalePrivate::GeoDataScalePrivate() :
30  m_x(1), m_y(1), m_z(1)
31 {
32  // nothing to do
33 }
34 
35 GeoDataScale::GeoDataScale() : d( new GeoDataScalePrivate )
36 {
37  // nothing to do
38 }
39 
40 GeoDataScale::GeoDataScale( const Marble::GeoDataScale &other ) :
41  GeoDataObject( other ), d( new GeoDataScalePrivate( *other.d ) )
42 {
43  // nothing to do
44 }
45 
46 GeoDataScale &GeoDataScale::operator=( const GeoDataScale &other )
47 {
48  GeoDataObject::operator=( other );
49  *d = *other.d;
50  return *this;
51 }
52 
53 
54 bool GeoDataScale::operator==( const GeoDataScale &other ) const
55 {
56  return equals(other) &&
57  d->m_x == other.d->m_x &&
58  d->m_y == other.d->m_y &&
59  d->m_z == other.d->m_z;
60 }
61 
62 bool GeoDataScale::operator!=( const GeoDataScale &other ) const
63 {
64  return !this->operator==( other );
65 }
66 
67 GeoDataScale::~GeoDataScale()
68 {
69  delete d;
70 }
71 
72 const char *GeoDataScale::nodeType() const
73 {
74  return GeoDataTypes::GeoDataScaleType;
75 }
76 
77 double GeoDataScale::x() const
78 {
79  return d->m_x;
80 }
81 
82 void GeoDataScale::setX( double x )
83 {
84  d->m_x = x;
85 }
86 
87 double GeoDataScale::y() const
88 {
89  return d->m_y;
90 }
91 
92 void GeoDataScale::setY( double y )
93 {
94  d->m_y = y;
95 }
96 
97 double GeoDataScale::z() const
98 {
99  return d->m_z;
100 }
101 
102 void GeoDataScale::setZ( double z )
103 {
104  d->m_z = z;
105 }
106 
107 }
Marble::GeoDataScale::setX
void setX(double x)
Definition: GeoDataScale.cpp:82
Marble::GeoDataScale::operator=
GeoDataScale & operator=(const GeoDataScale &other)
Definition: GeoDataScale.cpp:46
Marble::GeoDataObject
A base class for all geodata objects.
Definition: GeoDataObject.h:48
Marble::GeoDataObject::equals
virtual bool equals(const GeoDataObject &other) const
Compares the value of id and targetId of the two objects.
Definition: GeoDataObject.cpp:126
Marble::GeoDataScale::operator==
bool operator==(const GeoDataScale &other) const
Definition: GeoDataScale.cpp:54
Marble::GeoDataScale::z
double z() const
Definition: GeoDataScale.cpp:97
Marble::GeoDataScale::y
double y() const
Definition: GeoDataScale.cpp:87
Marble::GeoDataTypes::GeoDataScaleType
const char * GeoDataScaleType
Definition: GeoDataTypes.cpp:87
Marble::GeoDataScale::GeoDataScale
GeoDataScale()
Definition: GeoDataScale.cpp:35
Marble::GeoDataScale::setY
void setY(double y)
Definition: GeoDataScale.cpp:92
Marble::GeoDataScale::x
double x() const
Definition: GeoDataScale.cpp:77
Marble::GeoDataScale
Definition: GeoDataScale.h:22
Marble::GeoDataScale::operator!=
bool operator!=(const GeoDataScale &other) const
Definition: GeoDataScale.cpp:62
Marble::GeoDataScale::nodeType
virtual const char * nodeType() const
Provides type information for downcasting a GeoNode.
Definition: GeoDataScale.cpp:72
Marble::GeoDataObject::operator=
GeoDataObject & operator=(const GeoDataObject &)
Definition: GeoDataObject.cpp:54
GeoDataScale.h
Marble::GeoDataScale::~GeoDataScale
~GeoDataScale()
Definition: GeoDataScale.cpp:67
GeoDataTypes.h
Marble::GeoDataScale::setZ
void setZ(double z)
Definition: GeoDataScale.cpp:102
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