summaryrefslogtreecommitdiffstats
path: root/qt-ui/filtermodels.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2015-05-26 17:36:06 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-05-26 21:48:22 -0700
commitee7e5113723cf40d598ed30a6f8409b5d4504422 (patch)
tree7ebbf1c003e62d194f19f2200f675853efa1ac5b /qt-ui/filtermodels.cpp
parent785051c9dd0734acfdbb14fea558aa6e59917b68 (diff)
downloadsubsurface-ee7e5113723cf40d598ed30a6f8409b5d4504422.tar.gz
Create signals/slots for filtering the dive_site,
The dive site management requires that we filter all the dives that are on the current dive_site, this is the preparatory work for that. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/filtermodels.cpp')
-rw-r--r--qt-ui/filtermodels.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/qt-ui/filtermodels.cpp b/qt-ui/filtermodels.cpp
index be26a253b..aba480dd9 100644
--- a/qt-ui/filtermodels.cpp
+++ b/qt-ui/filtermodels.cpp
@@ -292,7 +292,7 @@ void LocationFilterModel::repopulate()
anyChecked = false;
}
-MultiFilterSortModel::MultiFilterSortModel(QObject *parent) : QSortFilterProxyModel(parent), justCleared(false)
+MultiFilterSortModel::MultiFilterSortModel(QObject *parent) : QSortFilterProxyModel(parent), justCleared(false), curr_dive_site(NULL)
{
}
@@ -388,3 +388,15 @@ void MultiFilterSortModel::clearFilter()
justCleared = false;
myInvalidate();
}
+
+void MultiFilterSortModel::startFilterDiveSite(int32_t uuid)
+{
+ curr_dive_site = get_dive_site_by_uuid(uuid);
+ myInvalidate();
+}
+
+void MultiFilterSortModel::stopFilterDiveSite()
+{
+ curr_dive_site = NULL;
+ myInvalidate();
+}