1 /*
2     SPDX-FileCopyrightText: 2008 Torsten Rahn <rahn@kde.org>
3 
4     SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #include "GeoSceneFilter.h"
8 
9 #include "GeoScenePalette.h"
10 #include "GeoSceneTypes.h"
11 
12 namespace Marble
13 {
14 
GeoSceneFilter(const QString & name)15 GeoSceneFilter::GeoSceneFilter( const QString& name )
16     : m_name( name ),
17       m_type( "none" )
18 {
19 }
20 
~GeoSceneFilter()21 GeoSceneFilter::~GeoSceneFilter()
22 {
23    qDeleteAll( m_palette );
24 }
25 
name() const26 QString GeoSceneFilter::name() const
27 {
28     return m_name;
29 }
30 
setName(const QString & name)31 void GeoSceneFilter::setName( const QString& name )
32 {
33     m_name = name;
34 }
35 
type() const36 QString GeoSceneFilter::type() const
37 {
38     return m_type;
39 }
40 
setType(const QString & type)41 void GeoSceneFilter::setType( const QString& type )
42 {
43     m_type = type;
44 }
45 
palette() const46 QList<const GeoScenePalette*> GeoSceneFilter::palette() const
47 {
48     return m_palette;
49 }
50 
addPalette(const GeoScenePalette * palette)51 void GeoSceneFilter::addPalette( const GeoScenePalette *palette )
52 {
53     m_palette.append( palette );
54 }
55 
removePalette(const GeoScenePalette * palette)56 int GeoSceneFilter::removePalette( const GeoScenePalette *palette )
57 {
58     return m_palette.removeAll( palette );
59 }
60 
nodeType() const61 const char *GeoSceneFilter::nodeType() const
62 {
63     return GeoSceneTypes::GeoSceneFilterType;
64 }
65 
66 }
67