QgsGenericFeatureSelectionManager class
This selection manager synchronizes a local set of selected features with an attribute table.
Contents
- Reference
If you want to synchronize the attribute table selection with the map canvas selection, you should use QgsVectorLayerSelectionManager instead.
Base classes
- class QgsIFeatureSelectionManager
- Is an interface class to abstract feature selection handling.
Public functions
- void deselect(const QgsFeatureIds& ids) override
- Deselect features by feature ids.
- void select(const QgsFeatureIds& ids) override
- Select features by feature ids.
- auto selectedFeatureCount() -> int override
- Returns the number of features that are selected in this layer.
- auto selectedFeatureIds() const -> const QgsFeatureIds& override
- Returns reference to identifiers of selected features.
- void setSelectedFeatures(const QgsFeatureIds& ids) override
- Change selection to the new set of features.
Function documentation
const QgsFeatureIds& QgsGenericFeatureSelectionManager:: selectedFeatureIds() const override
Returns reference to identifiers of selected features.
| Returns | A list of QgsFeatureId's |
|---|
void QgsGenericFeatureSelectionManager:: setSelectedFeatures(const QgsFeatureIds& ids) override
Change selection to the new set of features.
| Parameters | |
|---|---|
| ids | The ids which will be the new selection |
Dismisses the current selection. Will emit the selectionChanged( const QgsFeatureIds&, const QgsFeatureIds&, bool ) signal with the clearAndSelect flag set.