Class: QgsSymbolLayerWidget¶
Abstract base class for widgets used to configure
QgsSymbolLayer
classes.
Note
This is an abstract class, with methods which must be implemented by a subclass.
The following methods must be implemented: setSymbolLayer()
, symbolLayer()
Class Hierarchy¶
Base classes¶
Subclasses¶
A widget for configuring |
|
A widget for configuring a |
|
A widget for controlling the properties of a |
|
A widget for configuring a |
|
A widget for configuring |
|
A widget for configuring |
|
A widget for controlling the properties of a |
|
A widget for controlling the properties of a |
|
A widget for controlling the properties of a |
|
A widget for controlling the properties of a |
|
A widget for configuring a |
|
A widget for controlling the properties of a |
|
A widget for controlling the properties of a |
|
A widget for configuring |
|
A widget for controlling the properties of a |
|
Symbol layer widget for the handling of |
|
A widget for controlling the properties of a |
|
A widget for controlling the properties of a |
|
A widget for controlling the properties of a |
|
A widget for configuring |
|
A widget for configuring |
|
A widget for controlling the properties of a |
|
A widget for controlling the properties of a |
|
A widget for controlling the properties of a |
|
A widget for controlling the properties of a |
|
A widget for controlling the properties of a |
|
A widget for controlling the properties of a |
|
A widget for configuring a |
Abstract Methods
Methods
Returns the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts. |
|
Registers a data defined override button. |
|
Returns the vector layer associated with the widget. |
Virtual Methods
In PyQGIS, only methods marked as virtual
can be safely overridden in a Python subclass of QgsSymbolLayerWidget. See the FAQ for more details.
Sets the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts. |
Signals
Should be emitted whenever configuration changes happened on this symbol layer configuration. |
|
Should be emitted whenever the sub symbol changed on this symbol layer configuration. |
- class qgis.gui.QgsSymbolLayerWidget[source]¶
Bases:
QWidget
- __init__(parent: QWidget | None, vl: QgsVectorLayer | None = None)
Constructor for QgsSymbolLayerWidget.
- Parameters:
vl (Optional[QgsVectorLayer] = None) – associated vector layer
parent (Optional[QWidget]) – parent widget
- signal changed[source]¶
Should be emitted whenever configuration changes happened on this symbol layer configuration. If the subsymbol is changed,
symbolChanged()
should be emitted instead.
- context(self) QgsSymbolWidgetContext [source]¶
Returns the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts.
See also
- Return type:
- virtual createExpressionContext(self) QgsExpressionContext [source]¶
- Return type:
- registerDataDefinedButton(self, button: QgsPropertyOverrideButton | None, key: QgsSymbolLayer.Property)[source]¶
Registers a data defined override button. Handles setting up connections for the button and initializing the button to show the correct descriptions and help text for the associated property.
- Parameters:
button (Optional[QgsPropertyOverrideButton])
key (QgsSymbolLayer.Property)
- virtual setContext(self, context: QgsSymbolWidgetContext)[source]¶
Sets the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts.
- Parameters:
context (QgsSymbolWidgetContext) – symbol widget context
See also
- abstract setSymbolLayer(self, layer: QgsSymbolLayer | None)[source]¶
- Parameters:
layer (Optional[QgsSymbolLayer])
- signal symbolChanged[source]¶
Should be emitted whenever the sub symbol changed on this symbol layer configuration. Normally
changed()
should be preferred.See also
- abstract symbolLayer(self) QgsSymbolLayer | None [source]¶
- Return type:
Optional[QgsSymbolLayer]
- vectorLayer(self) QgsVectorLayer | None [source]¶
Returns the vector layer associated with the widget.
- Return type:
Optional[QgsVectorLayer]