QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
Signals | Public Member Functions | List of all members
QgsFeaturePickerModel Class Reference

Provides a list of features based on filter conditions. More...

#include <qgsfeaturepickermodel.h>

Inheritance diagram for QgsFeaturePickerModel:
Inheritance graph
[legend]

Signals

void featureChanged (const QgsFeature &feature)
 Emitted when the current feature changes.
 
- Signals inherited from QgsFeaturePickerModelBase
void allowNullChanged ()
 Add a NULL entry to the list.
 
void beginUpdate ()
 Notification that the model is about to be changed because a job was completed.
 
void 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.
 
void displayExpressionChanged ()
 The display expression will be used for.
 
void endUpdate ()
 Notification that the model change is finished.
 
void extraIdentifierValueChanged ()
 Allows specifying one value that does not need to match the filter criteria but will still be available in the model.
 
void extraIdentifierValueIndexChanged (int index)
 The index at which the extra identifier value is available within the model.
 
void extraValueDoesNotExistChanged ()
 Flag indicating that the extraIdentifierValue does not exist in the data.
 
void fetchGeometryChanged ()
 Emitted when the fetching of the geometry changes.
 
void fetchLimitChanged ()
 Emitted when the fetching limit for the feature request changes.
 
void filterExpressionChanged ()
 An additional filter expression to apply, next to the filterValue.
 
void filterJobCompleted ()
 Indicates that a filter job has been completed and new data may be available.
 
void filterValueChanged ()
 This value will be used to filter the features available from this model.
 
void isLoadingChanged ()
 Indicator if the model is currently performing any feature iteration in the background.
 
void sourceLayerChanged ()
 The source layer from which features will be fetched.
 

Public Member Functions

 QgsFeaturePickerModel (QObject *parent=nullptr)
 Create a new QgsFeaturePickerModel, optionally specifying a parent.
 
QgsFeature feature () const
 Returns the current feature.
 
void setExtraIdentifierValueToNull () override
 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).
 
void setFeature (const QgsFeatureId &fid)
 Set the feature to the given feature id.
 
- Public Member Functions inherited from QgsFeaturePickerModelBase
 QgsFeaturePickerModelBase (QObject *parent=nullptr)
 Create a new QgsFeaturePickerModelBase, optionally specifying a parent.
 
 ~QgsFeaturePickerModelBase () override
 
bool allowNull () const
 Add a NULL entry to the list.
 
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.
 
int extraIdentifierValueIndex () const
 The index at which the extra identifier value is available within the model.
 
bool extraValueDoesNotExist () const
 Flag indicating that the extraIdentifierValue does not exist in the data.
 
bool fetchGeometry () const
 Returns if the geometry is fetched.
 
int fetchLimit () const
 Returns the feature request fetch limit.
 
QString filterExpression () const
 An additional filter expression to apply, next to the filterValue.
 
QString filterValue () const
 This value will be used to filter the features available from this model.
 
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.
 
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.
 
void setDisplayExpression (const QString &displayExpression)
 The display expression will be used for.
 
void setFetchGeometry (bool fetchGeometry)
 Defines if the geometry will be fetched.
 
void setFetchLimit (int fetchLimit)
 Defines the feature request fetch limit If set to 0, no limit is applied when fetching.
 
void setFilterExpression (const QString &filterExpression)
 An additional filter expression to apply, next to the filterValue.
 
void setFilterValue (const QString &filterValue)
 This value will be used to filter the features available from this model.
 
void setSourceLayer (QgsVectorLayer *sourceLayer)
 The source layer from which features will be fetched.
 
QgsVectorLayersourceLayer () const
 The source layer from which features will be fetched.
 

Additional Inherited Members

- Public Types inherited from QgsFeaturePickerModelBase
enum  Role {
  IdentifierValueRole = Qt::UserRole , IdentifierValuesRole , ValueRole , FeatureRole ,
  FeatureIdRole
}
 Extra roles that can be used to fetch data from this model. More...
 
- Protected Member Functions inherited from QgsFeaturePickerModelBase
QVariant extraIdentifierValue () const
 Allows specifying one value that does not need to match the filter criteria but will still be available in the model.
 
virtual QSet< QString > requestedAttributes () const
 Returns the attributes to be fetched in the request.
 
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.
 
void setExtraIdentifierValueUnguarded (const QVariant &identifierValue)
 This will set the identifier value to be set in the model even if it doesn't exist currently in the data.
 
- Protected Attributes inherited from QgsFeaturePickerModelBase
QVector< QgsFeatureExpressionValuesGatherer::Entry > mEntries
 
QVariant mExtraIdentifierValue
 The current identifier value.
 
int mExtraValueIndex = -1
 The current index.
 
- Properties inherited from QgsFeaturePickerModelBase
bool allowNull
 
QString displayExpression
 
int extraIdentifierValueIndex
 
bool fetchGeometry
 
int fetchLimit
 
QString filterExpression
 
QString filterValue
 
QgsVectorLayersourceLayer
 

Detailed Description

Provides a list of features based on filter conditions.

Features are fetched asynchronously.

Since
QGIS 3.0

Definition at line 31 of file qgsfeaturepickermodel.h.

Constructor & Destructor Documentation

◆ QgsFeaturePickerModel()

QgsFeaturePickerModel::QgsFeaturePickerModel ( QObject *  parent = nullptr)
explicit

Create a new QgsFeaturePickerModel, optionally specifying a parent.

Definition at line 24 of file qgsfeaturepickermodel.cpp.

Member Function Documentation

◆ feature()

QgsFeature QgsFeaturePickerModel::feature ( ) const

Returns the current feature.

Definition at line 74 of file qgsfeaturepickermodel.cpp.

◆ featureChanged

void QgsFeaturePickerModel::featureChanged ( const QgsFeature feature)
signal

Emitted when the current feature changes.

◆ setExtraIdentifierValueToNull()

void QgsFeaturePickerModel::setExtraIdentifierValueToNull ( )
overridevirtual

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).

Since
QGIS 3.10

Implements QgsFeaturePickerModelBase.

Definition at line 64 of file qgsfeaturepickermodel.cpp.

◆ setFeature()

void QgsFeaturePickerModel::setFeature ( const QgsFeatureId fid)

Set the feature to the given feature id.

Definition at line 69 of file qgsfeaturepickermodel.cpp.


The documentation for this class was generated from the following files: