QgsVectorDataProviderFeaturePool class
A feature pool based on a vector data provider.
Contents
Base classes
- class QgsFeaturePool
- A feature pool is based on a vector layer and caches features.
Constructors, destructors, conversion operators
- QgsVectorDataProviderFeaturePool(QgsVectorLayer* layer, bool selectedOnly = false)
- Creates a new feature pool for the data provider of layer.
Public functions
- auto addFeature(QgsFeature& feature, QgsFeatureSink::Flags flags = nullptr) -> bool override
- Adds a single feature to the sink.
- auto addFeatures(QgsFeatureList& features, QgsFeatureSink::Flags flags = nullptr) -> bool override
- Adds a list of features to the sink.
- void deleteFeature(QgsFeatureId fid) override
- Removes a feature from this pool.
- void updateFeature(QgsFeature& feature) override
- Updates a feature in this pool.
Function documentation
QgsVectorDataProviderFeaturePool:: QgsVectorDataProviderFeaturePool(QgsVectorLayer* layer,
bool selectedOnly = false)
Creates a new feature pool for the data provider of layer.
If selectedOnly is set to true, only selected features will be managed by the pool.
bool QgsVectorDataProviderFeaturePool:: addFeature(QgsFeature& feature,
QgsFeatureSink::Flags flags = nullptr) override
Adds a single feature to the sink.
| Returns | true in case of success and false in case of failure |
|---|
Feature addition behavior is controlled by the specified flags.
bool QgsVectorDataProviderFeaturePool:: addFeatures(QgsFeatureList& features,
QgsFeatureSink::Flags flags = nullptr) override
Adds a list of features to the sink.
| Returns | true in case of success and false in case of failure |
|---|
Feature addition behavior is controlled by the specified flags.
void QgsVectorDataProviderFeaturePool:: deleteFeature(QgsFeatureId fid) override
Removes a feature from this pool.
Implementations will remove the feature from the layer or from the data provider.
void QgsVectorDataProviderFeaturePool:: updateFeature(QgsFeature& feature) override
Updates a feature in this pool.
Implementations will update the feature on the layer or on the data provider.