Skip to content

Commit

Permalink
setting of reload interval in featurelistcombo
Browse files Browse the repository at this point in the history
cherry-picket from 13d2586
  • Loading branch information
signedav committed Oct 30, 2018
1 parent f951219 commit 3ffdae1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/core/auto_generated/qgsfeaturefiltermodel.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ Add a NULL entry to the list.
void setAllowNull( bool allowNull );
%Docstring
Add a NULL entry to the list.
%End

void setReloadTimerInterval( int interval );
%Docstring
Set the model reload timer interval in milliseconds
%End

signals:
Expand Down
5 changes: 5 additions & 0 deletions src/core/qgsfeaturefiltermodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -549,3 +549,8 @@ void QgsFeatureFilterModel::setExtraIdentifierValue( const QVariant &extraIdenti

emit extraIdentifierValueChanged();
}

void QgsFeatureFilterModel::setReloadTimerInterval( int interval )
{
mReloadTimer.setInterval( interval );
}
5 changes: 5 additions & 0 deletions src/core/qgsfeaturefiltermodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@ class CORE_EXPORT QgsFeatureFilterModel : public QAbstractItemModel
*/
void setAllowNull( bool allowNull );

/**
* Set the model reload timer interval in milliseconds
*/
void setReloadTimerInterval( int interval );

signals:

/**
Expand Down
1 change: 1 addition & 0 deletions src/gui/qgsfeaturelistcombobox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ QgsFeatureListComboBox::QgsFeatureListComboBox( QWidget *parent )
mCompleter->setFilterMode( Qt::MatchContains );
setCompleter( mCompleter );
mCompleter->setWidget( this );
mModel->setReloadTimerInterval( 1000 );
connect( mModel, &QgsFeatureFilterModel::sourceLayerChanged, this, &QgsFeatureListComboBox::sourceLayerChanged );
connect( mModel, &QgsFeatureFilterModel::displayExpressionChanged, this, &QgsFeatureListComboBox::displayExpressionChanged );
connect( mModel, &QgsFeatureFilterModel::filterExpressionChanged, this, &QgsFeatureListComboBox::filterExpressionChanged );
Expand Down

0 comments on commit 3ffdae1

Please sign in to comment.