-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathWorkflowInstructionsAlgorithm.py
57 lines (41 loc) · 1.63 KB
/
WorkflowInstructionsAlgorithm.py
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
from qgis.PyQt.QtCore import QCoreApplication
from qgis.core import QgsProcessingAlgorithm
from processing.gui.AlgorithmDialog import AlgorithmDialog
# An empty GeoAlgorithm to be used as a dummy when wanting to
# display an purely instruction step in a workflow.
class WorkflowInstructionsAlgorithm(QgsProcessingAlgorithm):
def __init__(self):
QgsProcessingAlgorithm.__init__(self)
self._name = "workflowinstructions"
self._displayName = self.tr("Workflow instructions")
self._group = self.tr("Workflow-only tools")
self._groupId = "workflowtools"
def initAlgorithm(self, config=None):
pass
def createInstance(self):
return WorkflowInstructionsAlgorithm()
def processAlgorithm(self, parameters, context, progress):
pass
def name(self):
return self._name
def displayName(self):
return self._displayName
def shortDescription(self):
return self._name
def group(self):
return self._group
def groupId(self):
return self._groupId
def flags(self):
return super().flags() | (QgsProcessingAlgorithm.FlagNoThreading |
QgsProcessingAlgorithm.FlagDisplayNameIsLiteral |
QgsProcessingAlgorithm.FlagHideFromToolbox |
QgsProcessingAlgorithm.FlagHideFromModeler)
def helpUrl(self):
return ""
def svgIconPath(self):
return ""
def tr(self, string, context=''):
if context == '':
context = self.__class__.__name__
return QCoreApplication.translate(context, string)