QGIS API Documentation  2.2.0-Valmiera
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Signals | Public Member Functions | List of all members
QgsIFeatureSelectionManager Class Reference

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.

Public Member Functions

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

Detailed Description

Is an interface class to abstract feature selection handling.

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

Definition at line 29 of file qgsifeatureselectionmanager.h.

Constructor & Destructor Documentation

QgsIFeatureSelectionManager::QgsIFeatureSelectionManager ( QObject *  parent)
inline

Definition at line 34 of file qgsifeatureselectionmanager.h.

Member Function Documentation

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

Deselect features.

Parameters
idsFeature ids to deselect

Implemented in QgsVectorLayerSelectionManager, and QgsGenericFeatureSelectionManager.

Referenced by QgsFeatureSelectionModel::enableSync(), and QgsFeatureSelectionModel::selectFeatures().

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

Select features.

Parameters
idsFeature ids to select

Implemented in QgsVectorLayerSelectionManager, and QgsGenericFeatureSelectionManager.

Referenced by QgsFeatureSelectionModel::enableSync(), and QgsFeatureSelectionModel::selectFeatures().

virtual int QgsIFeatureSelectionManager::selectedFeatureCount ( )
pure virtual

The number of features that are selected in this layer.

Returns
See description

Implemented in QgsGenericFeatureSelectionManager, and QgsVectorLayerSelectionManager.

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

Return reference to identifiers of selected features.

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

Implemented in QgsVectorLayerSelectionManager, and QgsGenericFeatureSelectionManager.

Referenced by QgsFeatureSelectionModel::isSelected().

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

Referenced by QgsGenericFeatureSelectionManager::deselect(), QgsVectorLayerSelectionManager::QgsVectorLayerSelectionManager(), QgsGenericFeatureSelectionManager::select(), and QgsGenericFeatureSelectionManager::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( QgsFeatureIds, QgsFeatureIds, bool ) signal with the clearAndSelect flag set.

Parameters
idsThe ids which will be the new selection

Implemented in QgsVectorLayerSelectionManager, and QgsGenericFeatureSelectionManager.

Referenced by QgsFeatureSelectionModel::enableSync(), and QgsFeatureSelectionModel::selectFeatures().


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