Marble

GeoDataViewVolume.cpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2013 Mohammed Nafees <nafees.technocool@gmail.com>
4//
5
6#include "GeoDataViewVolume.h"
7
8#include "GeoDataTypes.h"
9
10namespace Marble
11{
12
13class GeoDataViewVolumePrivate
14{
15public:
16 GeoDataViewVolumePrivate();
17
18 qreal m_leftFov;
19 qreal m_rightFov;
20 qreal m_bottomFov;
21 qreal m_topFov;
22 qreal m_near;
23};
24
25GeoDataViewVolumePrivate::GeoDataViewVolumePrivate()
26 : m_leftFov()
27 , m_rightFov()
28 , m_bottomFov()
29 , m_topFov()
30 , m_near()
31{
32 // nothing to do
33}
34
35GeoDataViewVolume::GeoDataViewVolume()
36 : d(new GeoDataViewVolumePrivate)
37{
38 // nothing to do
39}
40
41GeoDataViewVolume::GeoDataViewVolume(const Marble::GeoDataViewVolume &other)
42 : GeoDataObject()
43 , d(new GeoDataViewVolumePrivate(*other.d))
44{
45 // nothing to do
46}
47
48GeoDataViewVolume &GeoDataViewVolume::operator=(const GeoDataViewVolume &other)
49{
50 GeoDataObject::operator=(other);
51 *d = *other.d;
52 return *this;
53}
54
55bool GeoDataViewVolume::operator==(const GeoDataViewVolume &other) const
56{
57 return equals(other) && d->m_leftFov == other.d->m_leftFov && d->m_rightFov == other.d->m_rightFov && d->m_topFov == other.d->m_topFov
58 && d->m_bottomFov == other.d->m_bottomFov && d->m_near == other.d->m_near;
59}
60
61bool GeoDataViewVolume::operator!=(const GeoDataViewVolume &other) const
62{
63 return !this->operator==(other);
64}
65
66GeoDataViewVolume::~GeoDataViewVolume()
67{
68 delete d;
69}
70
71const char *GeoDataViewVolume::nodeType() const
72{
73 return GeoDataTypes::GeoDataViewVolumeType;
74}
75
76qreal GeoDataViewVolume::leftFov() const
77{
78 return d->m_leftFov;
79}
80
81void GeoDataViewVolume::setLeftFov(qreal leftFov)
82{
83 d->m_leftFov = leftFov;
84}
85
86qreal GeoDataViewVolume::rightFov() const
87{
88 return d->m_rightFov;
89}
90
91void GeoDataViewVolume::setRightFov(qreal rightFov)
92{
93 d->m_rightFov = rightFov;
94}
95
96qreal GeoDataViewVolume::bottomFov() const
97{
98 return d->m_bottomFov;
99}
100
101void GeoDataViewVolume::setBottomFov(qreal bottomFov)
102{
103 d->m_bottomFov = bottomFov;
104}
105
106qreal GeoDataViewVolume::topFov() const
107{
108 return d->m_topFov;
109}
110
111void GeoDataViewVolume::setTopFov(qreal topFov)
112{
113 d->m_topFov = topFov;
114}
115
116qreal GeoDataViewVolume::near() const
117{
118 return d->m_near;
119}
120
121void GeoDataViewVolume::setNear(qreal near)
122{
123 d->m_near = near;
124}
125
126}
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.
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.