Skip to content

Commit

Permalink
[processing] add icons for interpolation tools
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Oct 19, 2016
1 parent 774965c commit ca66951
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 0 deletions.
Expand Up @@ -25,6 +25,10 @@

__revision__ = '$Format:%H$'

import os

from qgis.PyQt.QtGui import QIcon

from qgis.core import QgsRectangle
from qgis.analysis import (QgsInterpolator,
QgsIDWInterpolator,
Expand All @@ -40,6 +44,8 @@
from processing.core.outputs import OutputRaster
from processing.tools import dataobjects

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


class IdwInterpolationAttribute(GeoAlgorithm):

Expand All @@ -54,6 +60,9 @@ class IdwInterpolationAttribute(GeoAlgorithm):
EXTENT = 'EXTENT'
OUTPUT_LAYER = 'OUTPUT_LAYER'

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

def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('IDW interpolation (using attribute)')
self.group, self.i18n_group = self.trAlgorithm('Interpolation')
Expand Down
9 changes: 9 additions & 0 deletions python/plugins/processing/algs/qgis/IdwInterpolationZValue.py
Expand Up @@ -25,6 +25,10 @@

__revision__ = '$Format:%H$'

import os

from qgis.PyQt.QtGui import QIcon

from qgis.core import QgsRectangle, QgsWkbTypes
from qgis.analysis import (QgsInterpolator,
QgsIDWInterpolator,
Expand All @@ -39,6 +43,8 @@
from processing.core.outputs import OutputRaster
from processing.tools import dataobjects

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


class IdwInterpolationZValue(GeoAlgorithm):

Expand All @@ -52,6 +58,9 @@ class IdwInterpolationZValue(GeoAlgorithm):
EXTENT = 'EXTENT'
OUTPUT_LAYER = 'OUTPUT_LAYER'

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

def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('IDW interpolation (using Z-values)')
self.group, self.i18n_group = self.trAlgorithm('Interpolation')
Expand Down
Expand Up @@ -25,6 +25,10 @@

__revision__ = '$Format:%H$'

import os

from qgis.PyQt.QtGui import QIcon

from qgis.core import QgsRectangle
from qgis.analysis import (QgsInterpolator,
QgsTINInterpolator,
Expand All @@ -41,6 +45,8 @@
from processing.core.outputs import OutputVector
from processing.tools import dataobjects

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


class TinInterpolationAttribute(GeoAlgorithm):

Expand All @@ -56,6 +62,9 @@ class TinInterpolationAttribute(GeoAlgorithm):
OUTPUT_LAYER = 'OUTPUT_LAYER'
TRIANULATION_FILE = 'TRIANULATION_FILE'

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

def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('TIN interpolation (using attribute)')
self.group, self.i18n_group = self.trAlgorithm('Interpolation')
Expand Down
9 changes: 9 additions & 0 deletions python/plugins/processing/algs/qgis/TinInterpolationZValue.py
Expand Up @@ -25,6 +25,10 @@

__revision__ = '$Format:%H$'

import os

from qgis.PyQt.QtGui import QIcon

from qgis.core import QgsRectangle, QgsWkbTypes
from qgis.analysis import (QgsInterpolator,
QgsTINInterpolator,
Expand All @@ -40,6 +44,8 @@
from processing.core.outputs import OutputVector
from processing.tools import dataobjects

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


class TinInterpolationZValue(GeoAlgorithm):

Expand All @@ -54,6 +60,9 @@ class TinInterpolationZValue(GeoAlgorithm):
OUTPUT_LAYER = 'OUTPUT_LAYER'
TRIANULATION_FILE = 'TRIANULATION_FILE'

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

def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('TIN interpolation (using Z-values)')
self.group, self.i18n_group = self.trAlgorithm('Interpolation')
Expand Down
Binary file added python/plugins/processing/images/interpolation.png
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 ca66951

Please sign in to comment.