Marble

GeoDataGroundOverlay.cpp
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2012 Dennis Nienhüser <[email protected]>
4 //
5 
6 #include "GeoDataGroundOverlay.h"
7 #include "GeoDataGroundOverlay_p.h"
8 
9 
10 namespace Marble {
11 
12 GeoDataGroundOverlay::GeoDataGroundOverlay()
13  : GeoDataOverlay(new GeoDataGroundOverlayPrivate)
14 {
15  // nothing to do
16 }
17 
18 GeoDataGroundOverlay::GeoDataGroundOverlay(const GeoDataGroundOverlay &other)
19  : GeoDataOverlay(other, new GeoDataGroundOverlayPrivate(*other.d_func()))
20 {
21  // nothing to do
22 }
23 
24 GeoDataGroundOverlay &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 
34 bool 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 
46 bool GeoDataGroundOverlay::operator!=(const GeoDataGroundOverlay& other) const
47 {
48  return !this->operator==(other);
49 }
50 
51 GeoDataGroundOverlay::~GeoDataGroundOverlay()
52 {
53 }
54 
55 GeoDataFeature * GeoDataGroundOverlay::clone() const
56 {
57  return new GeoDataGroundOverlay(*this);
58 }
59 
60 const char *GeoDataGroundOverlay::nodeType() const
61 {
62  return GeoDataTypes::GeoDataGroundOverlayType;
63 }
64 
65 double GeoDataGroundOverlay::altitude() const
66 {
67  Q_D(const GeoDataGroundOverlay);
68  return d->m_altitude;
69 }
70 
71 void GeoDataGroundOverlay::setAltitude( double altitude )
72 {
73  Q_D(GeoDataGroundOverlay);
74  d->m_altitude = altitude;
75 }
76 
77 AltitudeMode GeoDataGroundOverlay::altitudeMode() const
78 {
79  Q_D(const GeoDataGroundOverlay);
80  return d->m_altitudeMode;
81 }
82 
83 void GeoDataGroundOverlay::setAltitudeMode( const AltitudeMode altitudeMode )
84 {
85  Q_D(GeoDataGroundOverlay);
86  d->m_altitudeMode = altitudeMode;
87 }
88 
89 GeoDataLatLonBox &GeoDataGroundOverlay::latLonBox()
90 {
91  Q_D(GeoDataGroundOverlay);
92  return d->m_latLonBox;
93 }
94 
95 const GeoDataLatLonBox &GeoDataGroundOverlay::latLonBox() const
96 {
97  Q_D(const GeoDataGroundOverlay);
98  return d->m_latLonBox;
99 }
100 
101 void GeoDataGroundOverlay::setLatLonBox( const GeoDataLatLonBox &box )
102 {
103  Q_D(GeoDataGroundOverlay);
104  d->m_latLonBox = box;
105 }
106 
107 GeoDataLatLonQuad &GeoDataGroundOverlay::latLonQuad()
108 {
109  Q_D(GeoDataGroundOverlay);
110  return d->m_latLonQuad;
111 }
112 
113 const GeoDataLatLonQuad &GeoDataGroundOverlay::latLonQuad() const
114 {
115  Q_D(const GeoDataGroundOverlay);
116  return d->m_latLonQuad;
117 }
118 
119 void GeoDataGroundOverlay::setLatLonQuad(const GeoDataLatLonQuad& quad)
120 {
121  Q_D(GeoDataGroundOverlay);
122  d->m_latLonQuad = quad;
123 }
124 
125 }
bool operator==(const Qt3DRender::QGraphicsApiFilter &reference, const Qt3DRender::QGraphicsApiFilter &sample)
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-2023 The KDE developers.
Generated on Mon Oct 2 2023 03:52:08 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.