File indexing completed on 2024-05-12 03:50:15

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     return GeoDataTypes::GeoDataPhotoOverlayType;
0065 }
0066 
0067 qreal GeoDataPhotoOverlay::rotation() const
0068 {
0069     Q_D(const GeoDataPhotoOverlay);
0070     return d->m_rotation;
0071 }
0072 
0073 void GeoDataPhotoOverlay::setRotation( const qreal rotation )
0074 {
0075     Q_D(GeoDataPhotoOverlay);
0076     d->m_rotation = rotation;
0077 }
0078 
0079 GeoDataViewVolume& GeoDataPhotoOverlay::viewVolume()
0080 {
0081     Q_D(GeoDataPhotoOverlay);
0082     return d->m_viewVolume;
0083 }
0084 
0085 const GeoDataViewVolume& GeoDataPhotoOverlay::viewVolume() const
0086 {
0087     Q_D(const GeoDataPhotoOverlay);
0088     return d->m_viewVolume;
0089 }
0090 
0091 void GeoDataPhotoOverlay::setViewVolume( const GeoDataViewVolume &viewVolume )
0092 {
0093     Q_D(GeoDataPhotoOverlay);
0094     d->m_viewVolume = viewVolume;
0095 }
0096 
0097 GeoDataImagePyramid& GeoDataPhotoOverlay::imagePyramid()
0098 {
0099     Q_D(GeoDataPhotoOverlay);
0100     return d->m_imagePyramid;
0101 }
0102 
0103 const GeoDataImagePyramid& GeoDataPhotoOverlay::imagePyramid() const
0104 {
0105     Q_D(const GeoDataPhotoOverlay);
0106     return d->m_imagePyramid;
0107 }
0108 
0109 void GeoDataPhotoOverlay::setImagePyramid( const GeoDataImagePyramid &imagePyramid )
0110 {
0111     Q_D(GeoDataPhotoOverlay);
0112     d->m_imagePyramid = imagePyramid;
0113 }
0114 
0115 GeoDataPoint& GeoDataPhotoOverlay::point()
0116 {
0117     Q_D(GeoDataPhotoOverlay);
0118     return d->m_point;
0119 }
0120 
0121 const GeoDataPoint& GeoDataPhotoOverlay::point() const
0122 {
0123     Q_D(const GeoDataPhotoOverlay);
0124     return d->m_point;
0125 }
0126 
0127 void GeoDataPhotoOverlay::setPoint( const GeoDataPoint &point )
0128 {
0129     Q_D(GeoDataPhotoOverlay);
0130     d->m_point = point;
0131 }
0132 
0133 GeoDataPhotoOverlay::Shape GeoDataPhotoOverlay::shape() const
0134 {
0135     Q_D(const GeoDataPhotoOverlay);
0136     return d->m_shape;
0137 }
0138 
0139 void GeoDataPhotoOverlay::setShape( Shape shape )
0140 {
0141     Q_D(GeoDataPhotoOverlay);
0142     d->m_shape = shape;
0143 }
0144 
0145 }