| 
    QGIS API Documentation
    3.6.0-Noosa (5873452)
    
   | 
 
Provides a list of features based on filter conditions. More...
#include <qgsfeaturefiltermodel.h>

Public Types | |
| enum | Role { IdentifierValueRole = Qt::UserRole, ValueRole } | 
| Extra roles that can be used to fetch data from this model.  More... | |
Signals | |
| void | allowNullChanged () | 
| Add a NULL entry to the list.  More... | |
| void | beginUpdate () | 
| Notification that the model is about to be changed because a job was completed.  More... | |
| void | displayExpressionChanged () | 
| The display expression will be used for.  More... | |
| void | endUpdate () | 
| Notification that the model change is finished.  More... | |
| void | extraIdentifierValueChanged () | 
| Allows specifying one value that does not need to match the filter criteria but will still be available in the model.  More... | |
| void | extraIdentifierValueIndexChanged (int index) | 
| The index at which the extra identifier value is available within the model.  More... | |
| void | extraValueDoesNotExistChanged () | 
| Flag indicating that the extraIdentifierValue does not exist in the data.  More... | |
| void | filterExpressionChanged () | 
| An additional filter expression to apply, next to the filterValue.  More... | |
| void | filterJobCompleted () | 
| Indicates that a filter job has been completed and new data may be available.  More... | |
| void | filterValueChanged () | 
| This value will be used to filter the features available from this model.  More... | |
| void | identifierFieldChanged () | 
| The identifier field should be a unique field that can be used to identify individual features.  More... | |
| void | isLoadingChanged () | 
| Indicator if the model is currently performing any feature iteration in the background.  More... | |
| void | sourceLayerChanged () | 
| The source layer from which features will be fetched.  More... | |
Public Member Functions | |
| QgsFeatureFilterModel (QObject *parent=nullptr) | |
| Create a new QgsFeatureFilterModel, optionally specifying a parent.  More... | |
| ~QgsFeatureFilterModel () override | |
| bool | allowNull () const | 
| Add a NULL entry to the list.  More... | |
| int | columnCount (const QModelIndex &parent) const override | 
| QVariant | data (const QModelIndex &index, int role) const override | 
| QString | displayExpression () const | 
| The display expression will be used for.  More... | |
| QVariant | extraIdentifierValue () const | 
| Allows specifying one value that does not need to match the filter criteria but will still be available in the model.  More... | |
| int | extraIdentifierValueIndex () const | 
| The index at which the extra identifier value is available within the model.  More... | |
| bool | extraValueDoesNotExist () const | 
| Flag indicating that the extraIdentifierValue does not exist in the data.  More... | |
| QString | filterExpression () const | 
| An additional filter expression to apply, next to the filterValue.  More... | |
| QString | filterValue () const | 
| This value will be used to filter the features available from this model.  More... | |
| QString | identifierField () const | 
| The identifier field should be a unique field that can be used to identify individual features.  More... | |
| QModelIndex | index (int row, int column, const QModelIndex &parent) const override | 
| bool | isLoading () const | 
| Indicator if the model is currently performing any feature iteration in the background.  More... | |
| QModelIndex | parent (const QModelIndex &child) const override | 
| int | rowCount (const QModelIndex &parent) const override | 
| void | setAllowNull (bool allowNull) | 
| Add a NULL entry to the list.  More... | |
| void | setDisplayExpression (const QString &displayExpression) | 
| The display expression will be used for.  More... | |
| void | setExtraIdentifierValue (const QVariant &extraIdentifierValue) | 
| Allows specifying one value that does not need to match the filter criteria but will still be available in the model.  More... | |
| void | setFilterExpression (const QString &filterExpression) | 
| An additional filter expression to apply, next to the filterValue.  More... | |
| void | setFilterValue (const QString &filterValue) | 
| This value will be used to filter the features available from this model.  More... | |
| void | setIdentifierField (const QString &identifierField) | 
| The identifier field should be a unique field that can be used to identify individual features.  More... | |
| void | setSourceLayer (QgsVectorLayer *sourceLayer) | 
| The source layer from which features will be fetched.  More... | |
| QgsVectorLayer * | sourceLayer () const | 
| The source layer from which features will be fetched.  More... | |
Properties | |
| bool | allowNull | 
| QString | displayExpression | 
| QVariant | extraIdentifierValue | 
| The value that identifies the current feature.  More... | |
| int | extraIdentifierValueIndex | 
| QString | filterExpression | 
| QString | filterValue | 
| QString | identifierField | 
| A field of sourceLayer that is unique and should be used to identify features.  More... | |
| bool | isLoading | 
| QgsVectorLayer | sourceLayer | 
Friends | |
| class | QgsFieldExpressionValuesGatherer | 
Provides a list of features based on filter conditions.
Features are fetched asynchronously.
Definition at line 32 of file qgsfeaturefiltermodel.h.
Extra roles that can be used to fetch data from this model.
| Enumerator | |
|---|---|
| IdentifierValueRole | Used to retrieve the identifierValue (primary key) of a feature.  | 
| ValueRole | Used to retrieve the displayExpression of a feature.  | 
Definition at line 62 of file qgsfeaturefiltermodel.h.
      
  | 
  explicit | 
Create a new QgsFeatureFilterModel, optionally specifying a parent.
Definition at line 24 of file qgsfeaturefiltermodel.cpp.
      
  | 
  override | 
Definition at line 33 of file qgsfeaturefiltermodel.cpp.
| bool QgsFeatureFilterModel::allowNull | ( | ) | const | 
Add a NULL entry to the list.
      
  | 
  signal | 
Add a NULL entry to the list.
      
  | 
  signal | 
Notification that the model is about to be changed because a job was completed.
      
  | 
  override | 
Definition at line 124 of file qgsfeaturefiltermodel.cpp.
      
  | 
  override | 
Definition at line 130 of file qgsfeaturefiltermodel.cpp.
| QString QgsFeatureFilterModel::displayExpression | ( | ) | const | 
The display expression will be used for.
      
  | 
  signal | 
The display expression will be used for.
      
  | 
  signal | 
Notification that the model change is finished.
Will always be emitted in sync with beginUpdate.
| QVariant QgsFeatureFilterModel::extraIdentifierValue | ( | ) | const | 
Allows specifying one value that does not need to match the filter criteria but will still be available in the model.
      
  | 
  signal | 
Allows specifying one value that does not need to match the filter criteria but will still be available in the model.
| int QgsFeatureFilterModel::extraIdentifierValueIndex | ( | ) | const | 
The index at which the extra identifier value is available within the model.
      
  | 
  signal | 
The index at which the extra identifier value is available within the model.
| bool QgsFeatureFilterModel::extraValueDoesNotExist | ( | ) | const | 
Flag indicating that the extraIdentifierValue does not exist in the data.
Definition at line 488 of file qgsfeaturefiltermodel.cpp.
      
  | 
  signal | 
Flag indicating that the extraIdentifierValue does not exist in the data.
| QString QgsFeatureFilterModel::filterExpression | ( | ) | const | 
An additional filter expression to apply, next to the filterValue.
Can be used for spatial filtering etc.
      
  | 
  signal | 
An additional filter expression to apply, next to the filterValue.
Can be used for spatial filtering etc.
      
  | 
  signal | 
Indicates that a filter job has been completed and new data may be available.
| QString QgsFeatureFilterModel::filterValue | ( | ) | const | 
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 | 
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.
| QString QgsFeatureFilterModel::identifierField | ( | ) | const | 
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 | 
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.
      
  | 
  override | 
Definition at line 105 of file qgsfeaturefiltermodel.cpp.
| bool QgsFeatureFilterModel::isLoading | ( | ) | const | 
Indicator if the model is currently performing any feature iteration in the background.
      
  | 
  signal | 
Indicator if the model is currently performing any feature iteration in the background.
      
  | 
  override | 
Definition at line 111 of file qgsfeaturefiltermodel.cpp.
      
  | 
  override | 
Definition at line 117 of file qgsfeaturefiltermodel.cpp.
| void QgsFeatureFilterModel::setAllowNull | ( | bool | allowNull | ) | 
Add a NULL entry to the list.
Definition at line 477 of file qgsfeaturefiltermodel.cpp.
| void QgsFeatureFilterModel::setDisplayExpression | ( | const QString & | displayExpression | ) | 
The display expression will be used for.
Definition at line 60 of file qgsfeaturefiltermodel.cpp.
| void QgsFeatureFilterModel::setExtraIdentifierValue | ( | const QVariant & | extraIdentifierValue | ) | 
Allows specifying one value that does not need to match the filter criteria but will still be available in the model.
Definition at line 531 of file qgsfeaturefiltermodel.cpp.
| void QgsFeatureFilterModel::setFilterExpression | ( | const QString & | filterExpression | ) | 
An additional filter expression to apply, next to the filterValue.
Can be used for spatial filtering etc.
Definition at line 90 of file qgsfeaturefiltermodel.cpp.
| void QgsFeatureFilterModel::setFilterValue | ( | const QString & | filterValue | ) | 
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.
Definition at line 75 of file qgsfeaturefiltermodel.cpp.
| void QgsFeatureFilterModel::setIdentifierField | ( | const QString & | identifierField | ) | 
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.
Definition at line 512 of file qgsfeaturefiltermodel.cpp.
| void QgsFeatureFilterModel::setSourceLayer | ( | QgsVectorLayer * | sourceLayer | ) | 
The source layer from which features will be fetched.
Definition at line 44 of file qgsfeaturefiltermodel.cpp.
| QgsVectorLayer* QgsFeatureFilterModel::sourceLayer | ( | ) | const | 
The source layer from which features will be fetched.
      
  | 
  signal | 
The source layer from which features will be fetched.
      
  | 
  friend | 
Definition at line 308 of file qgsfeaturefiltermodel.h.
      
  | 
  readwrite | 
Definition at line 40 of file qgsfeaturefiltermodel.h.
      
  | 
  readwrite | 
Definition at line 37 of file qgsfeaturefiltermodel.h.
      
  | 
  readwrite | 
The value that identifies the current feature.
Definition at line 53 of file qgsfeaturefiltermodel.h.
      
  | 
  read | 
Definition at line 55 of file qgsfeaturefiltermodel.h.
      
  | 
  readwrite | 
Definition at line 39 of file qgsfeaturefiltermodel.h.
      
  | 
  readwrite | 
Definition at line 38 of file qgsfeaturefiltermodel.h.
      
  | 
  readwrite | 
A field of sourceLayer that is unique and should be used to identify features.
Normally the primary key field. Needs to match the identifierValue.
Definition at line 48 of file qgsfeaturefiltermodel.h.
      
  | 
  read | 
Definition at line 41 of file qgsfeaturefiltermodel.h.
      
  | 
  readwrite | 
Definition at line 36 of file qgsfeaturefiltermodel.h.
 1.8.13