File indexing completed on 2025-01-05 03:59:00
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2013 Sanjiban Bairagya <sanjiban22393@gmail.com> 0004 // 0005 0006 #include "GeoDataResourceMap.h" 0007 0008 #include "GeoDataAlias.h" 0009 #include "GeoDataTypes.h" 0010 0011 namespace Marble { 0012 0013 class GeoDataResourceMapPrivate 0014 { 0015 public: 0016 GeoDataAlias m_alias; 0017 GeoDataResourceMapPrivate(); 0018 }; 0019 0020 GeoDataResourceMapPrivate::GeoDataResourceMapPrivate() : 0021 m_alias() 0022 { 0023 // nothing to do 0024 } 0025 0026 GeoDataResourceMap::GeoDataResourceMap() : d( new GeoDataResourceMapPrivate ) 0027 { 0028 // nothing to do 0029 } 0030 0031 GeoDataResourceMap::GeoDataResourceMap( const Marble::GeoDataResourceMap &other ) : 0032 GeoNode( other ), d( new GeoDataResourceMapPrivate( *other.d ) ) 0033 { 0034 // nothing to do 0035 } 0036 0037 GeoDataResourceMap &GeoDataResourceMap::operator=( const GeoDataResourceMap &other ) 0038 { 0039 *d = *other.d; 0040 return *this; 0041 } 0042 0043 bool GeoDataResourceMap::operator==( const GeoDataResourceMap &other ) const 0044 { 0045 return d->m_alias == other.d->m_alias; 0046 } 0047 0048 bool GeoDataResourceMap::operator!=( const GeoDataResourceMap &other ) const 0049 { 0050 return !this->operator==( other ); 0051 } 0052 0053 GeoDataResourceMap::~GeoDataResourceMap() 0054 { 0055 delete d; 0056 } 0057 0058 const char *GeoDataResourceMap::nodeType() const 0059 { 0060 return GeoDataTypes::GeoDataResourceMapType; 0061 } 0062 0063 const GeoDataAlias &GeoDataResourceMap::alias() const 0064 { 0065 return d->m_alias; 0066 } 0067 0068 GeoDataAlias &GeoDataResourceMap::alias() 0069 { 0070 return d->m_alias; 0071 } 0072 0073 void GeoDataResourceMap::setAlias( const GeoDataAlias &alias ) 0074 { 0075 d->m_alias = alias; 0076 } 0077 0078 QString GeoDataResourceMap::sourceHref() const 0079 { 0080 return d->m_alias.sourceHref(); 0081 } 0082 0083 QString GeoDataResourceMap::targetHref() const 0084 { 0085 return d->m_alias.targetHref(); 0086 } 0087 0088 void GeoDataResourceMap::setSourceHref( const QString& sourceHref ) 0089 { 0090 d->m_alias.setSourceHref( sourceHref ); 0091 } 0092 0093 void GeoDataResourceMap::setTargetHref( const QString& targetHref ) 0094 { 0095 d->m_alias.setTargetHref( targetHref ); 0096 } 0097 0098 0099 0100 }