Class: QgsRendererWidget¶
-
class
qgis.gui.
QgsRendererWidget
¶ Bases:
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
Methods
This method should be called whenever the renderer is actually set on the layer.
Change marker angles of selected symbols
Change color of selected symbols
Change opacity of selected symbols
Change marker sizes of selected symbols
Change units mm/map units of selected symbols
Change line widths of selected symbols
Returns the context in which the renderer widget is shown, e.g., the associated map canvas and expression contexts.
- param p
Creates widget to setup data-defined size legend.
Returns pointer to the renderer (no transfer of ownership)
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&)*
Sets the context in which the renderer widget is shown, e.g., the associated map canvas and expression contexts.
show a dialog with renderer’s symbol level settings
Returns the vector layer associated with the widget.
Signals
Emitted when expression context variables on the associated vector layers have been changed.
Emitted when the symbol levels settings have been changed.
-
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
New in version 3.0.
- Return type
-
contextMenuEvent
()¶
-
contextMenuViewCategories
(self, p: QPoint)¶ - Parameters
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.
- Parameters
symbol (QgsMarkerSymbol) –
ddsLegend (QgsDataDefinedSizeLegend) –
- Return type
-
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)
- Return type
-
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&)*
- Return type
List[QgsSymbol]
-
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 (QgsSymbolWidgetContext) – symbol widget context
See also
New in version 3.0.
-
showEvent
()¶
-
showSymbolLevelsDialog
(self, r: QgsFeatureRenderer)¶ show a dialog with renderer’s symbol level settings
- Parameters
r (QgsFeatureRenderer) –
-
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.
- Return type
-
wheelEvent
()¶