Skip to content

Commit

Permalink
setting of reload interval in featurelistcombo
Browse files Browse the repository at this point in the history
  • Loading branch information
signedav committed Oct 4, 2018
1 parent 0ee119f commit 13d2586
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
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
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
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
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 13d2586

Please sign in to comment.