File indexing completed on 2025-01-05 03:59:00
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2013 Mayank Madan <maddiemadan@gmail.com> 0004 // SPDX-FileCopyrightText: Sanjiban Bairagya <sanjiban22393@gmail.com> 0005 // 0006 0007 #include "GeoDataScale.h" 0008 #include "GeoDataTypes.h" 0009 0010 namespace Marble { 0011 0012 class GeoDataScalePrivate 0013 { 0014 public: 0015 double m_x; 0016 0017 double m_y; 0018 0019 double m_z; 0020 0021 GeoDataScalePrivate(); 0022 }; 0023 0024 GeoDataScalePrivate::GeoDataScalePrivate() : 0025 m_x(1), m_y(1), m_z(1) 0026 { 0027 // nothing to do 0028 } 0029 0030 GeoDataScale::GeoDataScale() : d( new GeoDataScalePrivate ) 0031 { 0032 // nothing to do 0033 } 0034 0035 GeoDataScale::GeoDataScale( const Marble::GeoDataScale &other ) : 0036 GeoDataObject( other ), d( new GeoDataScalePrivate( *other.d ) ) 0037 { 0038 // nothing to do 0039 } 0040 0041 GeoDataScale &GeoDataScale::operator=( const GeoDataScale &other ) 0042 { 0043 GeoDataObject::operator=( other ); 0044 *d = *other.d; 0045 return *this; 0046 } 0047 0048 0049 bool GeoDataScale::operator==( const GeoDataScale &other ) const 0050 { 0051 return equals(other) && 0052 d->m_x == other.d->m_x && 0053 d->m_y == other.d->m_y && 0054 d->m_z == other.d->m_z; 0055 } 0056 0057 bool GeoDataScale::operator!=( const GeoDataScale &other ) const 0058 { 0059 return !this->operator==( other ); 0060 } 0061 0062 GeoDataScale::~GeoDataScale() 0063 { 0064 delete d; 0065 } 0066 0067 const char *GeoDataScale::nodeType() const 0068 { 0069 return GeoDataTypes::GeoDataScaleType; 0070 } 0071 0072 double GeoDataScale::x() const 0073 { 0074 return d->m_x; 0075 } 0076 0077 void GeoDataScale::setX( double x ) 0078 { 0079 d->m_x = x; 0080 } 0081 0082 double GeoDataScale::y() const 0083 { 0084 return d->m_y; 0085 } 0086 0087 void GeoDataScale::setY( double y ) 0088 { 0089 d->m_y = y; 0090 } 0091 0092 double GeoDataScale::z() const 0093 { 0094 return d->m_z; 0095 } 0096 0097 void GeoDataScale::setZ( double z ) 0098 { 0099 d->m_z = z; 0100 } 0101 0102 }