Class: QgsSymbolSelectorDialog

A dialog that can be used to select and build a symbol.

QgsSymbolSelectorDialog

QgsSymbolSelectorDialog

Class Hierarchy

Inheritance diagram of qgis.gui.QgsSymbolSelectorDialog

Base classes

QDialog

QWidget

QObject

QPaintDevice

Methods

addLayer

advancedMenu

Returns menu for "advanced" button - create it if doesn't exist and show the advanced button

buttonBox

Returns a reference to the dialog's button box.

changeLayer

Alters tree and sets proper widget when Layer Type is changed

context

Returns the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts.

duplicateLayer

Duplicates the current symbol layer and places the duplicated layer above the current symbol layer

layerChanged

lockLayer

moveLayerDown

moveLayerUp

removeLayer

setContext

Sets the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts.

symbol

Returns the symbol that is currently active in the widget.

symbolChanged

Slot to update tree when a new symbol from style

updateLayerPreview

updatePreview

Signals

symbolModified

Emitted when the symbol defined in the dialog is modified.

class qgis.gui.QgsSymbolSelectorDialog[source]

Bases: QDialog

__init__(symbol: QgsSymbol | None, style: QgsStyle | None, vl: QgsVectorLayer | None, parent: QWidget | None = None, embedded: bool = False)

Constructor for QgsSymbolSelectorDialog.

Parameters:
  • symbol (Optional[QgsSymbol]) – The symbol

  • style (Optional[QgsStyle]) – The style

  • vl (Optional[QgsVectorLayer]) – Associated vector layer

  • parent (Optional[QWidget] = None) – Parent widget

  • embedded (bool = False) – True to embed in renderer properties dialog, False otherwise

addLayer(self)[source]
advancedMenu(self) QMenu | None[source]

Returns menu for “advanced” button - create it if doesn’t exist and show the advanced button

Return type:

Optional[QMenu]

buttonBox(self) QDialogButtonBox | None[source]

Returns a reference to the dialog’s button box.

Added in version 3.10.

Return type:

Optional[QDialogButtonBox]

changeLayer(self, layer: QgsSymbolLayer | None)[source]

Alters tree and sets proper widget when Layer Type is changed

Note

The layer is received from the LayerPropertiesWidget

Parameters:

layer (Optional[QgsSymbolLayer])

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

duplicateLayer(self)[source]

Duplicates the current symbol layer and places the duplicated layer above the current symbol layer

layerChanged(self)[source]
lockLayer(self)[source]
moveLayerDown(self)[source]
moveLayerUp(self)[source]
removeLayer(self)[source]
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()

symbol(self) QgsSymbol | None[source]

Returns the symbol that is currently active in the widget. Can be None.

Return type:

Optional[QgsSymbol]

Returns:

The active symbol.

symbolChanged(self)[source]

Slot to update tree when a new symbol from style

signal symbolModified[source]

Emitted when the symbol defined in the dialog is modified.

updateLayerPreview(self)[source]
updatePreview(self)[source]