Marble

GeoDataScale.cpp
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2013 Mayank Madan <[email protected]>
4 // SPDX-FileCopyrightText: Sanjiban Bairagya <[email protected]>
5 //
6 
7 #include "GeoDataScale.h"
8 #include "GeoDataTypes.h"
9 
10 namespace Marble {
11 
12 class GeoDataScalePrivate
13 {
14 public:
15  double m_x;
16 
17  double m_y;
18 
19  double m_z;
20 
21  GeoDataScalePrivate();
22 };
23 
24 GeoDataScalePrivate::GeoDataScalePrivate() :
25  m_x(1), m_y(1), m_z(1)
26 {
27  // nothing to do
28 }
29 
30 GeoDataScale::GeoDataScale() : d( new GeoDataScalePrivate )
31 {
32  // nothing to do
33 }
34 
35 GeoDataScale::GeoDataScale( const Marble::GeoDataScale &other ) :
36  GeoDataObject( other ), d( new GeoDataScalePrivate( *other.d ) )
37 {
38  // nothing to do
39 }
40 
41 GeoDataScale &GeoDataScale::operator=( const GeoDataScale &other )
42 {
43  GeoDataObject::operator=( other );
44  *d = *other.d;
45  return *this;
46 }
47 
48 
49 bool GeoDataScale::operator==( const GeoDataScale &other ) const
50 {
51  return equals(other) &&
52  d->m_x == other.d->m_x &&
53  d->m_y == other.d->m_y &&
54  d->m_z == other.d->m_z;
55 }
56 
57 bool GeoDataScale::operator!=( const GeoDataScale &other ) const
58 {
59  return !this->operator==( other );
60 }
61 
62 GeoDataScale::~GeoDataScale()
63 {
64  delete d;
65 }
66 
67 const char *GeoDataScale::nodeType() const
68 {
69  return GeoDataTypes::GeoDataScaleType;
70 }
71 
72 double GeoDataScale::x() const
73 {
74  return d->m_x;
75 }
76 
77 void GeoDataScale::setX( double x )
78 {
79  d->m_x = x;
80 }
81 
82 double GeoDataScale::y() const
83 {
84  return d->m_y;
85 }
86 
87 void GeoDataScale::setY( double y )
88 {
89  d->m_y = y;
90 }
91 
92 double GeoDataScale::z() const
93 {
94  return d->m_z;
95 }
96 
97 void GeoDataScale::setZ( double z )
98 {
99  d->m_z = z;
100 }
101 
102 }
bool operator==(const Qt3DRender::QGraphicsApiFilter &reference, const Qt3DRender::QGraphicsApiFilter &sample)
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Oct 2 2023 03:52:08 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.