Add a filter row to the table view in the browse tab

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 ;)
This commit is contained in:
Martin Kleusberg
2013-04-09 18:52:37 +02:00
parent 9f2b0a60bd
commit 6742f5632d
6 changed files with 161 additions and 12 deletions
+35
View File
@@ -0,0 +1,35 @@
#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