Class: QgsMapLayerConfigWidgetContext¶
Encapsulates the context for a QgsMapLayerConfigWidget.
Added in version 3.22.
Methods
Returns the item ID of the target annotation, when modifying an annotation from a |
|
Returns the layer tree group associated with the widget. |
|
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 a |
|
Sets the layer tree group associated with the widget. |
|
Sets the map canvas associated with the widget. |
|
Sets the message bar associated with the widget. |
- class qgis.gui.QgsMapLayerConfigWidgetContext[source]¶
Bases:
object- annotationId(self) str[source]¶
Returns the item ID of the target annotation, when modifying an annotation from a
QgsAnnotationLayer.See also
- Return type:
str
- layerTreeGroup(self) QgsLayerTreeGroup | None[source]¶
Returns the layer tree group associated with the widget.
See also
Added in version 3.24.
- Return type:
Optional[QgsLayerTreeGroup]
- mapCanvas(self) QgsMapCanvas | None[source]¶
Returns the map canvas associated with the widget.
See also
- Return type:
Optional[QgsMapCanvas]
- messageBar(self) QgsMessageBar | None[source]¶
Returns the message bar associated with the widget.
See also
- Return type:
Optional[QgsMessageBar]
- setAnnotationId(self, id: str | None)[source]¶
Sets the item
idof the target annotation, when modifying an annotation from aQgsAnnotationLayer.See also
- Parameters:
id (Optional[str])
- setLayerTreeGroup(self, group: QgsLayerTreeGroup | None)[source]¶
Sets the layer tree
groupassociated with the widget.See also
Added in version 3.24.
- Parameters:
group (Optional[QgsLayerTreeGroup])
- setMapCanvas(self, canvas: QgsMapCanvas | None)[source]¶
Sets the map
canvasassociated with the widget. This allows the widget to retrieve the current map scale and other properties from the canvas.See also
- Parameters:
canvas (Optional[QgsMapCanvas])
- setMessageBar(self, bar: QgsMessageBar | None)[source]¶
Sets the message
barassociated with the widget. This allows the widget to push feedback messages to the appropriate message bar.See also
- Parameters:
bar (Optional[QgsMessageBar])