Skip to content

Commit

Permalink
[processing] Allow providers to return path to SVG icon
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 11, 2017
1 parent b71019d commit bf484da
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
7 changes: 7 additions & 0 deletions python/core/processing/qgsprocessingprovider.sip
Expand Up @@ -20,9 +20,16 @@ class QgsProcessingProvider

/**
* Returns an icon for the provider.
* @see svgIcon()
*/
virtual QIcon icon() const;

/**
* Returns a path to an SVG version of the provider's icon.
* @see icon()
*/
virtual QString svgIconPath() const;

/**
* Returns the unique provider id, used for identifying the provider. This string
* should be a unique, short, character only string, eg "qgis" or "gdal". This
Expand Down
7 changes: 6 additions & 1 deletion src/core/processing/qgsprocessingprovider.cpp
Expand Up @@ -20,5 +20,10 @@

QIcon QgsProcessingProvider::icon() const
{
return QgsApplication::getThemeIcon( "/alg.svg" );
return QgsApplication::getThemeIcon( "/processingAlgorithm.svg" );
}

QString QgsProcessingProvider::svgIconPath() const
{
return QgsApplication::iconPath( "processingAlgorithm.svg" );
}
7 changes: 7 additions & 0 deletions src/core/processing/qgsprocessingprovider.h
Expand Up @@ -48,9 +48,16 @@ class CORE_EXPORT QgsProcessingProvider

/**
* Returns an icon for the provider.
* @see svgIcon()
*/
virtual QIcon icon() const;

/**
* Returns a path to an SVG version of the provider's icon.
* @see icon()
*/
virtual QString svgIconPath() const;

/**
* Returns the unique provider id, used for identifying the provider. This string
* should be a unique, short, character only string, eg "qgis" or "gdal". This
Expand Down

0 comments on commit bf484da

Please sign in to comment.