QGIS API Documentation  3.0.2-Girona (307d082)
Signals | Public Member Functions | List of all members
QgsIFeatureSelectionManager Class Referenceabstract

Is an interface class to abstract feature selection handling. More...

#include <qgsifeatureselectionmanager.h>

Inheritance diagram for QgsIFeatureSelectionManager:
Inheritance graph
[legend]

Signals

void selectionChanged (const QgsFeatureIds &selected, const QgsFeatureIds &deselected, const bool clearAndSelect)
 This signal is emitted when selection was changed. More...
 

Public Member Functions

 QgsIFeatureSelectionManager (QObject *parent)
 
virtual void deselect (const QgsFeatureIds &ids)=0
 Deselect features. More...
 
virtual void select (const QgsFeatureIds &ids)=0
 Select features. More...
 
virtual int selectedFeatureCount ()=0
 The number of features that are selected in this layer. More...
 
virtual const QgsFeatureIdsselectedFeatureIds () const =0
 Return reference to identifiers of selected features. More...
 
virtual void setSelectedFeatures (const QgsFeatureIds &ids)=0
 Change selection to the new set of features. More...
 

Detailed Description

Is an interface class to abstract feature selection handling.

e.g. QgsVectorLayer implements this interface to manage its selections.

Definition at line 32 of file qgsifeatureselectionmanager.h.

Constructor & Destructor Documentation

◆ QgsIFeatureSelectionManager()

QgsIFeatureSelectionManager::QgsIFeatureSelectionManager ( QObject *  parent)
inline

Definition at line 37 of file qgsifeatureselectionmanager.h.

Member Function Documentation

◆ deselect()

virtual void QgsIFeatureSelectionManager::deselect ( const QgsFeatureIds ids)
pure virtual

Deselect features.

Parameters
idsFeature ids to deselect

Implemented in QgsVectorLayerSelectionManager, and QgsGenericFeatureSelectionManager.

◆ select()

virtual void QgsIFeatureSelectionManager::select ( const QgsFeatureIds ids)
pure virtual

Select features.

Parameters
idsFeature ids to select

Implemented in QgsVectorLayerSelectionManager, and QgsGenericFeatureSelectionManager.

◆ selectedFeatureCount()

virtual int QgsIFeatureSelectionManager::selectedFeatureCount ( )
pure virtual

The number of features that are selected in this layer.

Returns
See description

Implemented in QgsVectorLayerSelectionManager, and QgsGenericFeatureSelectionManager.

◆ selectedFeatureIds()

virtual const QgsFeatureIds& QgsIFeatureSelectionManager::selectedFeatureIds ( ) const
pure virtual

Return reference to identifiers of selected features.

Returns
A list of QgsFeatureId's
See also
selectedFeatures()

Implemented in QgsVectorLayerSelectionManager, and QgsGenericFeatureSelectionManager.

◆ selectionChanged

void QgsIFeatureSelectionManager::selectionChanged ( const QgsFeatureIds selected,
const QgsFeatureIds deselected,
const bool  clearAndSelect 
)
signal

This signal is emitted when selection was changed.

Parameters
selectedNewly selected feature ids
deselectedIds of all features which have previously been selected but are not any more
clearAndSelectIn case this is set to true, the old selection was dismissed and the new selection corresponds to selected

◆ setSelectedFeatures()

virtual void QgsIFeatureSelectionManager::setSelectedFeatures ( const QgsFeatureIds ids)
pure virtual

Change selection to the new set of features.

Dismisses the current selection. Will emit the selectionChanged( const QgsFeatureIds&, const QgsFeatureIds&, bool ) signal with the clearAndSelect flag set.

Parameters
idsThe ids which will be the new selection

Implemented in QgsVectorLayerSelectionManager, and QgsGenericFeatureSelectionManager.


The documentation for this class was generated from the following file: