File indexing completed on 2024-05-19 03:51:50

0001 // SPDX-License-Identifier: LGPL-2.1-or-later
0002 //
0003 // SPDX-FileCopyrightText: 2011 Utku Aydın <utkuaydin34@gmail.com>
0004 //
0005 
0006 #include "GeoSceneGeodata.h"
0007 #include "GeoSceneTypes.h"
0008 
0009 #include <QDebug>
0010 
0011 namespace Marble
0012 {
0013 GeoSceneGeodata::GeoSceneGeodata( const QString& name )
0014     : GeoSceneAbstractDataset( name ),
0015       m_sourceFile( QString() ),
0016       m_alpha( 1.0 ),
0017       m_pen( QPen( Qt::NoPen ) ),
0018       m_brush( QBrush( Qt::transparent ) ),
0019       m_renderOrder( 0 )
0020 {
0021 }
0022 
0023 GeoSceneGeodata::~GeoSceneGeodata()
0024 {
0025 }
0026 
0027 const char* GeoSceneGeodata::nodeType() const
0028 {
0029     return GeoSceneTypes::GeoSceneGeodataType;
0030 }
0031 
0032 bool GeoSceneGeodata::operator==( const GeoSceneGeodata &other ) const
0033 {
0034     return m_sourceFile == other.sourceFile()
0035             && m_pen == other.pen()
0036             && m_brush == other.brush();
0037 }
0038 
0039 QString GeoSceneGeodata::property() const
0040 {
0041     return m_property;
0042 }
0043 
0044 void GeoSceneGeodata::setProperty( const QString& property )
0045 {
0046     m_property = property;
0047 }
0048 
0049 QString GeoSceneGeodata::sourceFile() const
0050 {
0051     return m_sourceFile;
0052 }
0053 
0054 void GeoSceneGeodata::setSourceFile(const QString& sourceFile)
0055 {
0056     m_sourceFile = sourceFile;
0057 }
0058 
0059 QString GeoSceneGeodata::colorize() const
0060 {
0061     return m_colorize;
0062 }
0063 
0064 void GeoSceneGeodata::setColorize( const QString& colorize )
0065 {
0066     m_colorize = colorize;
0067 }
0068 
0069 QPen GeoSceneGeodata::pen() const
0070 {
0071     return m_pen;
0072 }
0073 
0074 void GeoSceneGeodata::setAlpha(qreal alpha)
0075 {
0076     m_alpha = alpha;
0077 }
0078 
0079 qreal GeoSceneGeodata::alpha() const
0080 {
0081     return m_alpha;
0082 }
0083 
0084 void GeoSceneGeodata::setPen( const QPen& pen )
0085 {
0086     m_pen = pen;
0087 }
0088 
0089 QBrush GeoSceneGeodata::brush() const
0090 {
0091     return m_brush;
0092 }
0093 
0094 void GeoSceneGeodata::setBrush( const QBrush& brush )
0095 {
0096     m_brush = brush;
0097 }
0098 
0099 int GeoSceneGeodata::renderOrder() const
0100 {
0101     return m_renderOrder;
0102 }
0103 
0104 void GeoSceneGeodata::setRenderOrder( int renderOrder )
0105 {
0106     m_renderOrder = renderOrder;
0107 }
0108 
0109 QVector<QColor> GeoSceneGeodata::colors() const
0110 {
0111     return m_colors;
0112 }
0113 
0114 void GeoSceneGeodata::setColors(const QVector<QColor> &colors)
0115 {
0116     m_colors = colors;
0117 }
0118 
0119 }