Skip to content
Permalink
Browse files
Update PreconfiguredAlgorithm for new API
  • Loading branch information
nyalldawson committed Apr 3, 2017
1 parent 2be4c6a commit 6e8a696ef469beaeb6945b58b586503e4d0417aa
Showing with 8 additions and 4 deletions.
  1. +8 −4 python/plugins/processing/preconfigured/PreconfiguredAlgorithm.py
@@ -41,24 +41,28 @@ def __init__(self, descriptionFile):
self.description = json.load(f)
GeoAlgorithm.__init__(self)
self._group = ''
self._name = ''

def group(self):
return self._group

def displayName(self):
return self._name

def name(self):
return os.path.splitext(os.path.basename(self.descriptionFile))[0].lower()

def flags(self):
return QgsProcessingAlgorithm.FlagHideFromModeler

def getCopy(self):
newone = PreconfiguredAlgorithm(self.descriptionFile)
newone.outputs = []
newone.provider = self.provider
newone.name = self.name
newone._name = self._name
newone._group = self._group
return newone

def commandLineName(self):
return 'preconfigured:' + os.path.splitext(os.path.basename(self.descriptionFile))[0].lower()

def defineCharacteristics(self):
self.name = self.description["name"]
self._group = self.description["group"]

0 comments on commit 6e8a696

Please sign in to comment.