Class: QgsFeatureFilterModel¶
-
class
qgis.core.
QgsFeatureFilterModel
(parent: QObject = None)¶ Bases:
PyQt5.QtCore.QAbstractItemModel
Create a new QgsFeatureFilterModel, optionally specifying a
parent
.Provides a list of features based on filter conditions. Features are fetched asynchronously.
New in version 3.0: Enums
Methods
Add a NULL entry to the list.
The display expression will be used for
Allows specifying one value that does not need to match the filter criteria but will still be available in the model.
The index at which the extra identifier value is available within the model.
Flag indicating that the extraIdentifierValue does not exist in the data.
An additional filter expression to apply, next to the filterValue.
This value will be used to filter the features available from this model.
The identifier field should be a unique field that can be used to identify individual features.
Indicator if the model is currently performing any feature iteration in the background.
Add a NULL entry to the list.
The display expression will be used for
Allows specifying one value that does not need to match the filter criteria but will still be available in the model.
An additional filter expression to apply, next to the filterValue.
This value will be used to filter the features available from this model.
The identifier field should be a unique field that can be used to identify individual features.
The source layer from which features will be fetched.
The source layer from which features will be fetched.
Signals
Add a NULL entry to the list.
Notification that the model is about to be changed because a job was completed.
The display expression will be used for
Notification that the model change is finished.
Allows specifying one value that does not need to match the filter criteria but will still be available in the model.
The index at which the extra identifier value is available within the model.
Flag indicating that the extraIdentifierValue does not exist in the data.
An additional filter expression to apply, next to the filterValue.
Indicates that a filter job has been completed and new data may be available.
This value will be used to filter the features available from this model.
The identifier field should be a unique field that can be used to identify individual features.
Indicator if the model is currently performing any feature iteration in the background.
The source layer from which features will be fetched.
Attributes
-
IdentifierValueRole
= 256¶
-
class
Role
¶ Bases:
int
-
ValueRole
= 257¶
-
allowNull
(self) → bool¶ Add a NULL entry to the list.
-
allowNullChanged
¶ Add a NULL entry to the list. [signal]
-
beginInsertColumns
()¶
-
beginInsertRows
()¶
-
beginMoveColumns
()¶
-
beginMoveRows
()¶
-
beginRemoveColumns
()¶
-
beginRemoveRows
()¶
-
beginResetModel
()¶
-
beginUpdate
¶ Notification that the model is about to be changed because a job was completed. [signal]
-
changePersistentIndex
()¶
-
changePersistentIndexList
()¶
-
childEvent
()¶
-
columnCount
(self, parent: QModelIndex) → int¶
-
connectNotify
()¶
-
createIndex
()¶
-
customEvent
()¶
-
data
(self, index: QModelIndex, role: int) → Any¶
-
decodeData
()¶
-
disconnectNotify
()¶
-
displayExpression
(self) → str¶ The display expression will be used for
displaying values in the combobox
filtering based on filterValue
-
displayExpressionChanged
¶ The display expression will be used for
displaying values in the combobox
filtering based on filterValue [signal]
-
encodeData
()¶
-
endInsertColumns
()¶
-
endInsertRows
()¶
-
endMoveColumns
()¶
-
endMoveRows
()¶
-
endRemoveColumns
()¶
-
endRemoveRows
()¶
-
endResetModel
()¶
-
endUpdate
¶ Notification that the model change is finished. Will always be emitted in sync with beginUpdate. [signal]
-
extraIdentifierValue
(self) → Any¶ Allows specifying one value that does not need to match the filter criteria but will still be available in the model.
-
extraIdentifierValueChanged
¶ Allows specifying one value that does not need to match the filter criteria but will still be available in the model. [signal]
-
extraIdentifierValueIndex
(self) → int¶ The index at which the extra identifier value is available within the model.
-
extraIdentifierValueIndexChanged
¶ The index at which the extra identifier value is available within the model. [signal]
-
extraValueDoesNotExist
(self) → bool¶ Flag indicating that the extraIdentifierValue does not exist in the data.
-
extraValueDoesNotExistChanged
¶ Flag indicating that the extraIdentifierValue does not exist in the data. [signal]
-
filterExpression
(self) → str¶ An additional filter expression to apply, next to the filterValue. Can be used for spatial filtering etc.
-
filterExpressionChanged
¶ An additional filter expression to apply, next to the filterValue. Can be used for spatial filtering etc. [signal]
-
filterJobCompleted
¶ Indicates that a filter job has been completed and new data may be available. [signal]
-
filterValue
(self) → str¶ This value will be used to filter the features available from this model. Whenever a substring of the displayExpression of a feature matches the filter value, it will be accessible by this model.
-
filterValueChanged
¶ This value will be used to filter the features available from this model. Whenever a substring of the displayExpression of a feature matches the filter value, it will be accessible by this model. [signal]
-
identifierField
(self) → str¶ The identifier field should be a unique field that can be used to identify individual features. It is normally set to the primary key of the layer.
-
identifierFieldChanged
¶ The identifier field should be a unique field that can be used to identify individual features. It is normally set to the primary key of the layer. [signal]
-
index
(self, row: int, column: int, parent: QModelIndex) → QModelIndex¶
-
isLoading
(self) → bool¶ Indicator if the model is currently performing any feature iteration in the background.
-
isLoadingChanged
¶ Indicator if the model is currently performing any feature iteration in the background. [signal]
-
isSignalConnected
()¶
-
parent
(self, child: QModelIndex) → QModelIndex¶
-
persistentIndexList
()¶
-
receivers
()¶
-
resetInternalData
()¶
-
rowCount
(self, parent: QModelIndex) → int¶
-
sender
()¶
-
senderSignalIndex
()¶
-
setAllowNull
(self, allowNull: bool)¶ Add a NULL entry to the list.
-
setDisplayExpression
(self, displayExpression: str)¶ The display expression will be used for
displaying values in the combobox
filtering based on filterValue
-
setExtraIdentifierValue
(self, extraIdentifierValue: Any)¶ Allows specifying one value that does not need to match the filter criteria but will still be available in the model.
-
setFilterExpression
(self, filterExpression: str)¶ An additional filter expression to apply, next to the filterValue. Can be used for spatial filtering etc.
-
setFilterValue
(self, filterValue: str)¶ This value will be used to filter the features available from this model. Whenever a substring of the displayExpression of a feature matches the filter value, it will be accessible by this model.
-
setIdentifierField
(self, identifierField: str)¶ The identifier field should be a unique field that can be used to identify individual features. It is normally set to the primary key of the layer.
-
setSourceLayer
(self, sourceLayer: QgsVectorLayer)¶ The source layer from which features will be fetched.
-
sourceLayer
(self) → QgsVectorLayer¶ The source layer from which features will be fetched.
-
sourceLayerChanged
¶ The source layer from which features will be fetched. [signal]
-
timerEvent
()¶
-