Class: QgsVectorLayerSelectedFeatureSource

class qgis.core.QgsVectorLayerSelectedFeatureSource(layer: QgsVectorLayer)

Bases: qgis._core.QgsFeatureSource, qgis._core.QgsExpressionContextScopeGenerator

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.

QgsVectorLayerSelectedFeatureSource(QgsVectorLayerSelectedFeatureSource)

QgsFeatureSource subclass for the selected features from a QgsVectorLayer.

New in version 3.0: Enums

Methods

createExpressionContextScope
featureCount
fields
getFeatures
sourceCrs
sourceName
wkbType

Signals

Attributes

createExpressionContextScope(self) → QgsExpressionContextScope
featureCount(self) → int
fields(self) → QgsFields
getFeatures(self, request: QgsFeatureRequest = QgsFeatureRequest()) → QgsFeatureIterator
sourceCrs(self) → QgsCoordinateReferenceSystem
sourceName(self) → str
wkbType(self) → QgsWkbTypes.Type