Class: QgsRendererWidget

class qgis.gui.QgsRendererWidget

Bases: qgis._gui.QgsPanelWidget

Base class for renderer settings widgets

WORKFLOW: - open renderer dialog with some RENDERER (never null!) - find out which widget to use - instantiate it and set in stacked widget - on any change of renderer type, create some default (dummy?) version and change the stacked widget - when clicked OK/Apply, get the renderer from active widget and clone it for the layer

Enums

Methods

actionEvent

apply

applyChanges

This method should be called whenever the renderer is actually set on the layer.

changeEvent

changeSymbolAngle

Change marker angles of selected symbols

changeSymbolColor

Change color of selected symbols

changeSymbolOpacity

Change opacity of selected symbols

changeSymbolSize

Change marker sizes of selected symbols

changeSymbolUnit

Change units mm/map units of selected symbols

changeSymbolWidth

Change line widths of selected symbols

childEvent

closeEvent

connectNotify

context

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

contextMenuEvent

contextMenuViewCategories

copy

create

createDataDefinedSizeLegendWidget

Creates widget to setup data-defined size legend.

customEvent

destroy

disconnectNotify

dragEnterEvent

dragLeaveEvent

dragMoveEvent

dropEvent

enterEvent

event

focusInEvent

focusNextChild

focusNextPrevChild

focusOutEvent

focusPreviousChild

hideEvent

initPainter

inputMethodEvent

isSignalConnected

keyPressEvent

keyReleaseEvent

leaveEvent

metric

mouseDoubleClickEvent

mouseMoveEvent

mousePressEvent

mouseReleaseEvent

moveEvent

nativeEvent

paintEvent

paste

receivers

refreshSymbolView

renderer

Returns pointer to the renderer (no transfer of ownership)

resizeEvent

selectedSymbols

Subclasses may provide the capability of changing multiple symbols at once by implementing the following two methods and by connecting the slot contextMenuViewCategories(const QPoint&)*

sender

senderSignalIndex

setContext

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

sharedPainter

showEvent

showSymbolLevelsDialog

show a dialog with renderer’s symbol level settings

tabletEvent

timerEvent

updateMicroFocus

vectorLayer

Returns the vector layer associated with the widget.

wheelEvent

Signals

layerVariablesChanged

Emitted when expression context variables on the associated vector layers have been changed.

symbolLevelsChanged

Emitted when the symbol levels settings have been changed.

Attributes

actionEvent()
apply()
applyChanges(self)

This method should be called whenever the renderer is actually set on the layer.

changeEvent()
changeSymbolAngle(self)

Change marker angles of selected symbols

changeSymbolColor(self)

Change color of selected symbols

changeSymbolOpacity(self)

Change opacity of selected symbols

changeSymbolSize(self)

Change marker sizes of selected symbols

changeSymbolUnit(self)

Change units mm/map units of selected symbols

changeSymbolWidth(self)

Change line widths of selected symbols

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

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

See also

setContext()

New in version 3.0.

contextMenuEvent()
contextMenuViewCategories(self, p: QPoint)
copy(self)
create()
createDataDefinedSizeLegendWidget(self, symbol: QgsMarkerSymbol, ddsLegend: QgsDataDefinedSizeLegend) → QgsDataDefinedSizeLegendWidget

Creates widget to setup data-defined size legend. Returns newly created panel - may be null if it could not be opened. Ownership is transferred to the caller.

New in version 3.0.

customEvent()
destroy()
disconnectNotify()
dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
dropEvent()
enterEvent()
event()
focusInEvent()
focusNextChild()
focusNextPrevChild()
focusOutEvent()
focusPreviousChild()
hideEvent()
initPainter()
inputMethodEvent()
isSignalConnected()
keyPressEvent()
keyReleaseEvent()
layerVariablesChanged

Emitted when expression context variables on the associated vector layers have been changed. Will request the parent dialog to re-synchronize with the variables. [signal]

leaveEvent()
metric()
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
moveEvent()
nativeEvent()
paintEvent()
paste(self)
receivers()
refreshSymbolView(self)
renderer(self) → QgsFeatureRenderer

Returns pointer to the renderer (no transfer of ownership)

resizeEvent()
selectedSymbols(self) → List[QgsSymbol]

Subclasses may provide the capability of changing multiple symbols at once by implementing the following two methods and by connecting the slot contextMenuViewCategories(const QPoint&)*

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

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

Parameters

context – symbol widget context

See also

context()

New in version 3.0.

sharedPainter()
showEvent()
showSymbolLevelsDialog(self, r: QgsFeatureRenderer)

show a dialog with renderer’s symbol level settings

symbolLevelsChanged

Emitted when the symbol levels settings have been changed. [signal]

tabletEvent()
timerEvent()
updateMicroFocus()
vectorLayer(self) → QgsVectorLayer

Returns the vector layer associated with the widget.

New in version 2.12.

wheelEvent()