mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 19:11:39 -06:00
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.
39 lines
745 B
C++
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
|