Skip to content

Commit

Permalink
[processing] add icons for raster terrain analysis algorithms
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Oct 11, 2016
1 parent e2f36e4 commit fabc097
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 0 deletions.
9 changes: 9 additions & 0 deletions python/plugins/processing/algs/qgis/Aspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@

__revision__ = '$Format:%H$'

import os

from qgis.PyQt.QtGui import QIcon

from qgis.analysis import QgsAspectFilter

from processing.core.GeoAlgorithm import GeoAlgorithm
Expand All @@ -33,13 +37,18 @@
from processing.core.outputs import OutputRaster
from processing.tools import raster

pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]


class Aspect(GeoAlgorithm):

INPUT_LAYER = 'INPUT_LAYER'
Z_FACTOR = 'Z_FACTOR'
OUTPUT_LAYER = 'OUTPUT_LAYER'

def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'dem.png'))

def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Aspect')
self.group, self.i18n_group = self.trAlgorithm('Raster terrain analysis')
Expand Down
9 changes: 9 additions & 0 deletions python/plugins/processing/algs/qgis/Hillshade.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@

__revision__ = '$Format:%H$'

import os

from qgis.PyQt.QtGui import QIcon

from qgis.analysis import QgsHillshadeFilter

from processing.core.GeoAlgorithm import GeoAlgorithm
Expand All @@ -33,6 +37,8 @@
from processing.core.outputs import OutputRaster
from processing.tools import raster

pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]


class Hillshade(GeoAlgorithm):

Expand All @@ -42,6 +48,9 @@ class Hillshade(GeoAlgorithm):
V_ANGLE = 'V_ANGLE'
OUTPUT_LAYER = 'OUTPUT_LAYER'

def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'dem.png'))

def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Hillshade')
self.group, self.i18n_group = self.trAlgorithm('Raster terrain analysis')
Expand Down
9 changes: 9 additions & 0 deletions python/plugins/processing/algs/qgis/ReliefAuto.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@

__revision__ = '$Format:%H$'

import os

from qgis.PyQt.QtGui import QIcon

from qgis.analysis import QgsRelief

from processing.core.GeoAlgorithm import GeoAlgorithm
Expand All @@ -34,6 +38,8 @@
from processing.core.outputs import OutputTable
from processing.tools import raster

pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]


class ReliefAuto(GeoAlgorithm):

Expand All @@ -42,6 +48,9 @@ class ReliefAuto(GeoAlgorithm):
OUTPUT_LAYER = 'OUTPUT_LAYER'
FREQUENCY_DISTRIBUTION = 'FREQUENCY_DISTRIBUTION'

def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'dem.png'))

def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Relief (automatic colors)')
self.group, self.i18n_group = self.trAlgorithm('Raster terrain analysis')
Expand Down
9 changes: 9 additions & 0 deletions python/plugins/processing/algs/qgis/Ruggedness.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@

__revision__ = '$Format:%H$'

import os

from qgis.PyQt.QtGui import QIcon

from qgis.analysis import QgsRuggednessFilter

from processing.core.GeoAlgorithm import GeoAlgorithm
Expand All @@ -33,13 +37,18 @@
from processing.core.outputs import OutputRaster
from processing.tools import raster

pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]


class Ruggedness(GeoAlgorithm):

INPUT_LAYER = 'INPUT_LAYER'
Z_FACTOR = 'Z_FACTOR'
OUTPUT_LAYER = 'OUTPUT_LAYER'

def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'dem.png'))

def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Ruggedness index')
self.group, self.i18n_group = self.trAlgorithm('Raster terrain analysis')
Expand Down
9 changes: 9 additions & 0 deletions python/plugins/processing/algs/qgis/Slope.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@

__revision__ = '$Format:%H$'

import os

from qgis.PyQt.QtGui import QIcon

from qgis.analysis import QgsSlopeFilter

from processing.core.GeoAlgorithm import GeoAlgorithm
Expand All @@ -33,13 +37,18 @@
from processing.core.outputs import OutputRaster
from processing.tools import raster

pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]


class Slope(GeoAlgorithm):

INPUT_LAYER = 'INPUT_LAYER'
Z_FACTOR = 'Z_FACTOR'
OUTPUT_LAYER = 'OUTPUT_LAYER'

def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'dem.png'))

def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Slope')
self.group, self.i18n_group = self.trAlgorithm('Raster terrain analysis')
Expand Down
Binary file added python/plugins/processing/images/dem.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fabc097

Please sign in to comment.