mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 02:50:46 -06:00
Filters: Add settings option for the delay time
Introduce a new option in the Preferences dialog for setting the delay time which the filter widgets are waiting for before applying the newly set value. Also reduce the default delay time from 300 to 200 ms. See issue #490.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "FilterLineEdit.h"
|
||||
#include "PreferencesDialog.h"
|
||||
|
||||
#include <QTimer>
|
||||
#include <QKeyEvent>
|
||||
@@ -17,7 +18,7 @@ FilterLineEdit::FilterLineEdit(QWidget* parent, QList<FilterLineEdit*>* filters,
|
||||
// is (re)started. As soon as the user stops typing the timer has a chance to trigger and call the
|
||||
// delayedSignalTimerTriggered() method which then stops the timer and emits the delayed signal.
|
||||
delaySignalTimer = new QTimer(this);
|
||||
delaySignalTimer->setInterval(300); // This is the milliseconds of not-typing we want to wait before triggering
|
||||
delaySignalTimer->setInterval(PreferencesDialog::getSettingsValue("databrowser", "filter_delay").toInt()); // This is the milliseconds of not-typing we want to wait before triggering
|
||||
connect(this, SIGNAL(textChanged(QString)), delaySignalTimer, SLOT(start()));
|
||||
connect(delaySignalTimer, SIGNAL(timeout()), this, SLOT(delayedSignalTimerTriggered()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user