summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-09-05 15:44:24 (GMT)
committerKevin Smith <kevin.smith@isode.com>2016-09-07 10:47:40 (GMT)
commit615b87497cd8d4eedc386f002931d6d353f53ccd (patch)
tree2e3b0946e74415149b33973668ba9216d6f61d13 /Swift/QtUI/MUCSearch/QtMUCSearchWindow.h
parentb54df5d2a50d4dda0e63ac06050d4ed306952dbb (diff)
downloadswift-615b87497cd8d4eedc386f002931d6d353f53ccd.zip
swift-615b87497cd8d4eedc386f002931d6d353f53ccd.tar.bz2
Add ability to filter results in "Search Room" dialog
This is implemented with the help of an implementation of QSortFilterProxyModel which filters room names based on a user search string. Test-Information: Tested on OS X 10.11.6 with Qt 5.5.1. Tested UX with different MUC services and search strings. Change-Id: I88085d089493008b2197a4aeb45d8c4d75724b9c
Diffstat (limited to 'Swift/QtUI/MUCSearch/QtMUCSearchWindow.h')
-rw-r--r--Swift/QtUI/MUCSearch/QtMUCSearchWindow.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Swift/QtUI/MUCSearch/QtMUCSearchWindow.h b/Swift/QtUI/MUCSearch/QtMUCSearchWindow.h
index b115e6f..6f38533 100644
--- a/Swift/QtUI/MUCSearch/QtMUCSearchWindow.h
+++ b/Swift/QtUI/MUCSearch/QtMUCSearchWindow.h
@@ -10,6 +10,8 @@
#include <Swift/QtUI/MUCSearch/ui_QtMUCSearchWindow.h>
+class QSortFilterProxyModel;
+
namespace Swift {
class MUCSearchModel;
class MUCSearchDelegate;
@@ -36,6 +38,7 @@ namespace Swift {
private slots:
void handleSearch();
void handleSearch(const QString&);
+ void handleFilterStringChanged(const QString&);
void handleActivated(const QModelIndex& index);
void updateThrobberPosition();
void handleSelectionChanged (const QItemSelection&, const QItemSelection&);
@@ -47,5 +50,6 @@ namespace Swift {
MUCSearchDelegate* delegate_;
QLabel* throbber_;
bool hasHadScrollBars_;
+ QSortFilterProxyModel* sortFilterProxyModel_ = nullptr;
};
}