Class: QgsVectorLayerSelectedFeatureSource

QgsFeatureSource subclass for the selected features from a QgsVectorLayer.

List of all members, including inherited members

Class Hierarchy

Inheritance diagram of qgis.core.QgsVectorLayerSelectedFeatureSource

Base classes

QgsFeatureSource

An interface for objects which provide features via a getFeatures method.

QgsExpressionContextScopeGenerator

Abstract interface for generating an expression context scope.

Constructor

__init__

Virtual Methods

In PyQGIS, only methods marked as virtual can be safely overridden in a Python subclass of QgsVectorLayerSelectedFeatureSource. See the FAQ for more details.

createExpressionContextScope

class qgis.core.QgsVectorLayerSelectedFeatureSource[source]

Bases: QgsFeatureSource, QgsExpressionContextScopeGenerator

__init__(layer: QgsVectorLayer | None)

Constructor for QgsVectorLayerSelectedFeatureSource, for selected features from the specified layer. The currently selected feature IDs are stored, so change to the layer selection after constructing the QgsVectorLayerSelectedFeatureSource will not be reflected.

Parameters:

layer (QgsVectorLayer|None)

virtual createExpressionContextScope(self) → QgsExpressionContextScope | None[source]
Return type:

QgsExpressionContextScope|None