Skip to content
Permalink
Browse files

Add vector icons to some qgs algorithms (fixes #19082) (#7149)

  • Loading branch information
agiudiceandrea authored and nirvn committed Jun 4, 2018
1 parent b8ff44e commit adf5eb77cfde532e4f93523374665d8c1b072c00
@@ -31,7 +31,8 @@
from qgis.PyQt.QtGui import QIcon
from qgis.PyQt.QtCore import QVariant

from qgis.core import (QgsField,
from qgis.core import (QgsApplication,
QgsField,
QgsFeatureSink,
QgsGeometry,
QgsWkbTypes,
@@ -60,7 +61,10 @@ class MinimumBoundingGeometry(QgisAlgorithm):
FIELD = 'FIELD'

def icon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'convex_hull.png'))
return QgsApplication.getThemeIcon("/algorithms/mAlgorithmConvexHull.svg")

def svgIconPath(self):
return QgsApplication.iconPath("/algorithms/mAlgorithmConvexHull.svg")

def group(self):
return self.tr('Vector geometry')
@@ -31,7 +31,8 @@
from qgis.PyQt.QtCore import QVariant
from qgis.PyQt.QtGui import QIcon

from qgis.core import (QgsFeature,
from qgis.core import (QgsApplication,
QgsFeature,
QgsFeatureSink,
QgsWkbTypes,
QgsField,
@@ -57,7 +58,10 @@ class PointsAlongGeometry(QgisAlgorithm):
END_OFFSET = 'END_OFFSET'

def icon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'extract_nodes.png'))
return QgsApplication.getThemeIcon("/algorithms/mAlgorithmExtractVertices.svg")

def svgIconPath(self):
return QgsApplication.iconPath("/algorithms/mAlgorithmExtractVertices.svg")

def tags(self):
return self.tr('create,interpolate,points,lines,regular,distance,by').split(',')
@@ -27,7 +27,8 @@

import os

from qgis.core import (QgsWkbTypes,
from qgis.core import (QgsApplication,
QgsWkbTypes,
QgsField,
NULL,
QgsFeatureSink,
@@ -53,7 +54,10 @@ class PoleOfInaccessibility(QgisAlgorithm):
OUTPUT = 'OUTPUT'

def icon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'centroids.png'))
return QgsApplication.getThemeIcon("/algorithms/mAlgorithmCentroids.svg")

def svgIconPath(self):
return QgsApplication.iconPath("/algorithms/mAlgorithmCentroids.svg")

def tags(self):
return self.tr('furthest,point,distant,extreme,maximum,centroid,center,centre').split(',')
@@ -29,7 +29,8 @@

from qgis.PyQt.QtGui import QIcon

from qgis.core import (QgsWkbTypes,
from qgis.core import (QgsApplication,
QgsWkbTypes,
QgsProcessing,
QgsProcessingException,
QgsProcessingAlgorithm,
@@ -58,7 +59,10 @@ class VariableDistanceBuffer(QgisAlgorithm):
MITER_LIMIT = 'MITER_LIMIT'

def icon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'buffer.png'))
return QgsApplication.getThemeIcon("/algorithms/mAlgorithmBuffer.svg")

def svgIconPath(self):
return QgsApplication.iconPath("/algorithms/mAlgorithmBuffer.svg")

def group(self):
return self.tr('Vector geometry')

0 comments on commit adf5eb7

Please sign in to comment.
You can’t perform that action at this time.