Skip to content
Permalink
Browse files

[processing] added activateProvider method in Processing class

  • Loading branch information
volaya committed Jun 2, 2016
1 parent 1b905c8 commit 99c16f0ba54cb84730f1c0116d06f46e3b4f1163
Showing with 7 additions and 0 deletions.
  1. +7 −0 python/plugins/processing/core/Processing.py
@@ -132,6 +132,13 @@ def getProviderFromName(name):
"""Returns the provider with the given name."""
return algList.getProviderFromName(name)

@staticmethod
def activateProvider(providerOrName, activate=True):
providerName = providerOrName.getName() if isinstance(providerOrName, AlgorithmProvider) else providerOrName
name = 'ACTIVATE_' + providerName.upper().replace(' ', '_')
ProcessingConfig.setSettingValue(name, activate)
algList.providerUpdated.emit(providerName)

@staticmethod
def initialize():
if "model" in [p.getName() for p in Processing.providers]:

0 comments on commit 99c16f0

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