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()
34 : d(new GeoDataImagePyramidPrivate)
35{
36 // nothing to do
37}
38
39GeoDataImagePyramid::GeoDataImagePyramid(const Marble::GeoDataImagePyramid &other)
40 : GeoDataObject()
41 , d(new GeoDataImagePyramidPrivate(*other.d))
42{
43 // nothing to do
44}
45
46GeoDataImagePyramid &GeoDataImagePyramid::operator=(const GeoDataImagePyramid &other)
47{
48 GeoDataObject::operator=(other);
49 *d = *other.d;
50 return *this;
51}
52
53bool GeoDataImagePyramid::operator==(const GeoDataImagePyramid &other) const
54{
55 return equals(other) && d->m_tileSize == other.d->m_tileSize && d->m_maxWidth == other.d->m_maxWidth && d->m_maxHeight == other.d->m_maxHeight
56 && d->m_gridOrigin == other.d->m_gridOrigin;
57}
58
59bool GeoDataImagePyramid::operator!=(const GeoDataImagePyramid &other) const
60{
61 return !this->operator==(other);
62}
63
64GeoDataImagePyramid::~GeoDataImagePyramid()
65{
66 delete d;
67}
68
69const char *GeoDataImagePyramid::nodeType() const
70{
71 return GeoDataTypes::GeoDataImagePyramidType;
72}
73
74int GeoDataImagePyramid::tileSize() const
75{
76 return d->m_tileSize;
77}
78
79void GeoDataImagePyramid::setTileSize(int tileSize)
80{
81 d->m_tileSize = tileSize;
82}
83
84int GeoDataImagePyramid::maxWidth() const
85{
86 return d->m_maxWidth;
87}
88
89void GeoDataImagePyramid::setMaxWidth(int maxWidth)
90{
91 d->m_maxWidth = maxWidth;
92}
93
94int GeoDataImagePyramid::maxHeight() const
95{
96 return d->m_maxHeight;
97}
98
99void GeoDataImagePyramid::setMaxHeight(int maxHeight)
100{
101 d->m_maxHeight = maxHeight;
102}
103
104GeoDataImagePyramid::GridOrigin GeoDataImagePyramid::gridOrigin() const
105{
106 return d->m_gridOrigin;
107}
108
109void GeoDataImagePyramid::setGridOrigin(GridOrigin gridOrigin)
110{
111 d->m_gridOrigin = gridOrigin;
112}
113
114}
KIOCORE_EXPORT bool operator==(const UDSEntry &entry, const UDSEntry &other)
bool equals(const QVariant &lhs, const QVariant &rhs)
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 Fri Nov 1 2024 18:53:49 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.