15#ifndef QGSFIELDLISTCOMBOBOX_H
16#define QGSFIELDLISTCOMBOBOX_H
321 void onCurrentTextChanged( const QString &text );
322 void onFilterLineEditCleared();
323 void onFilterUpdateCompleted();
324 void onLoadingChanged();
325 void onItemSelected( const QModelIndex &index );
326 void onCurrentIndexChanged(
int i );
327 void onActivated( QModelIndex index );
328 void storeLineEditState();
329 void restoreLineEditState();
330 void onDataChanged( const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<
int> &roles = QVector<
int>() );
334 QCompleter *mCompleter =
nullptr;
336 bool mPopupRequested = false;
337 bool mIsCurrentlyEdited = false;
Animated icon is keeping an animation running if there are listeners connected to frameChanged.
Provides a list of features based on filter conditions.
QgsVectorLayer * sourceLayer
void setIdentifierValues(const QVariantList &identifierValues)
The identifier values of the currently selected feature.
void keyPressEvent(QKeyEvent *event) override
Q_DECL_DEPRECATED void setIdentifierField(const QString &identifierField)
Field name that will be used to uniquely identify the current feature.
void setDisplayExpression(const QString &displayExpression)
The display expression will be used to display features as well as the value to match the typed text ...
QModelIndex currentModelIndex() const
The index of the currently selected item.
void setFilterExpression(const QString &filterExpression)
An additional expression to further restrict the available features.
void setSortOrder(const Qt::SortOrder sortOrder)
The order direction of the model.
void setIdentifierFields(const QStringList &identifierFields)
Field name that will be used to uniquely identify the current feature.
QString displayExpression
void allowNullChanged()
Determines if a NULL value should be available in the list.
QgsFeature parentFormFeature() const
Returns a parent attribute form feature to be used with the filter expression.
QgsFeatureListComboBox(QWidget *parent=nullptr)
Create a new QgsFeatureListComboBox, optionally specifying a parent.
void focusOutEvent(QFocusEvent *event) override
void setSourceLayer(QgsVectorLayer *sourceLayer)
The layer from which features should be listed.
void setParentFormFeature(const QgsFeature &feature)
Sets a parent attribute form feature to be used with the filter expression.
void modelUpdated()
The underlying model has been updated.
friend class TestQgsFeatureListComboBox
QgsFeature formFeature() const
Returns an attribute form feature to be used with the filter expression.
QgsFeatureRequest currentFeatureRequest() const
Shorthand for getting a feature request to query the currently selected feature.
void setIdentifierValuesToNull()
Sets the identifier values of the currently selected feature to NULL value(s).
void formFeatureChanged()
An attribute form feature to be used alongside the filter expression.
void identifierValueChanged()
The identifier value of the currently selected feature.
QVariantList identifierValues
Qt::SortOrder sortOrder() const
The order direction of the model.
void setOrderExpression(const QString &orderExpression)
The order expression of the model.
QString orderExpression() const
The order expression of the model.
void sourceLayerChanged()
The layer from which features should be listed.
void setFormFeature(const QgsFeature &feature)
Sets an attribute form feature to be used with the filter expression.
void setCurrentFeature(const QgsFeature &feature)
Sets the current index by using the given feature.
int nullIndex() const
Returns the current index of the NULL value, or -1 if NULL values are not allowed.
void currentFeatureFoundChanged(bool found)
Emitted when the feature picker model changes its feature found state.
int fetchLimit() const
Returns the feature request fetch limit.
Q_DECL_DEPRECATED void setIdentifierValue(const QVariant &identifierValue)
The identifier value of the currently selected feature.
void currentFeatureChanged()
Emitted when the current feature changes.
QStringList identifierFields() const
Field name that will be used to uniquely identify the current feature.
void parentFormFeatureChanged()
A parent attribute form feature to be used alongside the filter expression.
void setAllowNull(bool allowNull)
Determines if a NULL value should be available in the list.
void displayExpressionChanged()
The display expression will be used to display features as well as the the value to match the typed t...
void identifierFieldChanged()
Field name that will be used to uniquely identify the current feature.
void setFetchLimit(int fetchLimit)
Defines the feature request fetch limit If set to 0, no limit is applied when fetching.
void filterExpressionChanged()
An additional expression to further restrict the available features.
Wraps a request for features to a vector layer (or directly its vector data provider).
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
QLineEdit subclass with built in support for clearing the widget's value and handling custom null val...
Represents a vector layer which manages a vector based dataset.