Class: QgsProcessingParameterDefinitionDialog¶
A dialog which allows users to specify the properties of a Processing parameter.
Added in version 3.10.
Class Hierarchy¶
Base classes¶
Methods
Returns the color for the comments for the parameter. |
|
Returns the comments for the parameter. |
|
Returns a new instance of a parameter definition, using the current settings defined in the dialog. |
|
Registers a Processing context generator class that will be used to retrieve a Processing context for the widget when required. |
|
Sets the color for the comments for the parameter. |
|
Sets the comments for the parameter. |
|
Switches the dialog to the comments tab. |
- class qgis.gui.QgsProcessingParameterDefinitionDialog[source]¶
Bases:
QDialog- __init__(type: str | None, context: QgsProcessingContext, widgetContext: QgsProcessingParameterWidgetContext, definition: QgsProcessingParameterDefinition | None = None, algorithm: QgsProcessingAlgorithm | None = None, parent: QWidget | None = None)
Constructor for QgsProcessingParameterDefinitionDialog, for a parameter of the specified
type.The
contextargument must specify a Processing context, which will be used by the widget to evaluate existingdefinitionproperties such as default values. Similarly, thewidgetContextargument specifies the wider GUI context in which the widget will be used.The optional
definitionargument may be used to provide a parameter definition to use to initially populate the dialog’s state.Additionally, the optional
algorithmparameter may be used to specify the algorithm or model associated with the parameter.- Parameters:
type (Optional[str])
context (QgsProcessingContext)
widgetContext (QgsProcessingParameterWidgetContext)
definition (Optional[QgsProcessingParameterDefinition] = None)
algorithm (Optional[QgsProcessingAlgorithm] = None)
parent (Optional[QWidget] = None)
- commentColor(self) QColor[source]¶
Returns the color for the comments for the parameter.
See also
Added in version 3.14.
- Return type:
QColor
- comments(self) str[source]¶
Returns the comments for the parameter.
See also
Added in version 3.14.
- Return type:
str
- createParameter(self, name: str | None = '') QgsProcessingParameterDefinition | None[source]¶
Returns a new instance of a parameter definition, using the current settings defined in the dialog.
The
nameparameter specifies the name for the newly created parameter.- Parameters:
name (Optional[str] = '')
- Return type:
Optional[QgsProcessingParameterDefinition]
- registerProcessingContextGenerator(self, generator: QgsProcessingContextGenerator | None)[source]¶
Registers a Processing context
generatorclass that will be used to retrieve a Processing context for the widget when required.Added in version 3.18.
- Parameters:
generator (Optional[QgsProcessingContextGenerator])
- setCommentColor(self, color: QColor | Qt.GlobalColor)[source]¶
Sets the color for the comments for the parameter.
See also
Added in version 3.14.
- Parameters:
color (Union[QColor, Qt.GlobalColor])