Class: QgsFeatureListView¶
-
class
qgis.gui.
QgsFeatureListView
(parent: QWidget = None)¶ Bases:
PyQt5.QtWidgets.QListView
Creates a feature list view
- Parameters
parent (QWidget = None) – owner
Shows a list of features and renders a edit button next to each feature.
Accepts a display expression to define the way, features are rendered. Uses a
QgsFeatureListModel
as source model.Methods
- param event
Gets the currentEditSelection
Returns the expression which is currently used to render the features.
Gets the featureListModel used by this view
- param event
Returns the layer cache
- param event
- param event
- param event
Returns a detailed message about errors while parsing a
QgsExpression
.repaintRequested(self)
Select all currently visible features
Sets if the currently shown form has received any edit events so far.
The display expression is an expression used to render the fields into a single string which is displaied.
Set the feature(s) to be edited
setFeatureSelectionManager
Set the
QgsFeatureListModel
which is used to retrieve informationSignals
Is emitted, whenever the current edit selection has been changed.
Is emitted, whenever the display expression is successfully changed
Is emitted, when the context menu is created to add the specific actions to it
-
actionEvent
()¶
-
changeEvent
()¶
-
childEvent
()¶
-
closeEditor
()¶
-
closeEvent
()¶
-
commitData
()¶
-
connectNotify
()¶
-
contextMenuEvent
(self, event: QContextMenuEvent)¶ - Parameters
event (QContextMenuEvent) –
-
create
()¶
-
currentChanged
()¶
-
currentEditSelection
(self) → object¶ Gets the currentEditSelection
- Return type
object
- Returns
A list of edited feature ids
-
currentEditSelectionChanged
¶ Is emitted, whenever the current edit selection has been changed.
- Parameters
feat – the feature, which will be edited. [signal]
-
customEvent
()¶
-
dataChanged
()¶
-
destroy
()¶
-
dirtyRegionOffset
()¶
-
disconnectNotify
()¶
-
displayExpression
(self) → str¶ Returns the expression which is currently used to render the features.
- Return type
str
- Returns
A string containing the currend display expression
See also
-
displayExpressionChanged
¶ Is emitted, whenever the display expression is successfully changed
- Parameters
expression – The expression that was applied [signal]
-
dragEnterEvent
()¶
-
dragLeaveEvent
()¶
-
dragMoveEvent
()¶
-
drawFrame
()¶
-
dropEvent
()¶
-
dropIndicatorPosition
()¶
-
edit
()¶
-
editorDestroyed
()¶
-
enterEvent
()¶
-
event
()¶
-
eventFilter
()¶
-
executeDelayedItemsLayout
()¶
-
featureListModel
(self) → QgsFeatureListModel¶ Gets the featureListModel used by this view
- Return type
- Returns
The model in use
-
focusInEvent
()¶
-
focusNextChild
()¶
-
focusNextPrevChild
()¶
-
focusOutEvent
()¶
-
focusPreviousChild
()¶
-
hideEvent
()¶
-
horizontalOffset
()¶
-
horizontalScrollbarAction
()¶
-
horizontalScrollbarValueChanged
()¶
-
initPainter
()¶
-
initStyleOption
()¶
-
inputMethodEvent
()¶
-
isIndexHidden
()¶
-
isSignalConnected
()¶
-
keyPressEvent
(self, event: QKeyEvent)¶ - Parameters
event (QKeyEvent) –
-
keyReleaseEvent
()¶
-
layerCache
(self) → QgsVectorLayerCache¶ Returns the layer cache
- Return type
- Returns
the layer cache used as backend
-
leaveEvent
()¶
-
metric
()¶
-
mouseDoubleClickEvent
()¶
-
mouseMoveEvent
(self, event: QMouseEvent)¶ - Parameters
event (QMouseEvent) –
-
mousePressEvent
(self, event: QMouseEvent)¶ - Parameters
event (QMouseEvent) –
-
mouseReleaseEvent
(self, event: QMouseEvent)¶ - Parameters
event (QMouseEvent) –
-
moveCursor
()¶
-
moveEvent
()¶
-
nativeEvent
()¶
-
paintEvent
()¶
-
parserErrorString
(self) → str¶ Returns a detailed message about errors while parsing a
QgsExpression
.- Return type
str
- Returns
A message containing information about the parser error.
-
receivers
()¶
-
rectForIndex
()¶
-
repaintRequested
(self, indexes: object)¶ repaintRequested(self)
- Parameters
indexes (object) –
-
resizeEvent
()¶
-
rowsAboutToBeRemoved
()¶
-
rowsInserted
()¶
-
scheduleDelayedItemsLayout
()¶
-
scrollContentsBy
()¶
-
scrollDirtyRegion
()¶
-
selectAll
(self)¶ Select all currently visible features
-
selectedIndexes
()¶
-
selectionChanged
()¶
-
selectionCommand
()¶
-
sender
()¶
-
senderSignalIndex
()¶
-
setCurrentFeatureEdited
(self, state: bool)¶ Sets if the currently shown form has received any edit events so far.
- Parameters
state (bool) – The state
-
setDirtyRegion
()¶
-
setDisplayExpression
(self, displayExpression: str) → bool¶ The display expression is an expression used to render the fields into a single string which is displaied.
- Parameters
displayExpression (str) – The expression used to render the feature
See also
- Return type
bool
-
setEditSelection
(self, fids: object)¶ Set the feature(s) to be edited
- Parameters
fids (object) – A list of features to be edited
setEditSelection(self, index: QModelIndex, command: Union[QItemSelectionModel.SelectionFlags, QItemSelectionModel.SelectionFlag]) Set the feature(s) to be edited
- Parameters
index – The selection to set
command – selection update mode
-
setFeatureSelectionManager
(self, featureSelectionManager: QgsIFeatureSelectionManager)¶ setFeatureSelectionManager
- Parameters
featureSelectionManager (QgsIFeatureSelectionManager) – We will take ownership
-
setModel
(self, featureListModel: QgsFeatureListModel)¶ Set the
QgsFeatureListModel
which is used to retrieve information- Parameters
featureListModel (QgsFeatureListModel) – The model to use
-
setPositionForIndex
()¶
-
setSelection
()¶
-
setState
()¶
-
setViewportMargins
()¶
-
showEvent
()¶
-
startDrag
()¶
-
state
()¶
-
tabletEvent
()¶
-
timerEvent
()¶
-
updateEditorData
()¶
-
updateEditorGeometries
()¶
-
updateGeometries
()¶
-
updateMicroFocus
()¶
-
verticalOffset
()¶
-
verticalScrollbarAction
()¶
-
verticalScrollbarValueChanged
()¶
-
viewOptions
()¶
-
viewportEvent
()¶
-
viewportMargins
()¶
-
viewportSizeHint
()¶
-
visualRegionForSelection
()¶
-
wheelEvent
()¶
-
willShowContextMenu
¶ Is emitted, when the context menu is created to add the specific actions to it
- Parameters
menu – is the already created context menu
atIndex – is the position of the current feature in the model [signal]