Class: QgsFeaturePickerModelBase¶
- class qgis.core.QgsFeaturePickerModelBase(parent: QObject = None)¶
Bases:
PyQt5.QtCore.QAbstractItemModel
Create a new
QgsFeaturePickerModelBase
, optionally specifying aparent
.Provides a list of features based on filter conditions.
Features are fetched asynchronously.
New in version 3.14:
Methods
Add a NULL entry to the list.
- param parent
- param index
The display expression will be used for
The index at which the extra identifier value is available within the model.
Flag indicating that the extraIdentifierValue does not exist in the data.
Returns if the geometry is fetched
Returns the feature request fetch limit
An additional filter expression to apply, next to the filterValue.
This value will be used to filter the features available from this model.
- param row
Indicator if the model is currently performing any feature iteration in the background.
- param child
- param parent
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 as NULL value(s).
Defines if the geometry will be fetched
Defines the feature request fetch limit If set to 0, no limit is applied when fetching
An additional filter expression to apply, next to the filterValue.
This value will be used to filter the features available from this model.
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.
Emitted when the current feature in the model has changed This emitted both when the extra value changes and when the extra value status changes.
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.
Emitted when the fetching of the geometry changes [signal]
Emitted when the fetching limit for the feature request changes [signal]
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.
Indicator if the model is currently performing any feature iteration in the background.
The source layer from which features will be fetched.
Attributes
- FeatureIdRole = 260¶
- FeatureRole = 259¶
- IdentifierValueRole = 256¶
- IdentifierValuesRole = 257¶
- class Role¶
Bases:
int
- ValueRole = 258¶
- allowNull(self) bool ¶
Add a NULL entry to the list.
- Return type
bool
- allowNullChanged¶
Add a NULL entry to the list. [signal]
- beginUpdate¶
Notification that the model is about to be changed because a job was completed. [signal]
- columnCount(self, parent: QModelIndex) int ¶
- Parameters
parent (QModelIndex) –
- Return type
int
- currentFeatureChanged¶
Emitted when the current feature in the model has changed This emitted both when the extra value changes and when the extra value status changes. It allows being notified when the feature is fetched after the extra value has been set.
New in version 3.16.6: [signal]
- data(self, index: QModelIndex, role: int) Any ¶
- Parameters
index (QModelIndex) –
role (int) –
- Return type
Any
- 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]
- endUpdate¶
Notification that the model change is finished. Will always be emitted in sync with beginUpdate. [signal]
- 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]
- Parameters
index (int) –
- 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]
- fetchGeometry(self) bool ¶
Returns if the geometry is fetched
- Return type
bool
- fetchGeometryChanged¶
Emitted when the fetching of the geometry changes [signal]
- fetchLimit(self) int ¶
Returns the feature request fetch limit
- Return type
int
- fetchLimitChanged¶
Emitted when the fetching limit for the feature request changes [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]
- 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]
- parent(self, child: QModelIndex) QModelIndex ¶
- Parameters
child (QModelIndex) –
- Return type
QModelIndex
- rowCount(self, parent: QModelIndex) int ¶
- Parameters
parent (QModelIndex) –
- Return type
int
- 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) –
- setExtraIdentifierValueToNull(self)¶
Allows specifying one value that does not need to match the filter criteria but will still be available in the model as NULL value(s).
- setFetchGeometry(self, fetchGeometry: bool)¶
Defines if the geometry will be fetched
- Parameters
fetchGeometry (bool) –
- setFetchLimit(self, fetchLimit: int)¶
Defines the feature request fetch limit If set to 0, no limit is applied when fetching
- Parameters
fetchLimit (int) –
- 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) –
- 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]