diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-09-17 15:45:18 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-09-17 15:28:04 -0700 |
commit | a6e9a1eab561af3255d99d31011c57135a90ca3f (patch) | |
tree | 424a8843682411c072a2fddac6e89924994388d0 /qt-ui/simplewidgets.cpp | |
parent | 7a90b9d7647537057f574916314a9f488e900e8a (diff) | |
download | subsurface-a6e9a1eab561af3255d99d31011c57135a90ca3f.tar.gz |
Implement the TagFilter model.
This model accepts check / unchedk. Now, I need to also
plug the result of the check / uncheck to the list model.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/simplewidgets.cpp')
-rw-r--r-- | qt-ui/simplewidgets.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp index e9bfc3cba..2f762ba60 100644 --- a/qt-ui/simplewidgets.cpp +++ b/qt-ui/simplewidgets.cpp @@ -7,6 +7,7 @@ #include <QFileDialog> #include <QShortcut> #include <QCalendarWidget> +#include <QSortFilterProxyModel> #include "exif.h" #include "dive.h" #include "file.h" @@ -459,4 +460,8 @@ void DiveComponentSelection::buttonClicked(QAbstractButton *button) TagFilter::TagFilter(QWidget *parent): QWidget(parent) { ui.setupUi(this); + QSortFilterProxyModel *filter = new QSortFilterProxyModel(); + filter->setSourceModel(TagFilterModel::instance()); + connect(ui.filterTag, SIGNAL(textChanged(QString)), filter, SLOT(setFilterFixedString(QString))); + ui.tagView->setModel(filter); } |