QGIS API Documentation 3.41.0-Master (25ec5511245)
|
QgsFeatureSource subclass for the selected features from a QgsVectorLayer. More...
#include <qgsvectorlayerfeatureiterator.h>
Public Member Functions | |
QgsVectorLayerSelectedFeatureSource (const QgsVectorLayerSelectedFeatureSource &other)=delete | |
QgsVectorLayerSelectedFeatureSource (QgsVectorLayer *layer) | |
Constructor for QgsVectorLayerSelectedFeatureSource, for selected features from the specified layer. | |
QgsExpressionContextScope * | createExpressionContextScope () const override |
This method needs to be reimplemented in all classes which implement this interface and return an expression context scope. | |
long long | featureCount () const override |
Returns the number of features contained in the source, or -1 if the feature count is unknown. | |
QgsFields | fields () const override |
Returns the fields associated with features in the source. | |
QgsFeatureIterator | getFeatures (const QgsFeatureRequest &request=QgsFeatureRequest()) const override |
Returns an iterator for the features in the source. | |
Qgis::SpatialIndexPresence | hasSpatialIndex () const override |
Returns an enum value representing the presence of a valid spatial index on the source, if it can be determined. | |
QgsVectorLayerSelectedFeatureSource & | operator== (const QgsVectorLayerSelectedFeatureSource &other)=delete |
QgsCoordinateReferenceSystem | sourceCrs () const override |
Returns the coordinate reference system for features in the source. | |
QString | sourceName () const override |
Returns a friendly display name for the source. | |
Qgis::WkbType | wkbType () const override |
Returns the geometry type for features returned by this source. | |
Public Member Functions inherited from QgsFeatureSource | |
virtual | ~QgsFeatureSource ()=default |
virtual QgsFeatureIds | allFeatureIds () const |
Returns a list of all feature IDs for features present in the source. | |
virtual Qgis::FeatureAvailability | hasFeatures () const |
Determines if there are any features available in the source. | |
QgsVectorLayer * | materialize (const QgsFeatureRequest &request, QgsFeedback *feedback=nullptr) |
Materializes a request (query) made against this feature source, by running it over the source and returning a new memory based vector layer containing the result. | |
virtual QVariant | maximumValue (int fieldIndex) const |
Returns the maximum value for an attribute column or an invalid variant in case of error. | |
virtual QVariant | minimumValue (int fieldIndex) const |
Returns the minimum value for an attribute column or an invalid variant in case of error. | |
virtual QgsRectangle | sourceExtent () const |
Returns the extent of all geometries from the source. | |
virtual QgsBox3D | sourceExtent3D () const |
Returns the 3D extent of all geometries from the source. | |
virtual QSet< QVariant > | uniqueValues (int fieldIndex, int limit=-1) const |
Returns the set of unique values contained within the specified fieldIndex from this source. | |
Public Member Functions inherited from QgsExpressionContextScopeGenerator | |
virtual | ~QgsExpressionContextScopeGenerator ()=default |
QgsFeatureSource subclass for the selected features from a QgsVectorLayer.
Definition at line 369 of file qgsvectorlayerfeatureiterator.h.
QgsVectorLayerSelectedFeatureSource::QgsVectorLayerSelectedFeatureSource | ( | QgsVectorLayer * | layer | ) |
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.
Definition at line 1356 of file qgsvectorlayerfeatureiterator.cpp.
|
delete |
|
overridevirtual |
This method needs to be reimplemented in all classes which implement this interface and return an expression context scope.
Implements QgsExpressionContextScopeGenerator.
Definition at line 1413 of file qgsvectorlayerfeatureiterator.cpp.
|
overridevirtual |
Returns the number of features contained in the source, or -1 if the feature count is unknown.
Implements QgsFeatureSource.
Definition at line 1403 of file qgsvectorlayerfeatureiterator.cpp.
|
overridevirtual |
Returns the fields associated with features in the source.
Implements QgsFeatureSource.
Definition at line 1393 of file qgsvectorlayerfeatureiterator.cpp.
|
overridevirtual |
Returns an iterator for the features in the source.
An optional request can be used to optimise the returned iterator, eg by restricting the returned attributes or geometry.
Implements QgsFeatureSource.
Definition at line 1364 of file qgsvectorlayerfeatureiterator.cpp.
|
overridevirtual |
Returns an enum value representing the presence of a valid spatial index on the source, if it can be determined.
If QgsFeatureSource::SpatialIndexUnknown is returned then the presence of an index cannot be determined.
Reimplemented from QgsFeatureSource.
Definition at line 1421 of file qgsvectorlayerfeatureiterator.cpp.
|
delete |
|
overridevirtual |
Returns the coordinate reference system for features in the source.
Implements QgsFeatureSource.
Definition at line 1388 of file qgsvectorlayerfeatureiterator.cpp.
|
overridevirtual |
Returns a friendly display name for the source.
The returned value can be an empty string.
Implements QgsFeatureSource.
Definition at line 1408 of file qgsvectorlayerfeatureiterator.cpp.
|
overridevirtual |
Returns the geometry type for features returned by this source.
Implements QgsFeatureSource.
Definition at line 1398 of file qgsvectorlayerfeatureiterator.cpp.