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
Returns the current layer selected in the combobox, or
None
if the selection cannot be represented as a map layer.Returns the current text of the selected item in the combobox.
Sets the combo box to the specified
layer
, iflayer
is compatible with the widget’s parameter definition.Sets the
value
shown in the widget.Returns the current value of the widget.
Signals
Emitted when the widget has triggered a file selection operation (to be handled in Python for now).
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
(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
-
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
, iflayer
is compatible with the widget’s parameter definition.
-
setValue
(self, value: Any, context: QgsProcessingContext)¶ Sets the
value
shown in the widget.See also
-
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
-
valueChanged
¶ Emitted whenever the value is changed in the widget. [signal]
-
wheelEvent
()¶
-