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
9namespace Marble
10{
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) && d->m_altitude == other_d->m_altitude && d->m_altitudeMode == other_d->m_altitudeMode && d->m_latLonBox == other_d->m_latLonBox
40 && d->m_latLonQuad == other_d->m_latLonQuad;
41}
42
43bool GeoDataGroundOverlay::operator!=(const GeoDataGroundOverlay &other) const
44{
45 return !this->operator==(other);
46}
47
48GeoDataGroundOverlay::~GeoDataGroundOverlay() = default;
49
50GeoDataFeature *GeoDataGroundOverlay::clone() const
51{
52 return new GeoDataGroundOverlay(*this);
53}
54
55const char *GeoDataGroundOverlay::nodeType() const
56{
57 return GeoDataTypes::GeoDataGroundOverlayType;
58}
59
60double GeoDataGroundOverlay::altitude() const
61{
62 Q_D(const GeoDataGroundOverlay);
63 return d->m_altitude;
64}
65
66void GeoDataGroundOverlay::setAltitude(double altitude)
67{
68 Q_D(GeoDataGroundOverlay);
69 d->m_altitude = altitude;
70}
71
72AltitudeMode GeoDataGroundOverlay::altitudeMode() const
73{
74 Q_D(const GeoDataGroundOverlay);
75 return d->m_altitudeMode;
76}
77
78void GeoDataGroundOverlay::setAltitudeMode(const AltitudeMode altitudeMode)
79{
80 Q_D(GeoDataGroundOverlay);
81 d->m_altitudeMode = altitudeMode;
82}
83
84GeoDataLatLonBox &GeoDataGroundOverlay::latLonBox()
85{
86 Q_D(GeoDataGroundOverlay);
87 return d->m_latLonBox;
88}
89
90const GeoDataLatLonBox &GeoDataGroundOverlay::latLonBox() const
91{
92 Q_D(const GeoDataGroundOverlay);
93 return d->m_latLonBox;
94}
95
96void GeoDataGroundOverlay::setLatLonBox(const GeoDataLatLonBox &box)
97{
98 Q_D(GeoDataGroundOverlay);
99 d->m_latLonBox = box;
100}
101
102GeoDataLatLonQuad &GeoDataGroundOverlay::latLonQuad()
103{
104 Q_D(GeoDataGroundOverlay);
105 return d->m_latLonQuad;
106}
107
108const GeoDataLatLonQuad &GeoDataGroundOverlay::latLonQuad() const
109{
110 Q_D(const GeoDataGroundOverlay);
111 return d->m_latLonQuad;
112}
113
114void GeoDataGroundOverlay::setLatLonQuad(const GeoDataLatLonQuad &quad)
115{
116 Q_D(GeoDataGroundOverlay);
117 d->m_latLonQuad = quad;
118}
119
120}
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 Mon Nov 18 2024 12:15:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.