Subgroup: Feature
Class: QgsFeatureSelectionModel¶
-
class
qgis.gui.
QgsFeatureSelectionModel
(model: QAbstractItemModel, featureModel: QgsFeatureModel, featureSelectionHandler: QgsIFeatureSelectionManager, parent: QObject)¶ Bases:
PyQt5.QtCore.QItemSelectionModel
Methods
blockSignals
childEvent
children
clear
clearCurrentIndex
clearSelection
columnIntersectsSelection
connectNotify
currentIndex
customEvent
deleteLater
disconnect
disconnectNotify
dumpObjectInfo
dumpObjectTree
dynamicPropertyNames
emitSelectionChanged
enableSync
Enables or disables synchronisation to the QgsVectorLayer
When synchronisation is disabled, any selection change will be buffered inside this selection model.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] hasSelection
inherits
installEventFilter
isColumnSelected
isRowSelected
isSelected
Returns the selection status of a given feature id. isSignalConnected
isWidgetType
isWindowType
killTimer
metaObject
model
moveToThread
objectName
parent
property
pyqtConfigure
Each keyword argument is either the name of a Qt property or a Qt signal. receivers
removeEventFilter
reset
rowIntersectsSelection
select
Overwritten to do NOTHING (we handle selection ourselves) selectFeatures
Select features on this table. selectedColumns
selectedIndexes
selectedRows
selection
sender
senderSignalIndex
setCurrentIndex
setFeatureSelectionManager
setModel
setObjectName
setParent
setProperty
signalsBlocked
startTimer
thread
timerEvent
tr
Attributes
Clear
ClearAndSelect
Columns
Current
Deselect
NoUpdate
Rows
Select
SelectCurrent
Toggle
ToggleCurrent
currentChanged
currentChanged(self, QModelIndex, QModelIndex) [signal] currentColumnChanged
currentColumnChanged(self, QModelIndex, QModelIndex) [signal] currentRowChanged
currentRowChanged(self, QModelIndex, QModelIndex) [signal] destroyed
destroyed(self, QObject = None) [signal] modelChanged
modelChanged(self, QAbstractItemModel) [signal] objectNameChanged
objectNameChanged(self, str) [signal] requestRepaint
Request a repaint of a list of model indexes. selectionChanged
selectionChanged(self, QItemSelection, QItemSelection) [signal] staticMetaObject
-
childEvent
()¶
-
connectNotify
()¶
-
customEvent
()¶
-
disconnectNotify
()¶
-
emitSelectionChanged
()¶
-
enableSync
(self, enable: bool)¶ Enables or disables synchronisation to the
QgsVectorLayer
When synchronisation is disabled, any selection change will be buffered inside this selection model. When enabled, any buffered changes are communicated to the layer and the buffer is emptied. Mainly to be used for performance reasons, because selection change on the layer can cost time as it repaints the layer.Parameters: enable – The synchronisation status to set.
-
isSelected
(self, fid: int) → bool¶ Returns the selection status of a given feature id.
Parameters: fid – The featureid to determine the selection status of Returns: The selection status isSelected(self, index: QModelIndex) -> bool Returns the selection status of a given QModelIndex.
Parameters: index – The index to determine the selection status of Returns: The selection status
-
isSignalConnected
()¶
-
receivers
()¶
-
requestRepaint
¶ Request a repaint of a list of model indexes. Views using this model should connect to and properly process this signal.
Parameters: indexes – The model indexes which need to be repainted [signal] Request a repaint of the visible items of connected views. Views using this model should connect to and properly process this signal. [signal]
-
select
(self, index: QModelIndex, command: Union[QItemSelectionModel.SelectionFlags, QItemSelectionModel.SelectionFlag])¶ Overwritten to do NOTHING (we handle selection ourselves)
See also
select(self, selection: QItemSelection, command: Union[QItemSelectionModel.SelectionFlags, QItemSelectionModel.SelectionFlag]) Overwritten to do NOTHING (we handle selection ourselves)
See also
-
selectFeatures
(self, selection: QItemSelection, command: Union[QItemSelectionModel.SelectionFlags, QItemSelectionModel.SelectionFlag])¶ Select features on this table. Is to be used in favor of the stock select methods.
Parameters: - selection – The QItemSelection which will be selected
- command – The command to apply. Select, Deselect and ClearAndSelect are processed.
-
sender
()¶
-
senderSignalIndex
()¶
-
setFeatureSelectionManager
(self, featureSelectionManager: QgsIFeatureSelectionManager)¶
-
timerEvent
()¶
-