Marble

GeoDataGroundOverlay.cpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2012 Dennis Nienhüser <nienhueser@kde.org>
4//
5
6#include "GeoDataGroundOverlay.h"
7#include "GeoDataGroundOverlay_p.h"
8
9
10namespace Marble {
11
12GeoDataGroundOverlay::GeoDataGroundOverlay()
13 : GeoDataOverlay(new GeoDataGroundOverlayPrivate)
14{
15 // nothing to do
16}
17
18GeoDataGroundOverlay::GeoDataGroundOverlay(const GeoDataGroundOverlay &other)
19 : GeoDataOverlay(other, new GeoDataGroundOverlayPrivate(*other.d_func()))
20{
21 // nothing to do
22}
23
24GeoDataGroundOverlay &GeoDataGroundOverlay::operator=( const GeoDataGroundOverlay &other )
25{
26 if (this != &other) {
27 Q_D(GeoDataGroundOverlay);
28 *d = *other.d_func();
29 }
30
31 return *this;
32}
33
34bool GeoDataGroundOverlay::operator==(const GeoDataGroundOverlay& other) const
35{
36 Q_D(const GeoDataGroundOverlay);
37 const GeoDataGroundOverlayPrivate* const other_d = other.d_func();
38
39 return equals(other) &&
40 d->m_altitude == other_d->m_altitude &&
41 d->m_altitudeMode == other_d->m_altitudeMode &&
42 d->m_latLonBox == other_d->m_latLonBox &&
43 d->m_latLonQuad == other_d->m_latLonQuad;
44}
45
46bool GeoDataGroundOverlay::operator!=(const GeoDataGroundOverlay& other) const
47{
48 return !this->operator==(other);
49}
50
51GeoDataGroundOverlay::~GeoDataGroundOverlay()
52{
53}
54
55GeoDataFeature * GeoDataGroundOverlay::clone() const
56{
57 return new GeoDataGroundOverlay(*this);
58}
59
60const char *GeoDataGroundOverlay::nodeType() const
61{
62 return GeoDataTypes::GeoDataGroundOverlayType;
63}
64
65double GeoDataGroundOverlay::altitude() const
66{
67 Q_D(const GeoDataGroundOverlay);
68 return d->m_altitude;
69}
70
71void GeoDataGroundOverlay::setAltitude( double altitude )
72{
73 Q_D(GeoDataGroundOverlay);
74 d->m_altitude = altitude;
75}
76
77AltitudeMode GeoDataGroundOverlay::altitudeMode() const
78{
79 Q_D(const GeoDataGroundOverlay);
80 return d->m_altitudeMode;
81}
82
83void GeoDataGroundOverlay::setAltitudeMode( const AltitudeMode altitudeMode )
84{
85 Q_D(GeoDataGroundOverlay);
86 d->m_altitudeMode = altitudeMode;
87}
88
89GeoDataLatLonBox &GeoDataGroundOverlay::latLonBox()
90{
91 Q_D(GeoDataGroundOverlay);
92 return d->m_latLonBox;
93}
94
95const GeoDataLatLonBox &GeoDataGroundOverlay::latLonBox() const
96{
97 Q_D(const GeoDataGroundOverlay);
98 return d->m_latLonBox;
99}
100
101void GeoDataGroundOverlay::setLatLonBox( const GeoDataLatLonBox &box )
102{
103 Q_D(GeoDataGroundOverlay);
104 d->m_latLonBox = box;
105}
106
107GeoDataLatLonQuad &GeoDataGroundOverlay::latLonQuad()
108{
109 Q_D(GeoDataGroundOverlay);
110 return d->m_latLonQuad;
111}
112
113const GeoDataLatLonQuad &GeoDataGroundOverlay::latLonQuad() const
114{
115 Q_D(const GeoDataGroundOverlay);
116 return d->m_latLonQuad;
117}
118
119void GeoDataGroundOverlay::setLatLonQuad(const GeoDataLatLonQuad& quad)
120{
121 Q_D(GeoDataGroundOverlay);
122 d->m_latLonQuad = quad;
123}
124
125}
bool equals(const QVariant &lhs, const QVariant &rhs)
Binds a QML item to a specific geodetic location in screen coordinates.
bool operator==(const QGraphicsApiFilter &reference, const QGraphicsApiFilter &sample)
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 14 2024 11:54:16 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.