File indexing completed on 2025-01-05 03:58:55
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2013 Mohammed Nafees <nafees.technocool@gmail.com> 0004 // 0005 0006 #include "GeoDataImagePyramid.h" 0007 0008 #include "GeoDataTypes.h" 0009 0010 namespace Marble 0011 { 0012 0013 class GeoDataImagePyramidPrivate 0014 { 0015 public: 0016 GeoDataImagePyramidPrivate(); 0017 0018 int m_tileSize; 0019 int m_maxWidth; 0020 int m_maxHeight; 0021 GeoDataImagePyramid::GridOrigin m_gridOrigin; 0022 }; 0023 0024 GeoDataImagePyramidPrivate::GeoDataImagePyramidPrivate() : 0025 m_tileSize( 256 ), 0026 m_maxWidth(), 0027 m_maxHeight(), 0028 m_gridOrigin() 0029 { 0030 // nothing to do 0031 } 0032 0033 GeoDataImagePyramid::GeoDataImagePyramid() : d( new GeoDataImagePyramidPrivate ) 0034 { 0035 // nothing to do 0036 } 0037 0038 GeoDataImagePyramid::GeoDataImagePyramid( const Marble::GeoDataImagePyramid &other ) : 0039 GeoDataObject(), d( new GeoDataImagePyramidPrivate( *other.d ) ) 0040 { 0041 // nothing to do 0042 } 0043 0044 GeoDataImagePyramid &GeoDataImagePyramid::operator=( const GeoDataImagePyramid &other ) 0045 { 0046 GeoDataObject::operator=( other ); 0047 *d = *other.d; 0048 return *this; 0049 } 0050 0051 bool GeoDataImagePyramid::operator==( const GeoDataImagePyramid& other ) const 0052 { 0053 return equals(other) && 0054 d->m_tileSize == other.d->m_tileSize && 0055 d->m_maxWidth == other.d->m_maxWidth && 0056 d->m_maxHeight == other.d->m_maxHeight && 0057 d->m_gridOrigin == other.d->m_gridOrigin; 0058 } 0059 0060 bool GeoDataImagePyramid::operator!=( const GeoDataImagePyramid& other ) const 0061 { 0062 return !this->operator==(other); 0063 } 0064 0065 GeoDataImagePyramid::~GeoDataImagePyramid() 0066 { 0067 delete d; 0068 } 0069 0070 const char *GeoDataImagePyramid::nodeType() const 0071 { 0072 return GeoDataTypes::GeoDataImagePyramidType; 0073 } 0074 0075 int GeoDataImagePyramid::tileSize() const 0076 { 0077 return d->m_tileSize; 0078 } 0079 0080 void GeoDataImagePyramid::setTileSize(int tileSize) 0081 { 0082 d->m_tileSize = tileSize; 0083 } 0084 0085 int GeoDataImagePyramid::maxWidth() const 0086 { 0087 return d->m_maxWidth; 0088 } 0089 0090 void GeoDataImagePyramid::setMaxWidth(int maxWidth) 0091 { 0092 d->m_maxWidth = maxWidth; 0093 } 0094 0095 int GeoDataImagePyramid::maxHeight() const 0096 { 0097 return d->m_maxHeight; 0098 } 0099 0100 void GeoDataImagePyramid::setMaxHeight(int maxHeight) 0101 { 0102 d->m_maxHeight = maxHeight; 0103 } 0104 0105 GeoDataImagePyramid::GridOrigin GeoDataImagePyramid::gridOrigin() const 0106 { 0107 return d->m_gridOrigin; 0108 } 0109 0110 void GeoDataImagePyramid::setGridOrigin(GridOrigin gridOrigin) 0111 { 0112 d->m_gridOrigin = gridOrigin; 0113 } 0114 0115 }