Marble

GeoDataPhotoOverlay.cpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2012 Dennis Nienhüser <nienhueser@kde.org>
4// SPDX-FileCopyrightText: 2013 Mohammed Nafees <nafees.technocool@gmail.com>
5//
6
7#include "GeoDataPhotoOverlay.h"
8#include "GeoDataPhotoOverlay_p.h"
9
10namespace Marble
11{
12
13GeoDataPhotoOverlay::GeoDataPhotoOverlay()
14 : GeoDataOverlay(new GeoDataPhotoOverlayPrivate)
15{
16 // nothing to do
17}
18
19GeoDataPhotoOverlay::GeoDataPhotoOverlay(const GeoDataPhotoOverlay &other)
20 : GeoDataOverlay(other, new GeoDataPhotoOverlayPrivate(*other.d_func()))
21{
22 // nothing to do
23}
24
25GeoDataPhotoOverlay::~GeoDataPhotoOverlay() = default;
26
27GeoDataPhotoOverlay &GeoDataPhotoOverlay::operator=(const GeoDataPhotoOverlay &other)
28{
29 if (this != &other) {
30 Q_D(GeoDataPhotoOverlay);
31 *d = *other.d_func();
32 }
33
34 return *this;
35}
36
37bool GeoDataPhotoOverlay::operator==(const GeoDataPhotoOverlay &other) const
38{
39 Q_D(const GeoDataPhotoOverlay);
40 const GeoDataPhotoOverlayPrivate *const other_d = other.d_func();
41
42 return equals(other) && d->m_rotation == other_d->m_rotation && d->m_shape == other_d->m_shape && d->m_imagePyramid == other_d->m_imagePyramid
43 && d->m_point == other_d->m_point && d->m_viewVolume == other_d->m_viewVolume;
44}
45
46bool GeoDataPhotoOverlay::operator!=(const GeoDataPhotoOverlay &other) const
47{
48 return !this->operator==(other);
49}
50
51GeoDataFeature *GeoDataPhotoOverlay::clone() const
52{
53 return new GeoDataPhotoOverlay(*this);
54}
55
56const char *GeoDataPhotoOverlay::nodeType() const
57{
58 Q_D(const GeoDataPhotoOverlay);
59 return GeoDataTypes::GeoDataPhotoOverlayType;
60}
61
62qreal GeoDataPhotoOverlay::rotation() const
63{
64 Q_D(const GeoDataPhotoOverlay);
65 return d->m_rotation;
66}
67
68void GeoDataPhotoOverlay::setRotation(const qreal rotation)
69{
70 Q_D(GeoDataPhotoOverlay);
71 d->m_rotation = rotation;
72}
73
74GeoDataViewVolume &GeoDataPhotoOverlay::viewVolume()
75{
76 Q_D(GeoDataPhotoOverlay);
77 return d->m_viewVolume;
78}
79
80const GeoDataViewVolume &GeoDataPhotoOverlay::viewVolume() const
81{
82 Q_D(const GeoDataPhotoOverlay);
83 return d->m_viewVolume;
84}
85
86void GeoDataPhotoOverlay::setViewVolume(const GeoDataViewVolume &viewVolume)
87{
88 Q_D(GeoDataPhotoOverlay);
89 d->m_viewVolume = viewVolume;
90}
91
92GeoDataImagePyramid &GeoDataPhotoOverlay::imagePyramid()
93{
94 Q_D(GeoDataPhotoOverlay);
95 return d->m_imagePyramid;
96}
97
98const GeoDataImagePyramid &GeoDataPhotoOverlay::imagePyramid() const
99{
100 Q_D(const GeoDataPhotoOverlay);
101 return d->m_imagePyramid;
102}
103
104void GeoDataPhotoOverlay::setImagePyramid(const GeoDataImagePyramid &imagePyramid)
105{
106 Q_D(GeoDataPhotoOverlay);
107 d->m_imagePyramid = imagePyramid;
108}
109
110GeoDataPoint &GeoDataPhotoOverlay::point()
111{
112 Q_D(GeoDataPhotoOverlay);
113 return d->m_point;
114}
115
116const GeoDataPoint &GeoDataPhotoOverlay::point() const
117{
118 Q_D(const GeoDataPhotoOverlay);
119 return d->m_point;
120}
121
122void GeoDataPhotoOverlay::setPoint(const GeoDataPoint &point)
123{
124 Q_D(GeoDataPhotoOverlay);
125 d->m_point = point;
126}
127
128GeoDataPhotoOverlay::Shape GeoDataPhotoOverlay::shape() const
129{
130 Q_D(const GeoDataPhotoOverlay);
131 return d->m_shape;
132}
133
134void GeoDataPhotoOverlay::setShape(Shape shape)
135{
136 Q_D(GeoDataPhotoOverlay);
137 d->m_shape = shape;
138}
139
140}
bool equals(const QVariant &lhs, const QVariant &rhs)
bool operator==(const StyleDelim &l, const StyleDelim &r)
Binds a QML item to a specific geodetic location in screen coordinates.
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 6 2024 12:08:52 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.