Class: QgsMapLayerConfigWidgetContext¶
- class qgis.gui.QgsMapLayerConfigWidgetContext¶
Bases:
sip.wrapper
Encapsulates the context for a
QgsMapLayerConfigWidget
.New in version 3.22:
Methods
Returns the item ID of the target annotation, when modifying an annotation from a
QgsAnnotationLayer
.Returns the map canvas associated with the widget.
Returns the message bar associated with the widget.
Sets the item
id
of the target annotation, when modifying an annotation from aQgsAnnotationLayer
.Sets the map
canvas
associated with the widget.Sets the message
bar
associated with the widget.- annotationId(self) str ¶
Returns the item ID of the target annotation, when modifying an annotation from a
QgsAnnotationLayer
.See also
- Return type:
str
- mapCanvas(self) QgsMapCanvas ¶
Returns the map canvas associated with the widget.
See also
- Return type:
- messageBar(self) QgsMessageBar ¶
Returns the message bar associated with the widget.
See also
- Return type:
- setAnnotationId(self, id: str)¶
Sets the item
id
of the target annotation, when modifying an annotation from aQgsAnnotationLayer
.See also
- Parameters:
id (str) –
- setMapCanvas(self, canvas: QgsMapCanvas)¶
Sets the map
canvas
associated with the widget. This allows the widget to retrieve the current map scale and other properties from the canvas.See also
- Parameters:
canvas (QgsMapCanvas) –
- setMessageBar(self, bar: QgsMessageBar)¶
Sets the message
bar
associated with the widget. This allows the widget to push feedback messages to the appropriate message bar.See also
- Parameters:
bar (QgsMessageBar) –