QGIS API Documentation  3.5.0-Master (4e38193)
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, 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 by feature ids. More...
 
virtual void select (const QgsFeatureIds &ids)=0
 Select features by feature ids. More...
 
virtual int selectedFeatureCount ()=0
 Returns the number of features that are selected in this layer. More...
 
virtual const QgsFeatureIdsselectedFeatureIds () const =0
 Returns 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 31 of file qgsifeatureselectionmanager.h.

Constructor & Destructor Documentation

◆ QgsIFeatureSelectionManager()

QgsIFeatureSelectionManager::QgsIFeatureSelectionManager ( QObject *  parent)
inline

Definition at line 36 of file qgsifeatureselectionmanager.h.

Member Function Documentation

◆ deselect()

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

Deselect features by feature ids.

Implemented in QgsGenericFeatureSelectionManager, and QgsVectorLayerSelectionManager.

◆ select()

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

Select features by feature ids.

Implemented in QgsGenericFeatureSelectionManager, and QgsVectorLayerSelectionManager.

◆ selectedFeatureCount()

virtual int QgsIFeatureSelectionManager::selectedFeatureCount ( )
pure virtual

Returns the number of features that are selected in this layer.

Implemented in QgsGenericFeatureSelectionManager, and QgsVectorLayerSelectionManager.

◆ selectedFeatureIds()

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

Returns reference to identifiers of selected features.

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

Implemented in QgsGenericFeatureSelectionManager, and QgsVectorLayerSelectionManager.

◆ selectionChanged

void QgsIFeatureSelectionManager::selectionChanged ( const QgsFeatureIds selected,
const QgsFeatureIds deselected,
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
See also
selectedFeatureIds()

Implemented in QgsGenericFeatureSelectionManager, and QgsVectorLayerSelectionManager.


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