File indexing completed on 2024-05-12 03:50:11
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2012 Dennis Nienhüser <nienhueser@kde.org> 0004 // 0005 0006 #include "GeoDataGroundOverlay.h" 0007 #include "GeoDataGroundOverlay_p.h" 0008 0009 0010 namespace Marble { 0011 0012 GeoDataGroundOverlay::GeoDataGroundOverlay() 0013 : GeoDataOverlay(new GeoDataGroundOverlayPrivate) 0014 { 0015 // nothing to do 0016 } 0017 0018 GeoDataGroundOverlay::GeoDataGroundOverlay(const GeoDataGroundOverlay &other) 0019 : GeoDataOverlay(other, new GeoDataGroundOverlayPrivate(*other.d_func())) 0020 { 0021 // nothing to do 0022 } 0023 0024 GeoDataGroundOverlay &GeoDataGroundOverlay::operator=( const GeoDataGroundOverlay &other ) 0025 { 0026 if (this != &other) { 0027 Q_D(GeoDataGroundOverlay); 0028 *d = *other.d_func(); 0029 } 0030 0031 return *this; 0032 } 0033 0034 bool GeoDataGroundOverlay::operator==(const GeoDataGroundOverlay& other) const 0035 { 0036 Q_D(const GeoDataGroundOverlay); 0037 const GeoDataGroundOverlayPrivate* const other_d = other.d_func(); 0038 0039 return equals(other) && 0040 d->m_altitude == other_d->m_altitude && 0041 d->m_altitudeMode == other_d->m_altitudeMode && 0042 d->m_latLonBox == other_d->m_latLonBox && 0043 d->m_latLonQuad == other_d->m_latLonQuad; 0044 } 0045 0046 bool GeoDataGroundOverlay::operator!=(const GeoDataGroundOverlay& other) const 0047 { 0048 return !this->operator==(other); 0049 } 0050 0051 GeoDataGroundOverlay::~GeoDataGroundOverlay() 0052 { 0053 } 0054 0055 GeoDataFeature * GeoDataGroundOverlay::clone() const 0056 { 0057 return new GeoDataGroundOverlay(*this); 0058 } 0059 0060 const char *GeoDataGroundOverlay::nodeType() const 0061 { 0062 return GeoDataTypes::GeoDataGroundOverlayType; 0063 } 0064 0065 double GeoDataGroundOverlay::altitude() const 0066 { 0067 Q_D(const GeoDataGroundOverlay); 0068 return d->m_altitude; 0069 } 0070 0071 void GeoDataGroundOverlay::setAltitude( double altitude ) 0072 { 0073 Q_D(GeoDataGroundOverlay); 0074 d->m_altitude = altitude; 0075 } 0076 0077 AltitudeMode GeoDataGroundOverlay::altitudeMode() const 0078 { 0079 Q_D(const GeoDataGroundOverlay); 0080 return d->m_altitudeMode; 0081 } 0082 0083 void GeoDataGroundOverlay::setAltitudeMode( const AltitudeMode altitudeMode ) 0084 { 0085 Q_D(GeoDataGroundOverlay); 0086 d->m_altitudeMode = altitudeMode; 0087 } 0088 0089 GeoDataLatLonBox &GeoDataGroundOverlay::latLonBox() 0090 { 0091 Q_D(GeoDataGroundOverlay); 0092 return d->m_latLonBox; 0093 } 0094 0095 const GeoDataLatLonBox &GeoDataGroundOverlay::latLonBox() const 0096 { 0097 Q_D(const GeoDataGroundOverlay); 0098 return d->m_latLonBox; 0099 } 0100 0101 void GeoDataGroundOverlay::setLatLonBox( const GeoDataLatLonBox &box ) 0102 { 0103 Q_D(GeoDataGroundOverlay); 0104 d->m_latLonBox = box; 0105 } 0106 0107 GeoDataLatLonQuad &GeoDataGroundOverlay::latLonQuad() 0108 { 0109 Q_D(GeoDataGroundOverlay); 0110 return d->m_latLonQuad; 0111 } 0112 0113 const GeoDataLatLonQuad &GeoDataGroundOverlay::latLonQuad() const 0114 { 0115 Q_D(const GeoDataGroundOverlay); 0116 return d->m_latLonQuad; 0117 } 0118 0119 void GeoDataGroundOverlay::setLatLonQuad(const GeoDataLatLonQuad& quad) 0120 { 0121 Q_D(GeoDataGroundOverlay); 0122 d->m_latLonQuad = quad; 0123 } 0124 0125 }