Marble

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

KDE's Doxygen guidelines are available online.