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

Inheritance diagram of qgis.gui.QgsSymbolLayerWidget

Base classes

QWidget

QObject

QPaintDevice

Subclasses

QgsAnimatedMarkerSymbolLayerWidget

A widget for configuring QgsAnimatedMarkerSymbolLayer symbol layers.

QgsArrowSymbolLayerWidget

A widget for configuring a QgsArrowSymbolLayer.

QgsCentroidFillSymbolLayerWidget

A widget for controlling the properties of a QgsCentroidFillSymbolLayer.

QgsEllipseSymbolLayerWidget

A widget for configuring a QgsEllipseSymbolLayer.

QgsFilledLineSymbolLayerWidget

A widget for configuring QgsFilledLineSymbolLayer.

QgsFilledMarkerSymbolLayerWidget

A widget for configuring QgsFilledMarkerSymbolLayer symbol layers.

QgsFontMarkerSymbolLayerWidget

A widget for controlling the properties of a QgsFontMarkerSymbolLayer.

QgsGeometryGeneratorSymbolLayerWidget

A widget for controlling the properties of a QgsGeometryGeneratorSymbolLayer.

QgsGradientFillSymbolLayerWidget

A widget for controlling the properties of a QgsGradientFillSymbolLayer.

QgsTemplatedLineSymbolLayerWidget

A widget for controlling the properties of a templated line symbol layer (hash or markers).

QgsInterpolatedLineSymbolLayerWidget

A widget for configuring a QgsInterpolatedLineSymbolLayer.

QgsLinePatternFillSymbolLayerWidget

A widget for controlling the properties of a QgsLinePatternFillSymbolLayer.

QgsLinearReferencingSymbolLayerWidget

A widget for controlling the properties of a QgsLinearReferencingSymbolLayer.

QgsLineburstSymbolLayerWidget

A widget for configuring QgsLineburstSymbolLayer symbol layers.

QgsMaskMarkerSymbolLayerWidget

Symbol layer widget for the handling of QgsMaskMarkerSymbolLayer.

QgsPointPatternFillSymbolLayerWidget

A widget for controlling the properties of a QgsPointPatternFillSymbolLayer.

QgsRandomMarkerFillSymbolLayerWidget

A widget for controlling the properties of a QgsRandomMarkerFillSymbolLayer.

QgsRasterFillSymbolLayerWidget

A widget for controlling the properties of a QgsRasterFillSymbolLayer.

QgsRasterLineSymbolLayerWidget

A widget for configuring QgsRasterLineSymbolLayer symbol layers.

QgsRasterMarkerSymbolLayerWidget

A widget for configuring QgsRasterMarkerSymbolLayer symbol layers.

QgsSVGFillSymbolLayerWidget

A widget for controlling the properties of a QgsSVGFillSymbolLayer.

QgsShapeburstFillSymbolLayerWidget

A widget for controlling the properties of a QgsShapeburstFillSymbolLayer.

QgsSimpleFillSymbolLayerWidget

A widget for controlling the properties of a QgsSimpleFillSymbolLayer.

QgsSimpleLineSymbolLayerWidget

A widget for controlling the properties of a QgsSimpleLineSymbolLayer.

QgsSimpleMarkerSymbolLayerWidget

A widget for controlling the properties of a QgsSimpleMarkerSymbolLayer.

QgsSvgMarkerSymbolLayerWidget

A widget for controlling the properties of a QgsSvgMarkerSymbolLayer.

QgsVectorFieldSymbolLayerWidget

A widget for configuring a QgsVectorFieldSymbolLayer.

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]

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

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

setContext()

Return type:

QgsSymbolWidgetContext

virtual createExpressionContext(self) QgsExpressionContext[source]
Return type:

QgsExpressionContext

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:
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

context()

abstract setSymbolLayer(self, layer: QgsSymbolLayer | None)[source]
Parameters:

layer (Optional[QgsSymbolLayer])

signal symbolChanged[source]

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

abstract symbolLayer(self) QgsSymbolLayer | None[source]
Return type:

Optional[QgsSymbolLayer]

updateDataDefinedProperty(self)[source]
vectorLayer(self) QgsVectorLayer | None[source]

Returns the vector layer associated with the widget.

Return type:

Optional[QgsVectorLayer]