Files
sqlitebrowser/src/FilterTableHeader.h
Martin Kleusberg 39a49e33c2 Allow clicking cells with foreign key in order to jump to referenced cell
Add a tooltip to the database browser when you hover a cell with a
foreign key set in order to show the referenced table and column.

When clicking on such a cell while holding the Ctrl and Shift key (only
one of them won't work because they are for multiselection and Alt
doesn't do the trick on my system because it's just for grabbing and
moving the window) try to jump to the table and row which is referenced
in the clicked cell.

See issue #192.
2015-06-21 23:59:45 +02:00

39 lines
745 B
C++

#ifndef FILTERTABLEHEADER_H
#define FILTERTABLEHEADER_H
#include <QHeaderView>
#include <QList>
class QLineEdit;
class QTableView;
class FilterLineEdit;
class FilterTableHeader : public QHeaderView
{
Q_OBJECT
public:
explicit FilterTableHeader(QTableView* parent = 0);
virtual QSize sizeHint() const;
public slots:
void generateFilters(int number, bool bKeepValues = false);
void adjustPositions();
void clearFilters();
void setFilter(int column, const QString& value);
signals:
void filterChanged(int column, QString value);
protected:
virtual void updateGeometries();
private slots:
void inputChanged(const QString& new_value);
private:
QList<FilterLineEdit*> filterWidgets;
};
#endif