Class: QgsIFeatureSelectionManager¶
- class qgis.gui.QgsIFeatureSelectionManager¶
Bases:
PyQt5.QtCore.QObject
Is an interface class to abstract feature selection handling.
e.g.
QgsVectorLayer
implements this interface to manage its selections.Methods
Deselect features by feature
ids
.Select features by feature
ids
.Returns the number of features that are selected in this layer.
Returns reference to identifiers of selected features
Change selection to the new set of features. Dismisses the current selection. Will emit the selectionChanged( const :py:class:`QgsFeatureIds`&, const :py:class:`QgsFeatureIds`&, bool ) signal with the clearAndSelect flag set.
Signals
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
- childEvent(self, QChildEvent)¶
- connectNotify(self, QMetaMethod)¶
- customEvent(self, QEvent)¶
- deselect(self, ids: object)¶
Deselect features by feature
ids
.- Parameters:
ids (object) –
- disconnectNotify(self, QMetaMethod)¶
- isSignalConnected(self, QMetaMethod) bool ¶
- receivers(self, PYQT_SIGNAL) int ¶
- select(self, ids: object)¶
Select features by feature
ids
.- Parameters:
ids (object) –
- selectedFeatureCount(self) int ¶
Returns the number of features that are selected in this layer.
- Return type:
int
- selectedFeatureIds(self) object ¶
Returns reference to identifiers of selected features
- Return type:
object
- Returns:
A list of
QgsFeatureId
’s
See also
- selectionChanged¶
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.
- Parameters:
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type:
PYQT_SIGNAL
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setSelectedFeatures(self, ids: object)¶
Change selection to the new set of features. Dismisses the current selection. Will emit the selectionChanged( const :py:class:`QgsFeatureIds`&, const :py:class:`QgsFeatureIds`&, bool ) signal with the clearAndSelect flag set.
- Parameters:
ids (object) – The ids which will be the new selection
See also
- timerEvent(self, QTimerEvent)¶