File indexing completed on 2025-01-05 03:58:58
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2012 Dennis Nienhüser <nienhueser@kde.org> 0004 // SPDX-FileCopyrightText: 2013 Mohammed Nafees <nafees.technocool@gmail.com> 0005 // 0006 0007 #include "GeoDataPhotoOverlay.h" 0008 #include "GeoDataPhotoOverlay_p.h" 0009 0010 namespace Marble { 0011 0012 GeoDataPhotoOverlay::GeoDataPhotoOverlay() 0013 : GeoDataOverlay(new GeoDataPhotoOverlayPrivate) 0014 { 0015 // nothing to do 0016 } 0017 0018 GeoDataPhotoOverlay::GeoDataPhotoOverlay(const GeoDataPhotoOverlay &other) 0019 : GeoDataOverlay(other, new GeoDataPhotoOverlayPrivate(*other.d_func())) 0020 { 0021 // nothing to do 0022 } 0023 0024 GeoDataPhotoOverlay::~GeoDataPhotoOverlay() 0025 { 0026 } 0027 0028 GeoDataPhotoOverlay &GeoDataPhotoOverlay::operator=( const GeoDataPhotoOverlay &other ) 0029 { 0030 if (this != &other) { 0031 Q_D(GeoDataPhotoOverlay); 0032 *d = *other.d_func(); 0033 } 0034 0035 return *this; 0036 } 0037 0038 bool GeoDataPhotoOverlay::operator==(const GeoDataPhotoOverlay& other) const 0039 { 0040 Q_D(const GeoDataPhotoOverlay); 0041 const GeoDataPhotoOverlayPrivate* const other_d = other.d_func(); 0042 0043 return equals(other) && 0044 d->m_rotation == other_d->m_rotation && 0045 d->m_shape == other_d->m_shape && 0046 d->m_imagePyramid == other_d->m_imagePyramid && 0047 d->m_point == other_d->m_point && 0048 d->m_viewVolume == other_d->m_viewVolume; 0049 } 0050 0051 bool GeoDataPhotoOverlay::operator!=(const GeoDataPhotoOverlay& other) const 0052 { 0053 return (! this->operator == (other)); 0054 } 0055 0056 GeoDataFeature * GeoDataPhotoOverlay::clone() const 0057 { 0058 return (new GeoDataPhotoOverlay(*this)); 0059 } 0060 0061 const char* GeoDataPhotoOverlay::nodeType() const 0062 { 0063 Q_D(const GeoDataPhotoOverlay); 0064 Q_UNUSED(d); 0065 return GeoDataTypes::GeoDataPhotoOverlayType; 0066 } 0067 0068 qreal GeoDataPhotoOverlay::rotation() const 0069 { 0070 Q_D(const GeoDataPhotoOverlay); 0071 return d->m_rotation; 0072 } 0073 0074 void GeoDataPhotoOverlay::setRotation( const qreal rotation ) 0075 { 0076 Q_D(GeoDataPhotoOverlay); 0077 d->m_rotation = rotation; 0078 } 0079 0080 GeoDataViewVolume& GeoDataPhotoOverlay::viewVolume() 0081 { 0082 Q_D(GeoDataPhotoOverlay); 0083 return d->m_viewVolume; 0084 } 0085 0086 const GeoDataViewVolume& GeoDataPhotoOverlay::viewVolume() const 0087 { 0088 Q_D(const GeoDataPhotoOverlay); 0089 return d->m_viewVolume; 0090 } 0091 0092 void GeoDataPhotoOverlay::setViewVolume( const GeoDataViewVolume &viewVolume ) 0093 { 0094 Q_D(GeoDataPhotoOverlay); 0095 d->m_viewVolume = viewVolume; 0096 } 0097 0098 GeoDataImagePyramid& GeoDataPhotoOverlay::imagePyramid() 0099 { 0100 Q_D(GeoDataPhotoOverlay); 0101 return d->m_imagePyramid; 0102 } 0103 0104 const GeoDataImagePyramid& GeoDataPhotoOverlay::imagePyramid() const 0105 { 0106 Q_D(const GeoDataPhotoOverlay); 0107 return d->m_imagePyramid; 0108 } 0109 0110 void GeoDataPhotoOverlay::setImagePyramid( const GeoDataImagePyramid &imagePyramid ) 0111 { 0112 Q_D(GeoDataPhotoOverlay); 0113 d->m_imagePyramid = imagePyramid; 0114 } 0115 0116 GeoDataPoint& GeoDataPhotoOverlay::point() 0117 { 0118 Q_D(GeoDataPhotoOverlay); 0119 return d->m_point; 0120 } 0121 0122 const GeoDataPoint& GeoDataPhotoOverlay::point() const 0123 { 0124 Q_D(const GeoDataPhotoOverlay); 0125 return d->m_point; 0126 } 0127 0128 void GeoDataPhotoOverlay::setPoint( const GeoDataPoint &point ) 0129 { 0130 Q_D(GeoDataPhotoOverlay); 0131 d->m_point = point; 0132 } 0133 0134 GeoDataPhotoOverlay::Shape GeoDataPhotoOverlay::shape() const 0135 { 0136 Q_D(const GeoDataPhotoOverlay); 0137 return d->m_shape; 0138 } 0139 0140 void GeoDataPhotoOverlay::setShape( Shape shape ) 0141 { 0142 Q_D(GeoDataPhotoOverlay); 0143 d->m_shape = shape; 0144 } 0145 0146 }