diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-05-30 01:04:42 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-05-30 20:29:55 +0900 |
commit | 77880b7a0797cef0fac0650ce0321e3aa8b702f4 (patch) | |
tree | 4d684edfb22b3d16f34021574011a8290c99e8ef /qt-ui/divelistview.h | |
parent | c4f06dc536392e31a477e592d30fb946f1499595 (diff) | |
download | subsurface-77880b7a0797cef0fac0650ce0321e3aa8b702f4.tar.gz |
Add a proof of concept for filtering the Dive List,
Press CTRL+F and a line edit will appear, whenever you write on that will
be used as a filter against all columns. The results are maybe somewhat
surprising in trip mode, but when sorting by another column this shows
some potential.
Hit ESC to remove the filtering.
I need to find a better position to put the Widget, but it's a proof of
concept.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/divelistview.h')
-rw-r--r-- | qt-ui/divelistview.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/qt-ui/divelistview.h b/qt-ui/divelistview.h index 6f22597f6..2f3838c00 100644 --- a/qt-ui/divelistview.h +++ b/qt-ui/divelistview.h @@ -25,11 +25,13 @@ public: void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected); void currentChanged(const QModelIndex& current, const QModelIndex& previous); void reload(DiveTripModel::Layout layout = DiveTripModel::TREE, bool forceSort = true); + bool eventFilter(QObject* , QEvent* ); public slots: void toggleColumnVisibilityByIndex(); void reloadHeaderActions(); void headerClicked(int); + void showSearchEdit(); Q_SIGNALS: void currentDiveChanged(int divenr); @@ -37,6 +39,7 @@ private: bool mouseClickSelection; int currentHeaderClicked; DiveTripModel::Layout currentLayout; + QLineEdit *searchBox; }; #endif // DIVELISTVIEW_H |