Class: QgsProcessingParameterDefinitionDialog

class qgis.gui.QgsProcessingParameterDefinitionDialog

Bases: PyQt5.QtWidgets.QDialog

A dialog which allow users to specify the properties of a Processing parameter.

New in version 3.10.

QgsProcessingParameterDefinitionDialog(type: str, context: QgsProcessingContext, widgetContext: QgsProcessingParameterWidgetContext, definition: QgsProcessingParameterDefinition = None, algorithm: QgsProcessingAlgorithm = None, parent: QWidget = None) Constructor for QgsProcessingParameterDefinitionDialog, for a parameter of the specified type.

The context argument must specify a Processing context, which will be used by the widget to evaluate existing definition properties such as default values. Similarly, the widgetContext argument specifies the wider GUI context in which the widget will be used.

The optional definition argument may be used to provide a parameter definition to use to initially populate the dialog’s state.

Additionally, the optional algorithm parameter may be used to specify the algorithm or model associated with the parameter.

Methods

accept

actionEvent

changeEvent

childEvent

closeEvent

commentColor

Returns the color for the comments for the parameter.

comments

Returns the comments for the parameter.

connectNotify

contextMenuEvent

create

createParameter

Returns a new instance of a parameter definition, using the current settings defined in the dialog.

customEvent

destroy

disconnectNotify

dragEnterEvent

dragLeaveEvent

dragMoveEvent

dropEvent

enterEvent

event

eventFilter

focusInEvent

focusNextChild

focusNextPrevChild

focusOutEvent

focusPreviousChild

hideEvent

initPainter

inputMethodEvent

isSignalConnected

keyPressEvent

keyReleaseEvent

leaveEvent

metric

mouseDoubleClickEvent

mouseMoveEvent

mousePressEvent

mouseReleaseEvent

moveEvent

nativeEvent

paintEvent

receivers

registerProcessingContextGenerator

Registers a Processing context generator class that will be used to retrieve a Processing context for the widget when required.

resizeEvent

sender

senderSignalIndex

setCommentColor

Sets the color for the comments for the parameter.

setComments

Sets the comments for the parameter.

sharedPainter

showEvent

switchToCommentTab

Switches the dialog to the comments tab.

tabletEvent

timerEvent

updateMicroFocus

wheelEvent

accept(self)
actionEvent(self, QActionEvent)
changeEvent(self, QEvent)
childEvent(self, QChildEvent)
closeEvent(self, QCloseEvent)
commentColor(self)QColor

Returns the color for the comments for the parameter.

New in version 3.14.

Return type

QColor

comments(self)str

Returns the comments for the parameter.

See also

setComments()

New in version 3.14.

Return type

str

connectNotify(self, QMetaMethod)
contextMenuEvent(self, QContextMenuEvent)
create(self, window: sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)
createParameter(self, name: str = '')QgsProcessingParameterDefinition

Returns a new instance of a parameter definition, using the current settings defined in the dialog.

The name parameter specifies the name for the newly created parameter.

Parameters

name (str = '') –

Return type

QgsProcessingParameterDefinition

customEvent(self, QEvent)
destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)
disconnectNotify(self, QMetaMethod)
dragEnterEvent(self, QDragEnterEvent)
dragLeaveEvent(self, QDragLeaveEvent)
dragMoveEvent(self, QDragMoveEvent)
dropEvent(self, QDropEvent)
enterEvent(self, QEvent)
event(self, QEvent)bool
eventFilter(self, QObject, QEvent)bool
focusInEvent(self, QFocusEvent)
focusNextChild(self)bool
focusNextPrevChild(self, bool)bool
focusOutEvent(self, QFocusEvent)
focusPreviousChild(self)bool
hideEvent(self, QHideEvent)
initPainter(self, QPainter)
inputMethodEvent(self, QInputMethodEvent)
isSignalConnected(self, QMetaMethod)bool
keyPressEvent(self, QKeyEvent)
keyReleaseEvent(self, QKeyEvent)
leaveEvent(self, QEvent)
metric(self, QPaintDevice.PaintDeviceMetric)int
mouseDoubleClickEvent(self, QMouseEvent)
mouseMoveEvent(self, QMouseEvent)
mousePressEvent(self, QMouseEvent)
mouseReleaseEvent(self, QMouseEvent)
moveEvent(self, QMoveEvent)
nativeEvent(self, Union[QByteArray, bytes, bytearray], sip.voidptr)Tuple[bool, int]
paintEvent(self, QPaintEvent)
receivers(self, PYQT_SIGNAL)int
registerProcessingContextGenerator(self, generator: QgsProcessingContextGenerator)

Registers a Processing context generator class that will be used to retrieve a Processing context for the widget when required.

New in version 3.18.

Parameters

generator (QgsProcessingContextGenerator) –

resizeEvent(self, QResizeEvent)
sender(self)QObject
senderSignalIndex(self)int
setCommentColor(self, color: Union[QColor, Qt.GlobalColor])

Sets the color for the comments for the parameter.

See also

commentColor()

New in version 3.14.

Parameters

color (Union[QColor) –

setComments(self, comments: str)

Sets the comments for the parameter.

See also

comments()

New in version 3.14.

Parameters

comments (str) –

sharedPainter(self)QPainter
showEvent(self, QShowEvent)
switchToCommentTab(self)

Switches the dialog to the comments tab.

tabletEvent(self, QTabletEvent)
timerEvent(self, QTimerEvent)
updateMicroFocus(self)
wheelEvent(self, QWheelEvent)