Class: QgsProcessingMapLayerComboBox

class qgis.gui.QgsProcessingMapLayerComboBox(parameter: QgsProcessingParameterDefinition, parent: QWidget = None)

Bases: PyQt5.QtWidgets.QWidget

Constructor for QgsProcessingMapLayerComboBox, with the specified parameter definition.

Processing map layer combo box.

Warning

Not part of stable API and may change in future QGIS releases.

New in version 3.8: Enums

Methods

actionEvent

changeEvent

childEvent

closeEvent

connectNotify

contextMenuEvent

create

currentLayer

Returns the current layer selected in the combobox, or None if the selection cannot be represented as a map layer.

currentText

Returns the current text of the selected item in the combobox.

customEvent

destroy

disconnectNotify

dragEnterEvent

dragLeaveEvent

dragMoveEvent

dropEvent

enterEvent

event

focusInEvent

focusNextChild

focusNextPrevChild

focusOutEvent

focusPreviousChild

hideEvent

initPainter

inputMethodEvent

isSignalConnected

keyPressEvent

keyReleaseEvent

leaveEvent

metric

mouseDoubleClickEvent

mouseMoveEvent

mousePressEvent

mouseReleaseEvent

moveEvent

nativeEvent

paintEvent

receivers

resizeEvent

sender

senderSignalIndex

setLayer

Sets the combo box to the specified layer, if layer is compatible with the widget’s parameter definition.

setValue

Sets the value shown in the widget.

sharedPainter

showEvent

tabletEvent

timerEvent

updateMicroFocus

value

Returns the current value of the widget.

wheelEvent

Signals

triggerFileSelection

Emitted when the widget has triggered a file selection operation (to be handled in Python for now).

valueChanged

Emitted whenever the value is changed in the widget.

Attributes

actionEvent()
changeEvent()
childEvent()
closeEvent()
connectNotify()
contextMenuEvent()
create()
currentLayer(self) → QgsMapLayer

Returns the current layer selected in the combobox, or None if the selection cannot be represented as a map layer.

Warning

Prefer calling value() instead, as it correctly encapsulates all valid values which can be represented by the widget.

See also

currentText()

currentText(self) → str

Returns the current text of the selected item in the combobox.

Warning

Prefer calling value() instead, as it correctly encapsulates all valid values which can be represented by the widget.

See also

currentLayer()

customEvent()
destroy()
disconnectNotify()
dragEnterEvent(self, event: QDragEnterEvent)
dragLeaveEvent(self, event: QDragLeaveEvent)
dragMoveEvent()
dropEvent(self, event: QDropEvent)
enterEvent()
event()
focusInEvent()
focusNextChild()
focusNextPrevChild()
focusOutEvent()
focusPreviousChild()
hideEvent()
initPainter()
inputMethodEvent()
isSignalConnected()
keyPressEvent()
keyReleaseEvent()
leaveEvent()
metric()
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
moveEvent()
nativeEvent()
paintEvent()
receivers()
resizeEvent()
sender()
senderSignalIndex()
setLayer(self, layer: QgsMapLayer)

Sets the combo box to the specified layer, if layer is compatible with the widget’s parameter definition.

setValue(self, value: Any, context: QgsProcessingContext)

Sets the value shown in the widget.

See also

value()

sharedPainter()
showEvent()
tabletEvent()
timerEvent()
triggerFileSelection

Emitted when the widget has triggered a file selection operation (to be handled in Python for now). [signal]

updateMicroFocus()
value(self) → Any

Returns the current value of the widget.

See also

setValue()

valueChanged

Emitted whenever the value is changed in the widget. [signal]

wheelEvent()