Class: QgsVectorLayerSelectedFeatureSource

class qgis.core.QgsVectorLayerSelectedFeatureSource

Bases: QgsFeatureSource, QgsExpressionContextScopeGenerator

QgsFeatureSource subclass for the selected features from a QgsVectorLayer.

QgsVectorLayerSelectedFeatureSource(layer: QgsVectorLayer) 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.

Methods

createExpressionContextScope

rtype:

QgsExpressionContextScope

featureCount

rtype:

int

fields

rtype:

QgsFields

getFeatures

param request:

hasSpatialIndex

rtype:

Qgis.SpatialIndexPresence

sourceCrs

rtype:

QgsCoordinateReferenceSystem

sourceName

rtype:

str

wkbType

rtype:

Qgis.WkbType

createExpressionContextScope(self) QgsExpressionContextScope
Return type:

QgsExpressionContextScope

featureCount(self) int
Return type:

int

fields(self) QgsFields
Return type:

QgsFields

getFeatures(self, request: QgsFeatureRequest = QgsFeatureRequest()) QgsFeatureIterator
Parameters:

request (QgsFeatureRequest = QgsFeatureRequest())

Return type:

QgsFeatureIterator

hasSpatialIndex(self) Qgis.SpatialIndexPresence
Return type:

Qgis.SpatialIndexPresence

sourceCrs(self) QgsCoordinateReferenceSystem
Return type:

QgsCoordinateReferenceSystem

sourceName(self) str
Return type:

str

wkbType(self) Qgis.WkbType
Return type:

Qgis.WkbType