Marble

GeoDataImagePyramid.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 "GeoDataImagePyramid.h"
7
8#include "GeoDataTypes.h"
9
10namespace Marble
11{
12
13class GeoDataImagePyramidPrivate
14{
15public:
16 GeoDataImagePyramidPrivate();
17
18 int m_tileSize;
19 int m_maxWidth;
20 int m_maxHeight;
21 GeoDataImagePyramid::GridOrigin m_gridOrigin;
22};
23
24GeoDataImagePyramidPrivate::GeoDataImagePyramidPrivate() :
25 m_tileSize( 256 ),
26 m_maxWidth(),
27 m_maxHeight(),
28 m_gridOrigin()
29{
30 // nothing to do
31}
32
33GeoDataImagePyramid::GeoDataImagePyramid() : d( new GeoDataImagePyramidPrivate )
34{
35 // nothing to do
36}
37
38GeoDataImagePyramid::GeoDataImagePyramid( const Marble::GeoDataImagePyramid &other ) :
39 GeoDataObject(), d( new GeoDataImagePyramidPrivate( *other.d ) )
40{
41 // nothing to do
42}
43
44GeoDataImagePyramid &GeoDataImagePyramid::operator=( const GeoDataImagePyramid &other )
45{
46 GeoDataObject::operator=( other );
47 *d = *other.d;
48 return *this;
49}
50
51bool GeoDataImagePyramid::operator==( const GeoDataImagePyramid& other ) const
52{
53 return equals(other) &&
54 d->m_tileSize == other.d->m_tileSize &&
55 d->m_maxWidth == other.d->m_maxWidth &&
56 d->m_maxHeight == other.d->m_maxHeight &&
57 d->m_gridOrigin == other.d->m_gridOrigin;
58}
59
60bool GeoDataImagePyramid::operator!=( const GeoDataImagePyramid& other ) const
61{
62 return !this->operator==(other);
63}
64
65GeoDataImagePyramid::~GeoDataImagePyramid()
66{
67 delete d;
68}
69
70const char *GeoDataImagePyramid::nodeType() const
71{
72 return GeoDataTypes::GeoDataImagePyramidType;
73}
74
75int GeoDataImagePyramid::tileSize() const
76{
77 return d->m_tileSize;
78}
79
80void GeoDataImagePyramid::setTileSize(int tileSize)
81{
82 d->m_tileSize = tileSize;
83}
84
85int GeoDataImagePyramid::maxWidth() const
86{
87 return d->m_maxWidth;
88}
89
90void GeoDataImagePyramid::setMaxWidth(int maxWidth)
91{
92 d->m_maxWidth = maxWidth;
93}
94
95int GeoDataImagePyramid::maxHeight() const
96{
97 return d->m_maxHeight;
98}
99
100void GeoDataImagePyramid::setMaxHeight(int maxHeight)
101{
102 d->m_maxHeight = maxHeight;
103}
104
105GeoDataImagePyramid::GridOrigin GeoDataImagePyramid::gridOrigin() const
106{
107 return d->m_gridOrigin;
108}
109
110void GeoDataImagePyramid::setGridOrigin(GridOrigin gridOrigin)
111{
112 d->m_gridOrigin = gridOrigin;
113}
114
115}
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 14 2024 11:54:16 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.