def __init__(self,
                 name='',
                 description='',
                 options=[],
                 default=None,
                 isSource=False,
                 multiple=False,
                 optional=False):

        QgsProcessingParameterDefinition.__init__(self, name, description,
                                                  default, optional)

        self.setMetadata({
            'widget_wrapper': {
                'class':
                'processing.algs.otb.OtbChoiceWidget.OtbChoiceWidgetWrapper'
            }
        })
        self.options = options

        if default is not None:
            try:
                self.default = int(default)
            except:
                self.default = 0
            self.value = self.default
Exemple #2
0
    def __init__(self,
                 name='',
                 description='',
                 options=[],
                 default=None,
                 isSource=False,
                 multiple=False,
                 optional=False):

        QgsProcessingParameterDefinition.__init__(self, name, description,
                                                  default, optional)

        self.setMetadata({'widget_wrapper': {'class': LittoDynValueWrapper}})
    def __init__(self, name='', description='', options=[], default=None, isSource=False,
                 multiple=False, optional=False):

        QgsProcessingParameterDefinition.__init__(self, name, description, default, optional)

        self.setMetadata({
            'widget_wrapper': {
                'class': 'processing.algs.otb.OtbChoiceWidget.OtbChoiceWidgetWrapper'}})
        self.options = options

        if default is not None:
            try:
                self.default = int(default)
            except:
                self.default = 0
            self.value = self.default
    def __init__(
        self,
        name="",
        description="",
        options=[],
        default=None,
        isSource=False,
        multiple=False,
        optional=False,
    ):

        QgsProcessingParameterDefinition.__init__(
            self, name, description, default, optional
        )

        self.setMetadata({"widget_wrapper": {"class": LittoDynRasterComboBoxWrapper}})