You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FilterLineEdit::FilterLineEdit(QWidget* parent, QList<FilterLineEdit*>* filters, int columnnum) : QLineEdit(parent), filterList(filters), columnNumber(columnnum)
{
setPlaceholderText(tr("Filter"));
#if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)
setClearButtonEnabled(true);
#endif
setProperty("column", columnnum); // Store the column number for later use
// Introduce a timer for delaying the signal triggered whenever the user changes the filter value.
// The idea here is that the textChanged() event isn't connected to the update filter slot directly anymore
// but instead there this timer mechanism in between: whenever the user changes the filter the delay timer
// 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 = newQTimer(this);
delaySignalTimer->setInterval(PreferencesDialog::getSettingsValue("databrowser", "filter_delay").toInt()); // This is the milliseconds of not-typing we want to wait before triggering