File indexing completed on 2024-05-19 03:51:50
0001 /* 0002 SPDX-FileCopyrightText: 2008 Torsten Rahn <rahn@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include "GeoSceneFilter.h" 0008 0009 #include "GeoScenePalette.h" 0010 #include "GeoSceneTypes.h" 0011 0012 namespace Marble 0013 { 0014 0015 GeoSceneFilter::GeoSceneFilter( const QString& name ) 0016 : m_name( name ), 0017 m_type( "none" ) 0018 { 0019 } 0020 0021 GeoSceneFilter::~GeoSceneFilter() 0022 { 0023 qDeleteAll( m_palette ); 0024 } 0025 0026 QString GeoSceneFilter::name() const 0027 { 0028 return m_name; 0029 } 0030 0031 void GeoSceneFilter::setName( const QString& name ) 0032 { 0033 m_name = name; 0034 } 0035 0036 QString GeoSceneFilter::type() const 0037 { 0038 return m_type; 0039 } 0040 0041 void GeoSceneFilter::setType( const QString& type ) 0042 { 0043 m_type = type; 0044 } 0045 0046 QList<const GeoScenePalette*> GeoSceneFilter::palette() const 0047 { 0048 return m_palette; 0049 } 0050 0051 void GeoSceneFilter::addPalette( const GeoScenePalette *palette ) 0052 { 0053 m_palette.append( palette ); 0054 } 0055 0056 int GeoSceneFilter::removePalette( const GeoScenePalette *palette ) 0057 { 0058 return m_palette.removeAll( palette ); 0059 } 0060 0061 const char *GeoSceneFilter::nodeType() const 0062 { 0063 return GeoSceneTypes::GeoSceneFilterType; 0064 } 0065 0066 }