Skip to content

Commit

Permalink
[processing] change icon of core algs
Browse files Browse the repository at this point in the history
  • Loading branch information
volaya committed Jul 12, 2014
1 parent cded8b1 commit e536905
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions python/plugins/processing/algs/qgis/QGISAlgorithmProvider.py
Expand Up @@ -173,10 +173,11 @@ def __init__(self):

folder = os.path.join(os.path.dirname(__file__), 'scripts')
scripts = ScriptUtils.loadFromFolder(folder)
for script in scripts:
script._icon = self._icon
for script in scripts:
script.allowEdit = False
self.alglist.extend(scripts)
for alg in self.alglist:
alg._icon = self._icon

def initializeSettings(self):
AlgorithmProvider.initializeSettings(self)
Expand Down
6 changes: 4 additions & 2 deletions python/plugins/processing/core/GeoAlgorithm.py
Expand Up @@ -53,6 +53,8 @@


class GeoAlgorithm:

_icon = QtGui.QIcon(os.path.dirname(__file__) + '/../images/alg.png')

def __init__(self):
# Parameters needed by the algorithm
Expand Down Expand Up @@ -104,11 +106,11 @@ def getCopy(self):
# methods to overwrite when creating a custom geoalgorithm

def getIcon(self):
return QtGui.QIcon(os.path.dirname(__file__) + '/../images/alg.png')
return self._icon

@staticmethod
def getDefaultIcon():
return QtGui.QIcon(os.path.dirname(__file__) + '/../images/alg.png')
return GeoAlgorithm._icon

def help(self):
"""Returns the help with the description of this algorithm.
Expand Down

0 comments on commit e536905

Please sign in to comment.