15 #ifndef QGSFIELDLISTCOMBOBOX_H    16 #define QGSFIELDLISTCOMBOBOX_H    43     Q_PROPERTY( 
QgsVectorLayer *sourceLayer READ sourceLayer WRITE setSourceLayer NOTIFY sourceLayerChanged )
    44     Q_PROPERTY( QString displayExpression READ displayExpression WRITE setDisplayExpression NOTIFY displayExpressionChanged )
    45     Q_PROPERTY( QString filterExpression READ filterExpression WRITE setFilterExpression NOTIFY filterExpressionChanged )
    46     Q_PROPERTY( QVariant identifierValue READ identifierValue WRITE setIdentifierValue NOTIFY identifierValueChanged )
    47     Q_PROPERTY( QVariantList identifierValues READ identifierValues WRITE setIdentifierValues NOTIFY identifierValueChanged )
    48     Q_PROPERTY( QString identifierField READ identifierField WRITE setIdentifierField NOTIFY identifierFieldChanged )
    49     Q_PROPERTY( 
bool allowNull READ allowNull WRITE setAllowNull NOTIFY allowNullChanged )
    72     void setCurrentFeature( const 
QgsFeature &feature );
    78     QString displayExpression() const;
    84     void setDisplayExpression( const QString &displayExpression );
    90     QString filterExpression() const;
    98     int nullIndex() const;
   106     void setFilterExpression( const QString &filterExpression );
   113     Q_DECL_DEPRECATED QVariant identifierValue() const 
SIP_DEPRECATED;
   120     QVariantList identifierValues() const;
   128     Q_DECL_DEPRECATED 
void setIdentifierValue( const QVariant &identifierValue ) SIP_DEPRECATED;
   135     void setIdentifierValues( const QVariantList &identifierValues );
   141     void setIdentifierValuesToNull();
   152     bool allowNull() const;
   157     void setAllowNull( 
bool allowNull );
   164     Q_DECL_DEPRECATED QString identifierField() const SIP_DEPRECATED;
   171     QStringList identifierFields() const;
   178     Q_DECL_DEPRECATED 
void setIdentifierField( const QString &identifierField ) SIP_DEPRECATED;
   185     void setIdentifierFields( const QStringList &identifierFields );
   190     QModelIndex currentModelIndex() const;
   192     void focusOutEvent( QFocusEvent *event ) override;
   194     void keyPressEvent( QKeyEvent *event ) override;
   208     void sourceLayerChanged();
   214     void displayExpressionChanged();
   220     void filterExpressionChanged();
   226     void identifierValueChanged();
   232     void identifierFieldChanged();
   237     void allowNullChanged();
   240     void onCurrentTextChanged( const QString &text );
   241     void onFilterUpdateCompleted();
   242     void onLoadingChanged();
   243     void onItemSelected( const QModelIndex &index );
   244     void onCurrentIndexChanged( 
int i );
   245     void onActivated( QModelIndex index );
   246     void storeLineEditState();
   247     void restoreLineEditState();
   248     void onDataChanged( const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<
int> &roles = QVector<
int>() );
   253       void store( QLineEdit *lineEdit );
   254       void restore( QLineEdit *lineEdit ) 
const;
   263     QCompleter *mCompleter = 
nullptr;
   264     QString mDisplayExpression;
   266     bool mPopupRequested = 
false;
   267     bool mIsCurrentlyEdited = 
false;
   268     bool mHasStoredEditState = 
false;
   269     LineEditState mLineEditState;
   271     friend class TestQgsFeatureListComboBox;
   276 #endif // QGSFIELDLISTCOMBOBOX_H Provides a list of features based on filter conditions. 
 
This offers a combobox with autocompleter that allows selecting features from a layer. 
 
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
 
This class wraps a request for features to a vector layer (or directly its vector data provider)...
 
QLineEdit subclass with built in support for clearing the widget's value and handling custom null val...
 
Animated icon is keeping an animation running if there are listeners connected to frameChanged...
 
Represents a vector layer which manages a vector based data sets.