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
12class GeoDataScalePrivate
13{
14public:
15 double m_x;
16
17 double m_y;
18
19 double m_z;
20
21 GeoDataScalePrivate();
22};
23
24GeoDataScalePrivate::GeoDataScalePrivate() :
25 m_x(1), m_y(1), m_z(1)
26{
27 // nothing to do
28}
29
30GeoDataScale::GeoDataScale() : d( new GeoDataScalePrivate )
31{
32 // nothing to do
33}
34
35GeoDataScale::GeoDataScale( const Marble::GeoDataScale &other ) :
36 GeoDataObject( other ), d( new GeoDataScalePrivate( *other.d ) )
37{
38 // nothing to do
39}
40
41GeoDataScale &GeoDataScale::operator=( const GeoDataScale &other )
42{
43 GeoDataObject::operator=( other );
44 *d = *other.d;
45 return *this;
46}
47
48
49bool 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
57bool GeoDataScale::operator!=( const GeoDataScale &other ) const
58{
59 return !this->operator==( other );
60}
61
62GeoDataScale::~GeoDataScale()
63{
64 delete d;
65}
66
67const char *GeoDataScale::nodeType() const
68{
69 return GeoDataTypes::GeoDataScaleType;
70}
71
72double GeoDataScale::x() const
73{
74 return d->m_x;
75}
76
77void GeoDataScale::setX( double x )
78{
79 d->m_x = x;
80}
81
82double GeoDataScale::y() const
83{
84 return d->m_y;
85}
86
87void GeoDataScale::setY( double y )
88{
89 d->m_y = y;
90}
91
92double GeoDataScale::z() const
93{
94 return d->m_z;
95}
96
97void GeoDataScale::setZ( double z )
98{
99 d->m_z = z;
100}
101
102}
bool equals(const QVariant &lhs, const QVariant &rhs)
Binds a QML item to a specific geodetic location in screen coordinates.
bool operator==(const QGraphicsApiFilter &reference, const QGraphicsApiFilter &sample)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:18:17 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.