Marble

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

KDE's Doxygen guidelines are available online.