Skip to content

Commit 3ffdae1

Browse files
committed
setting of reload interval in featurelistcombo
cherry-picket from 13d2586
1 parent f951219 commit 3ffdae1

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

python/core/auto_generated/qgsfeaturefiltermodel.sip.in

+5
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,11 @@ Add a NULL entry to the list.
145145
void setAllowNull( bool allowNull );
146146
%Docstring
147147
Add a NULL entry to the list.
148+
%End
149+
150+
void setReloadTimerInterval( int interval );
151+
%Docstring
152+
Set the model reload timer interval in milliseconds
148153
%End
149154

150155
signals:

src/core/qgsfeaturefiltermodel.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -549,3 +549,8 @@ void QgsFeatureFilterModel::setExtraIdentifierValue( const QVariant &extraIdenti
549549

550550
emit extraIdentifierValueChanged();
551551
}
552+
553+
void QgsFeatureFilterModel::setReloadTimerInterval( int interval )
554+
{
555+
mReloadTimer.setInterval( interval );
556+
}

src/core/qgsfeaturefiltermodel.h

+5
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,11 @@ class CORE_EXPORT QgsFeatureFilterModel : public QAbstractItemModel
178178
*/
179179
void setAllowNull( bool allowNull );
180180

181+
/**
182+
* Set the model reload timer interval in milliseconds
183+
*/
184+
void setReloadTimerInterval( int interval );
185+
181186
signals:
182187

183188
/**

src/gui/qgsfeaturelistcombobox.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ QgsFeatureListComboBox::QgsFeatureListComboBox( QWidget *parent )
3333
mCompleter->setFilterMode( Qt::MatchContains );
3434
setCompleter( mCompleter );
3535
mCompleter->setWidget( this );
36+
mModel->setReloadTimerInterval( 1000 );
3637
connect( mModel, &QgsFeatureFilterModel::sourceLayerChanged, this, &QgsFeatureListComboBox::sourceLayerChanged );
3738
connect( mModel, &QgsFeatureFilterModel::displayExpressionChanged, this, &QgsFeatureListComboBox::displayExpressionChanged );
3839
connect( mModel, &QgsFeatureFilterModel::filterExpressionChanged, this, &QgsFeatureListComboBox::filterExpressionChanged );

0 commit comments

Comments
 (0)