Created
January 16, 2023 15:18
-
-
Save ghtmtt/b1be418c9630e36b8af04011b82a642e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
*************************************************************************** | |
* * | |
* This program is free software; you can redistribute it and/or modify * | |
* it under the terms of the GNU General Public License as published by * | |
* the Free Software Foundation; either version 2 of the License, or * | |
* (at your option) any later version. * | |
* * | |
*************************************************************************** | |
""" | |
from qgis.PyQt.QtCore import QCoreApplication | |
from qgis.core import (QgsProcessing, | |
QgsProcessingParameterEnum, | |
QgsProcessingAlgorithm, | |
) | |
class ExampleProcessingAlgorithm2(QgsProcessingAlgorithm): | |
INPUT = 'INPUT' | |
def tr(self, string): | |
return QCoreApplication.translate('Processing', string) | |
def createInstance(self): | |
return ExampleProcessingAlgorithm2() | |
def name(self): | |
return 'myscript2' | |
def displayName(self): | |
return self.tr('My Script2') | |
def group(self): | |
return self.tr('Example scripts 2') | |
def groupId(self): | |
return 'examplescripts' | |
def initAlgorithm(self, config=None): | |
self.addParameter( | |
QgsProcessingParameterEnum( | |
self.INPUT, | |
self.tr('Enum'), | |
allowMultiple=True | |
) | |
) | |
def processAlgorithm(self, parameters, context, feedback): | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment