Class: QgsCategorizedSymbolRendererWidget

class qgis.gui.QgsCategorizedSymbolRendererWidget(layer: QgsVectorLayer, style: QgsStyle, renderer: QgsFeatureRenderer)

Bases: QgsRendererWidget

Methods

actionEvent

addCategories

addCategory

applyChangeToSymbol

Applies current symbol to selected categories, or to all categories if none is selected

applyColorRamp

Applies the color ramp passed on by the color ramp button

categoriesDoubleClicked

param idx

categoryColumnChanged

param field

changeCategorizedSymbol

changeCategorySymbol

changeEvent

changeSelectedSymbols

Changes the selected symbols alone for the change button, if there is a selection

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

contextMenuEvent

contextMenuViewCategories

copy

create

param layer

currentCategoryRow

Returns row index for the currently selected category (-1 if on no selection)

customEvent

deleteAllCategories

deleteCategories

destroy

disconnectNotify

dragEnterEvent

dragLeaveEvent

dragMoveEvent

dropEvent

enterEvent

event

focusInEvent

focusNextChild

focusNextPrevChild

focusOutEvent

focusPreviousChild

hideEvent

initPainter

inputMethodEvent

isSignalConnected

keyPressEvent

param event

keyReleaseEvent

leaveEvent

matchToSymbols

Replaces category symbols with the symbols from a style that have a matching name.

matchToSymbolsFromLibrary

Replaces category symbols with the symbols from the users' symbol library that have a matching name.

matchToSymbolsFromXml

Prompts for selection of an xml file, then replaces category symbols with the symbols from the XML file with a matching name.

metric

mouseDoubleClickEvent

mouseMoveEvent

mousePressEvent

mouseReleaseEvent

moveEvent

nativeEvent

paintEvent

paste

pasteSymbolToSelection

populateCategories

receivers

refreshSymbolView

renderer

rtype

QgsFeatureRenderer

resizeEvent

rowsMoved

selectedCategories

Returns a list of indexes for the categories under selection

selectedCategoryList

rtype

List[QgsRendererCategory]

selectedSymbols

rtype

List[QgsSymbol]

sender

senderSignalIndex

setContext

param context

setSymbolLevels

param levels

sharedPainter

showEvent

showSymbolLevels

tabletEvent

timerEvent

updateMicroFocus

updateUiFromRenderer

wheelEvent

actionEvent(self, QActionEvent)
addCategories(self)
addCategory(self)
applyChangeToSymbol(self)

Applies current symbol to selected categories, or to all categories if none is selected

applyColorRamp(self)

Applies the color ramp passed on by the color ramp button

categoriesDoubleClicked(self, idx: QModelIndex)
Parameters

idx (QModelIndex) –

categoryColumnChanged(self, field: str)
Parameters

field (str) –

changeCategorizedSymbol(self)
changeCategorySymbol(self)
changeEvent(self, QEvent)
changeSelectedSymbols(self)

Changes the selected symbols alone for the change button, if there is a selection

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(self, QChildEvent)
closeEvent(self, QCloseEvent)
connectNotify(self, QMetaMethod)
contextMenuEvent(self, QContextMenuEvent)
contextMenuViewCategories(self, p: QPoint)
copy(self)
create(layer: QgsVectorLayer, style: QgsStyle, renderer: QgsFeatureRenderer) QgsRendererWidget
Parameters
Return type

QgsRendererWidget

currentCategoryRow(self) int

Returns row index for the currently selected category (-1 if on no selection)

Return type

int

customEvent(self, QEvent)
deleteAllCategories(self)
deleteCategories(self)
destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)
disconnectNotify(self, QMetaMethod)
dragEnterEvent(self, QDragEnterEvent)
dragLeaveEvent(self, QDragLeaveEvent)
dragMoveEvent(self, QDragMoveEvent)
dropEvent(self, QDropEvent)
enterEvent(self, QEvent)
event(self, QEvent) bool
focusInEvent(self, QFocusEvent)
focusNextChild(self) bool
focusNextPrevChild(self, bool) bool
focusOutEvent(self, QFocusEvent)
focusPreviousChild(self) bool
hideEvent(self, QHideEvent)
initPainter(self, QPainter)
inputMethodEvent(self, QInputMethodEvent)
isSignalConnected(self, QMetaMethod) bool
keyPressEvent(self, event: QKeyEvent)
Parameters

event (QKeyEvent) –

keyReleaseEvent(self, QKeyEvent)
leaveEvent(self, QEvent)
matchToSymbols(self, style: QgsStyle) int

Replaces category symbols with the symbols from a style that have a matching name.

Parameters

style (QgsStyle) – style containing symbols to match with

Return type

int

Returns

number of symbols matched

New in version 2.9.

matchToSymbolsFromLibrary(self)

Replaces category symbols with the symbols from the users’ symbol library that have a matching name.

See also

matchToSymbols()

New in version 2.9.

matchToSymbolsFromXml(self)

Prompts for selection of an xml file, then replaces category symbols with the symbols from the XML file with a matching name.

See also

matchToSymbols()

New in version 2.9.

metric(self, QPaintDevice.PaintDeviceMetric) int
mouseDoubleClickEvent(self, QMouseEvent)
mouseMoveEvent(self, QMouseEvent)
mousePressEvent(self, QMouseEvent)
mouseReleaseEvent(self, QMouseEvent)
moveEvent(self, QMoveEvent)
nativeEvent(self, Union[QByteArray, bytes, bytearray], sip.voidptr) Tuple[bool, int]
paintEvent(self, QPaintEvent)
paste(self)
pasteSymbolToSelection(self)
populateCategories(self)
receivers(self, PYQT_SIGNAL) int
refreshSymbolView(self)
renderer(self) QgsFeatureRenderer
Return type

QgsFeatureRenderer

resizeEvent(self, QResizeEvent)
rowsMoved(self)
selectedCategories(self) List[int]

Returns a list of indexes for the categories under selection

Return type

List[int]

selectedCategoryList(self) List[QgsRendererCategory]
Return type

List[QgsRendererCategory]

selectedSymbols(self) List[QgsSymbol]
Return type

List[QgsSymbol]

sender(self) QObject
senderSignalIndex(self) int
setContext(self, context: QgsSymbolWidgetContext)
Parameters

context (QgsSymbolWidgetContext) –

setSymbolLevels(self, levels: Iterable[QgsLegendSymbolItem], enabled: bool)
Parameters
sharedPainter(self) QPainter
showEvent(self, QShowEvent)
showSymbolLevels(self)
tabletEvent(self, QTabletEvent)
timerEvent(self, QTimerEvent)
updateMicroFocus(self)
updateUiFromRenderer(self)
wheelEvent(self, QWheelEvent)