Skip to content
Permalink
Browse files

[processing] Add some more tags and icons to stats algs

  • Loading branch information
nyalldawson committed May 28, 2018
1 parent b6f2f7b commit b56f1132fcf04f77a2cbb6bee9e0ece2f8e4699f
@@ -82,8 +82,8 @@ def svgIconPath(self):
return QgsApplication.iconPath("/algorithms/mAlgorithmBasicStatistics.svg")

def tags(self):
return self.tr('stats,statistics,date,time,datetime,string,number,text,table,layer,maximum,minimum,mean,average,standard,deviation,'
'count,distinct,unique,variance,median,quartile,range,majority,minority').split(',')
return self.tr('stats,statistics,date,time,datetime,string,number,text,table,layer,sum,maximum,minimum,mean,average,standard,deviation,'
'count,distinct,unique,variance,median,quartile,range,majority,minority,summary').split(',')

def group(self):
return self.tr('Vector analysis')
@@ -32,6 +32,7 @@
from qgis.PyQt.QtGui import QIcon
from qgis.PyQt.QtCore import QVariant
from qgis.core import (NULL,
QgsApplication,
QgsField,
QgsFields,
QgsFeatureSink,
@@ -74,6 +75,12 @@ def groupId(self):
def __init__(self):
super().__init__()

def icon(self):
return QgsApplication.getThemeIcon("/algorithms/mAlgorithmBasicStatistics.svg")

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

def initAlgorithm(self, config=None):
self.predicates = (
('intersects', self.tr('intersects')),
@@ -144,8 +151,9 @@ def displayName(self):

def tags(self):
return self.tr(
"summary,aggregate,join,intersects,intersecting,touching,within,contains,overlaps,relation,spatial").split(
',')
"summary,aggregate,join,intersects,intersecting,touching,within,contains,overlaps,relation,spatial,"
"stats,statistics,sum,maximum,minimum,mean,average,standard,deviation,"
"count,distinct,unique,variance,median,quartile,range,majority,minority,histogram,distinct").split(',')

def processAlgorithm(self, parameters, context, feedback):
source = self.parameterAsSource(parameters, self.INPUT, context)
@@ -30,6 +30,7 @@
QgsDateTimeStatisticalSummary,
QgsStringStatisticalSummary,
QgsFeatureRequest,
QgsApplication,
QgsProcessingException,
QgsProcessingParameterField,
QgsProcessingParameterFeatureSink,
@@ -61,7 +62,14 @@ def groupId(self):
return 'vectoranalysis'

def tags(self):
return self.tr('groups').split(',')
return self.tr('groups,stats,statistics,table,layer,sum,maximum,minimum,mean,average,standard,deviation,'
'count,distinct,unique,variance,median,quartile,range,majority,minority,histogram,distinct,summarygit di').split(',')

def icon(self):
return QgsApplication.getThemeIcon("/algorithms/mAlgorithmBasicStatistics.svg")

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

def __init__(self):
super().__init__()

0 comments on commit b56f113

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