[processing] Allow providers to return path to SVG icon

This commit is contained in:
Nyall Dawson 2017-01-09 12:34:37 +10:00
parent b71019dfda
commit bf484dafa8
3 changed files with 20 additions and 1 deletions

View File

@ -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

View File

@ -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" );
}

View File

@ -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