Class: QgsSymbolSelectorWidget

class qgis.gui.QgsSymbolSelectorWidget(symbol: QgsSymbol, style: QgsStyle, vl: QgsVectorLayer, parent: QWidget = None)

Bases: QgsPanelWidget

Symbol selector widget that can be used to select and build a symbol

Parameters
  • symbol (QgsSymbol) – The symbol to load into the widget as a start point.

  • style (QgsStyle) – The style used by the widget.

  • vl (QgsVectorLayer) – The vector layer for the symbol.

  • parent (QWidget = None) –

Note

The ownership of the symbol is not transferred and must exist for the lifetime of the widget.

Symbol selector widget that can be used to select and build a symbol

Methods

actionEvent

addLayer

Add a symbol layer to the bottom of the stack.

advancedMenu

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

changeEvent

changeLayer

alters tree and sets proper widget when Layer Type is changed note: The layer is received from the LayerPropertiesWidget

childEvent

closeEvent

connectNotify

context

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

contextMenuEvent

create

customEvent

destroy

disconnectNotify

dragEnterEvent

dragLeaveEvent

dragMoveEvent

dropEvent

duplicateLayer

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

enterEvent

event

focusInEvent

focusNextChild

focusNextPrevChild

focusOutEvent

focusPreviousChild

hideEvent

initPainter

inputMethodEvent

isSignalConnected

keyPressEvent

keyReleaseEvent

layerChanged

Called when the layer changes in the widget.

leaveEvent

lockLayer

Lock the current active symbol layer.

metric

mouseDoubleClickEvent

mouseMoveEvent

mousePressEvent

mouseReleaseEvent

moveEvent

moveLayerDown

Move the active symbol layer down.

moveLayerUp

Move the active symbol layer up.

nativeEvent

paintEvent

receivers

removeLayer

Remove the current active symbol layer.

resizeEvent

sender

senderSignalIndex

setContext

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

sharedPainter

showEvent

symbol

Returns the symbol that is currently active in the widget.

symbolChanged

Slot to update tree when a new symbol from style

tabletEvent

timerEvent

updateLayerPreview

Update the single symbol layer preview in the widget.

updateMicroFocus

updatePreview

Update the preview of the whole symbol in the interface.

wheelEvent

Signals

symbolModified

Emitted when a symbol is modified in the widget.

actionEvent()
addLayer(self)

Add a symbol layer to the bottom of the stack.

advancedMenu(self) → QMenu

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

Return type

QMenu

changeEvent()
changeLayer(self, layer: QgsSymbolLayer)

alters tree and sets proper widget when Layer Type is changed note: The layer is received from the LayerPropertiesWidget

Parameters

layer (QgsSymbolLayer) –

childEvent()
closeEvent()
connectNotify()
context(self) → QgsSymbolWidgetContext

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

See also

setContext()

New in version 3.0.

Return type

QgsSymbolWidgetContext

contextMenuEvent()
create()
customEvent()
destroy()
disconnectNotify()
dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
dropEvent()
duplicateLayer(self)

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

New in version 2.14.

enterEvent()
event()
focusInEvent()
focusNextChild()
focusNextPrevChild()
focusOutEvent()
focusPreviousChild()
hideEvent()
initPainter()
inputMethodEvent()
isSignalConnected()
keyPressEvent()
keyReleaseEvent()
layerChanged(self)

Called when the layer changes in the widget. Updates the active properties for active symbol layer.

leaveEvent()
lockLayer(self)

Lock the current active symbol layer.

metric()
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
moveEvent()
moveLayerDown(self)

Move the active symbol layer down.

moveLayerUp(self)

Move the active symbol layer up.

nativeEvent()
paintEvent()
receivers()
removeLayer(self)

Remove the current active symbol layer.

resizeEvent()
sender()
senderSignalIndex()
setContext(self, context: QgsSymbolWidgetContext)

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()

New in version 3.0.

sharedPainter()
showEvent()
symbol(self) → QgsSymbol

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

Return type

QgsSymbol

Returns

The active symbol.

symbolChanged(self)

Slot to update tree when a new symbol from style

symbolModified

Emitted when a symbol is modified in the widget. [signal]

tabletEvent()
timerEvent()
updateLayerPreview(self)

Update the single symbol layer preview in the widget.

updateMicroFocus()
updatePreview(self)

Update the preview of the whole symbol in the interface.

wheelEvent()