Marble

GeoDataOrientation.cpp
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2013 Sanjiban Bairagya <[email protected]>
4 //
5 
6 #include "GeoDataOrientation.h"
7 #include "GeoDataTypes.h"
8 
9 namespace Marble {
10 
11 class GeoDataOrientationPrivate
12 {
13 public:
14  double m_heading;
15 
16  double m_tilt;
17 
18  double m_roll;
19 
20  GeoDataOrientationPrivate();
21 };
22 
23 GeoDataOrientationPrivate::GeoDataOrientationPrivate() :
24  m_heading(0), m_tilt(0), m_roll(0)
25 {
26  // nothing to do
27 }
28 
29 GeoDataOrientation::GeoDataOrientation() : d( new GeoDataOrientationPrivate )
30 {
31  // nothing to do
32 }
33 
34 GeoDataOrientation::GeoDataOrientation( const Marble::GeoDataOrientation &other ) :
35  GeoDataObject( other ), d( new GeoDataOrientationPrivate( *other.d ) )
36 {
37  // nothing to do
38 }
39 
40 GeoDataOrientation &GeoDataOrientation::operator=( const GeoDataOrientation &other )
41 {
42  GeoDataObject::operator=( other );
43  *d = *other.d;
44  return *this;
45 }
46 
47 
48 bool GeoDataOrientation::operator==( const GeoDataOrientation &other ) const
49 {
50  return equals(other) &&
51  d->m_heading == other.d->m_heading &&
52  d->m_roll == other.d->m_roll &&
53  d->m_tilt == other.d->m_tilt;
54 }
55 
56 bool GeoDataOrientation::operator!=( const GeoDataOrientation &other ) const
57 {
58  return !this->operator==( other );
59 }
60 
61 GeoDataOrientation::~GeoDataOrientation()
62 {
63  delete d;
64 }
65 
66 const char *GeoDataOrientation::nodeType() const
67 {
68  return GeoDataTypes::GeoDataOrientationType;
69 }
70 
71 double GeoDataOrientation::heading() const
72 {
73  return d->m_heading;
74 }
75 
76 void GeoDataOrientation::setHeading( double heading )
77 {
78  d->m_heading = heading;
79 }
80 
81 double GeoDataOrientation::tilt() const
82 {
83  return d->m_tilt;
84 }
85 
86 void GeoDataOrientation::setTilt( double tilt )
87 {
88  d->m_tilt = tilt;
89 }
90 
91 double GeoDataOrientation::roll() const
92 {
93  return d->m_roll;
94 }
95 
96 void GeoDataOrientation::setRoll( double roll )
97 {
98  d->m_roll = roll;
99 }
100 
101 }
QAction * roll(const QObject *recvr, const char *slot, QObject *parent)
bool operator==(const Qt3DRender::QGraphicsApiFilter &reference, const Qt3DRender::QGraphicsApiFilter &sample)
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 21 2023 04:12:26 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.