Class: QgsIFeatureSelectionManager¶
Is an interface class to abstract feature selection handling.
e.g. QgsVectorLayer implements this interface to manage its
selections.
Note
This is an abstract class, with methods which must be implemented by a subclass.
The following methods must be implemented: deselect(), select(), selectedFeatureCount(), setSelectedFeatures()
Class Hierarchy¶
Base classes¶
- class qgis.gui.QgsIFeatureSelectionManager[source]¶
Bases:
QObject- abstract selectedFeatureCount(self) int[source]¶
Returns the number of features that are selected in this layer.
- Return type:
int
- selectedFeatureIds(self) Any¶
Returns reference to identifiers of selected features
- Return type:
- Returns:
A list of selected
QgsFeatureId
See also
- signal selectionChanged[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- abstract setSelectedFeatures(self, ids: Any)[source]¶
Change selection to the new set of features. Dismisses the current selection. Will emit the
selectionChanged()signal with the clearAndSelect flag set.- Parameters:
ids (Any) – The ids which will be the new selection
See also