mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-19 18:40:13 -06:00
Add a row of line edits between the table header and the actual content of the table in the browse tab. Show one input widget per table column in this row. Add a live search which hides any table rows which do not fit to the current filter settings. Why add this to the parital-data-fetch branch? Because this is an attempt to get rid of the find dialog which is broken again and not even worth fixing. Also there is not much to break in this branch at the moment ;)
36 lines
621 B
C++
36 lines
621 B
C++
#ifndef __FILTERTABLEHEADER_H__
|
|
#define __FILTERTABLEHEADER_H__
|
|
|
|
#include <QHeaderView>
|
|
#include <QList>
|
|
|
|
class QLineEdit;
|
|
class QTableView;
|
|
|
|
class FilterTableHeader : public QHeaderView
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit FilterTableHeader(QTableView* parent = 0);
|
|
virtual QSize sizeHint() const;
|
|
|
|
public slots:
|
|
void generateFilters(int number);
|
|
void adjustPositions();
|
|
|
|
signals:
|
|
void filterChanged(int column, QString value);
|
|
|
|
protected:
|
|
virtual void updateGeometries();
|
|
|
|
private slots:
|
|
void inputChanged(const QString& new_value);
|
|
|
|
private:
|
|
QList<QLineEdit*> filterWidgets;
|
|
};
|
|
|
|
#endif
|