QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
Go to the documentation of this file.
33 void QgsFeaturePickerModel::requestToReloadCurrentFeature(
QgsFeatureRequest &request )
38 QVariant QgsFeaturePickerModel::entryIdentifier(
const QgsFeatureExpressionValuesGatherer::Entry &entry )
const
40 return entry.identifierFields;
43 QgsFeatureExpressionValuesGatherer::Entry QgsFeaturePickerModel::createEntry(
const QVariant &identifier )
const
46 return QgsFeatureExpressionValuesGatherer::Entry( fid, QStringLiteral(
"(%1)" ).arg( fid ),
sourceLayer() );
49 bool QgsFeaturePickerModel::compareEntries(
const QgsFeatureExpressionValuesGatherer::Entry &a,
const QgsFeatureExpressionValuesGatherer::Entry &b )
const
51 return a.featureId == b.featureId;
54 bool QgsFeaturePickerModel::identifierIsNull(
const QVariant &identifier )
const
56 return identifier.value<
QgsFeatureId>() == nullIentifier();
59 QVariant QgsFeaturePickerModel::nullIentifier()
const
79 QgsFeatureExpressionValuesGatherer *QgsFeaturePickerModel::createValuesGatherer(
const QgsFeatureRequest &request )
const
void featureChanged(const QgsFeature &feature)
Emitted when the current feature changes.
void setExtraIdentifierValue(const QVariant &extraIdentifierValue)
Allows specifying one value that does not need to match the filter criteria but will still be availab...
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 d...
QgsFeaturePickerModel(QObject *parent=nullptr)
Create a new QgsFeaturePickerModel, optionally specifying a parent.
QVariant mExtraIdentifierValue
The current identifier value.
QgsFeatureRequest & setFilterFid(QgsFeatureId fid)
Sets feature ID that should be fetched.
QgsVectorLayer sourceLayer
QVector< QgsFeatureExpressionValuesGatherer::Entry > mEntries
void extraIdentifierValueIndexChanged(int index)
The index at which the extra identifier value is available within the model.
void setExtraIdentifierValueToNull() override
Allows specifying one value that does not need to match the filter criteria but will still be availab...
QString displayExpression
void setFeature(const QgsFeatureId &fid)
Set the feature to the given feature id.
QgsFeature feature() const
Returns the current feature.
int mExtraValueIndex
The current index.
void setFetchGeometry(bool fetchGeometry)
Defines if the geometry will be fetched.