Skip to content
Permalink
Browse files

Add a default icon for data collections

  • Loading branch information
wonder-sk committed Oct 19, 2011
1 parent b1e5038 commit bfb4d0f342c63d2a37a5d29908a0345442f18939
Showing with 12 additions and 0 deletions.
  1. +11 −0 src/core/qgsdataitem.cpp
  2. +1 −0 src/core/qgsdataitem.h
@@ -96,6 +96,16 @@ const QIcon &QgsLayerItem::iconDefault()
return icon;
}

const QIcon &QgsDataCollectionItem::iconDataCollection()
{
static QIcon icon;

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

return icon;
}

const QIcon &QgsDataCollectionItem::iconDir()
{
static QIcon icon;
@@ -315,6 +325,7 @@ bool QgsLayerItem::equal( const QgsDataItem *other )
QgsDataCollectionItem::QgsDataCollectionItem( QgsDataItem* parent, QString name, QString path )
: QgsDataItem( Collection, parent, name, path )
{
mIcon = iconDataCollection();
}

QgsDataCollectionItem::~QgsDataCollectionItem()
@@ -201,6 +201,7 @@ class CORE_EXPORT QgsDataCollectionItem : public QgsDataItem
void addChild( QgsDataItem *item ) { mChildren.append( item ); }

static const QIcon &iconDir(); // shared icon: open/closed directory
static const QIcon &iconDataCollection(); // default icon for data collection
};

/** A directory: contains subdirectories and layers */

0 comments on commit bfb4d0f

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