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() : d( new GeoDataViewVolumePrivate )
36{
37 // nothing to do
38}
39
40GeoDataViewVolume::GeoDataViewVolume( const Marble::GeoDataViewVolume &other ) :
41 GeoDataObject(), d( new GeoDataViewVolumePrivate( *other.d ) )
42{
43 // nothing to do
44}
45
46GeoDataViewVolume &GeoDataViewVolume::operator=( const GeoDataViewVolume &other )
47{
48 GeoDataObject::operator=( other );
49 *d = *other.d;
50 return *this;
51}
52
53bool GeoDataViewVolume::operator==(const GeoDataViewVolume& other) const
54{
55 return equals(other)
56 && d->m_leftFov == other.d->m_leftFov
57 && d->m_rightFov == other.d->m_rightFov
58 && d->m_topFov == other.d->m_topFov
59 && d->m_bottomFov == other.d->m_bottomFov
60 && d->m_near == other.d->m_near;
61}
62
63bool GeoDataViewVolume::operator!=(const GeoDataViewVolume& other) const
64{
65 return !this->operator==(other);
66}
67
68GeoDataViewVolume::~GeoDataViewVolume()
69{
70 delete d;
71}
72
73const char *GeoDataViewVolume::nodeType() const
74{
75 return GeoDataTypes::GeoDataViewVolumeType;
76}
77
78qreal GeoDataViewVolume::leftFov() const
79{
80 return d->m_leftFov;
81}
82
83void GeoDataViewVolume::setLeftFov(qreal leftFov)
84{
85 d->m_leftFov = leftFov;
86}
87
88qreal GeoDataViewVolume::rightFov() const
89{
90 return d->m_rightFov;
91}
92
93void GeoDataViewVolume::setRightFov(qreal rightFov)
94{
95 d->m_rightFov = rightFov;
96}
97
98qreal GeoDataViewVolume::bottomFov() const
99{
100 return d->m_bottomFov;
101}
102
103void GeoDataViewVolume::setBottomFov(qreal bottomFov)
104{
105 d->m_bottomFov = bottomFov;
106}
107
108qreal GeoDataViewVolume::topFov() const
109{
110 return d->m_topFov;
111}
112
113void GeoDataViewVolume::setTopFov(qreal topFov)
114{
115 d->m_topFov = topFov;
116}
117
118qreal GeoDataViewVolume::near() const
119{
120 return d->m_near;
121}
122
123void GeoDataViewVolume::setNear(qreal near)
124{
125 d->m_near = near;
126}
127
128}
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 Fri Jun 7 2024 12:03:12 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.