Class: QgsVectorLayerSelectionProperties

Implementation of layer selection properties for vector layers.

Added in version 3.34.

Class Hierarchy

Inheritance diagram of qgis.core.QgsVectorLayerSelectionProperties

Base classes

QgsMapLayerSelectionProperties

Base class for storage of map layer selection properties.

QObject

class qgis.core.QgsVectorLayerSelectionProperties[source]

Bases: QgsMapLayerSelectionProperties

__init__(parent: QObject | None = None)

Constructor for QgsVectorLayerSelectionProperties, with the specified parent object.

Parameters:

parent (Optional[QObject] = None)

selectionColor(self) QColor[source]

Returns the color to use for rendering selected features in the layer.

An invalid color indicates that the default (i.e. project level) selection color should be used instead.

Return type:

QColor

signal selectionColorChanged[source]

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

selectionRenderingMode(self) Qgis.SelectionRenderingMode[source]

Returns the selection rendering mode to use for selected features in the layer.

Return type:

Qgis.SelectionRenderingMode

signal selectionRenderingModeChanged[source]

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

selectionSymbol(self) QgsSymbol | None[source]

Returns the symbol used to render selected features in the layer.

May be None if the default symbol should be used instead.

Return type:

Optional[QgsSymbol]

signal selectionSymbolChanged[source]

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

setSelectionColor(self, color: QColor | Qt.GlobalColor)[source]

Sets the color to use for rendering selected features in the layer.

An invalid color indicates that the default (i.e. project level) selection color should be used instead.

See also

selectionColor()

Parameters:

color (Union[QColor, Qt.GlobalColor])

setSelectionRenderingMode(self, mode: Qgis.SelectionRenderingMode)[source]

Sets the selection rendering mode to use for selected features in the layer.

Parameters:

mode (Qgis.SelectionRenderingMode)

setSelectionSymbol(self, symbol: QgsSymbol | None)[source]

Sets the symbol used to render selected features in the layer.

Ownership of symbol is transferred to the plot. If symbol is None then the default symbol will be used instead.

Parameters:

symbol (Optional[QgsSymbol])