Files
sqlitebrowser/src/FilterTableHeader.h
Martin Kleusberg 6742f5632d 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 ;)
2013-04-09 18:52:37 +02:00

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