Skip to content
Permalink
Browse files

Generic icon for raster layers in browser

  • Loading branch information
wonder-sk committed Oct 19, 2011
1 parent c3f6dff commit 5b89a32e3c3bb572197d53e24afd89063bfc48d5
Showing with 13 additions and 1 deletion.
  1. +11 −0 src/core/qgsdataitem.cpp
  2. +1 −0 src/core/qgsdataitem.h
  3. +1 −1 src/providers/wms/qgswmsdataitems.cpp
@@ -76,6 +76,16 @@ const QIcon &QgsLayerItem::iconTable()
return icon;
}

const QIcon &QgsLayerItem::iconRaster()
{
static QIcon icon;

if ( icon.isNull() )
icon = QIcon( getThemePixmap( "/mIconRaster.png" ) );

return icon;
}

const QIcon &QgsLayerItem::iconDefault()
{
static QIcon icon;
@@ -277,6 +287,7 @@ QgsLayerItem::QgsLayerItem( QgsDataItem* parent, QString name, QString path, QSt
case Line: mIcon = iconLine(); break;
case Polygon: mIcon = iconPolygon(); break;
case TableLayer: mIcon = iconTable(); break;
case Raster: mIcon = iconRaster(); break;
default: mIcon = iconDefault(); break;
}
}
@@ -184,6 +184,7 @@ class CORE_EXPORT QgsLayerItem : public QgsDataItem
static const QIcon &iconLine();
static const QIcon &iconPolygon();
static const QIcon &iconTable();
static const QIcon &iconRaster();
static const QIcon &iconDefault();
};

@@ -124,7 +124,7 @@ QgsWMSLayerItem::QgsWMSLayerItem( QgsDataItem* parent, QString name, QString pat

if ( mChildren.size() == 0 )
{
mIcon = QIcon( getThemePixmap( "mIconRaster.png" ) );
mIcon = iconRaster();
}
mPopulated = true;
}

0 comments on commit 5b89a32

Please sign in to comment.
You can’t perform that action at this time.