mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-21 03:21:43 -06:00
When changing between the filter line edits in the Browse Data tab, make sure to only re-run the SQL query if the value of the filter line edits have actually changed. See issue #1187.
38 lines
719 B
C++
38 lines
719 B
C++
#ifndef FILTERLINEEDIT_H
|
|
#define FILTERLINEEDIT_H
|
|
|
|
#include <QLineEdit>
|
|
#include <QList>
|
|
|
|
class QTimer;
|
|
class QKeyEvent;
|
|
|
|
class FilterLineEdit : public QLineEdit
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit FilterLineEdit(QWidget* parent, QList<FilterLineEdit*>* filters, int columnnum);
|
|
|
|
// Override methods for programatically changing the value of the line edit
|
|
void clear();
|
|
void setText(const QString& text);
|
|
|
|
private slots:
|
|
void delayedSignalTimerTriggered();
|
|
|
|
signals:
|
|
void delayedTextChanged(QString text);
|
|
|
|
protected:
|
|
void keyReleaseEvent(QKeyEvent* event);
|
|
|
|
private:
|
|
QList<FilterLineEdit*>* filterList;
|
|
int columnNumber;
|
|
QTimer* delaySignalTimer;
|
|
QString lastValue;
|
|
};
|
|
|
|
#endif
|