-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathWorkflowOnlyAlgorithmProvider.py
More file actions
40 lines (27 loc) · 1.01 KB
/
Copy pathWorkflowOnlyAlgorithmProvider.py
File metadata and controls
40 lines (27 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
from qgis.core import QgsProcessingProvider
from processing_workflow.WorkflowUtils import WorkflowUtils
from processing_workflow.WorkflowInstructionsAlgorithm import WorkflowInstructionsAlgorithm
# A basic provider for algorithms that can only be used within workflows.
# Currently it only includes the workflow instructions algorithm.
class WorkflowOnlyAlgorithmProvider(QgsProcessingProvider):
def __init__(self):
QgsProcessingProvider.__init__(self)
def name(self):
return 'workflowtools'
def longName(self):
return self.tr('Workflow-only tools')
def icon(self):
return WorkflowUtils.workflowIcon()
def id(self):
return "workflowtools"
def helpId(self):
return ""
def load(self):
self.loadAlgorithms()
return True
def unload(self):
QgsProcessingProvider.unload(self)
def loadAlgorithms(self):
self.algs = [WorkflowInstructionsAlgorithm()]
for alg in self.algs:
self.addAlgorithm(alg)