Class: QgsFeatureFilterModel¶
-
class
qgis.core.
QgsFeatureFilterModel
(parent: QObject = None)¶ Bases:
PyQt5.QtCore.QAbstractItemModel
Create a new
QgsFeatureFilterModel
, optionally specifying aparent
.Provides a list of features based on filter conditions. Features are fetched asynchronously.
New in version 3.0.
- Parameters
parent –
-
IdentifierValueRole
= 256¶
-
class
Role
¶ Bases:
int
-
ValueRole
= 257¶
-
allowNull
(self) → bool¶ Add a NULL entry to the list.
- Return type
bool
-
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¶ - Parameters
parent (QModelIndex) –
- Return type
int
-
connectNotify
()¶
-
createIndex
()¶
-
customEvent
()¶
-
data
(self, index: QModelIndex, role: int) → Any¶ - Parameters
index (QModelIndex) –
role (int) –
- Return type
Any
-
decodeData
()¶
-
disconnectNotify
()¶
-
displayExpression
(self) → str¶ The display expression will be used for
displaying values in the combobox
filtering based on filterValue
- Return type
str
-
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.
- Return type
Any
-
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.
- Return type
int
-
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.
- Return type
bool
-
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.
- Return type
str
-
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.
- Return type
str
-
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.
- Return type
str
-
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¶ - Parameters
row (int) –
column (int) –
parent (QModelIndex) –
- Return type
QModelIndex
-
isLoading
(self) → bool¶ Indicator if the model is currently performing any feature iteration in the background.
- Return type
bool
-
isLoadingChanged
¶ Indicator if the model is currently performing any feature iteration in the background. [signal]
-
isSignalConnected
()¶
-
parent
(self, child: QModelIndex) → QModelIndex¶ - Parameters
child (QModelIndex) –
- Return type
QModelIndex
-
persistentIndexList
()¶
-
receivers
()¶
-
resetInternalData
()¶
-
rowCount
(self, parent: QModelIndex) → int¶ - Parameters
parent (QModelIndex) –
- Return type
int
-
sender
()¶
-
senderSignalIndex
()¶
-
setAllowNull
(self, allowNull: bool)¶ Add a NULL entry to the list.
- Parameters
allowNull (bool) –
-
setDisplayExpression
(self, displayExpression: str)¶ The display expression will be used for
displaying values in the combobox
filtering based on filterValue
- Parameters
displayExpression (str) –
-
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.
- Parameters
extraIdentifierValue (Any) –
-
setFilterExpression
(self, filterExpression: str)¶ An additional filter expression to apply, next to the filterValue. Can be used for spatial filtering etc.
- Parameters
filterExpression (str) –
-
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.
- Parameters
filterValue (str) –
-
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.
- Parameters
identifierField (str) –
-
setSourceLayer
(self, sourceLayer: QgsVectorLayer)¶ The source layer from which features will be fetched.
- Parameters
sourceLayer (QgsVectorLayer) –
-
sourceLayer
(self) → QgsVectorLayer¶ The source layer from which features will be fetched.
- Return type
-
sourceLayerChanged
¶ The source layer from which features will be fetched. [signal]
-
timerEvent
()¶