Subgroup: other

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

blockSignals
childEvent
children
connectNotify
customEvent
deleteLater
deselect Deselect features
disconnect
disconnectNotify
dumpObjectInfo
dumpObjectTree
dynamicPropertyNames
event
eventFilter
findChild findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject
findChildren findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject]
inherits
installEventFilter
isSignalConnected
isWidgetType
isWindowType
killTimer
metaObject
moveToThread
objectName
parent
property
pyqtConfigure Each keyword argument is either the name of a Qt property or a Qt signal.
receivers
removeEventFilter
select Select features
selectedFeatureCount The number of features that are selected in this layer
selectedFeatureIds Return reference to identifiers of selected features
sender
senderSignalIndex
setObjectName
setParent
setProperty
setSelectedFeatures Change selection to the new set of features.
signalsBlocked
startTimer
thread
timerEvent
tr

Attributes

destroyed destroyed(self, QObject = None) [signal]
objectNameChanged objectNameChanged(self, str) [signal]
selectionChanged This signal is emitted when selection was changed
staticMetaObject
childEvent()
connectNotify()
customEvent()
deselect(self, ids: object)

Deselect features

Parameters:ids – Feature ids to deselect
disconnectNotify()
isSignalConnected()
receivers()
select(self, ids: object)

Select features

Parameters:ids – Feature ids to select
selectedFeatureCount(self) → int

The number of features that are selected in this layer

Returns:See description
selectedFeatureIds(self) → object

Return reference to identifiers of selected features

Returns:A list of QgsFeatureId’s

See also

selectedFeatures()

selectionChanged

This signal is emitted when selection was changed

Parameters:
  • selected – Newly selected feature ids
  • deselected – Ids of all features which have previously been selected but are not any more
  • clearAndSelect – In case this is set to true, the old selection was dismissed and the new selection corresponds to selected [signal]
sender()
senderSignalIndex()
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 – The ids which will be the new selection
timerEvent()