diff options
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/filtermodels.cpp | 14 | ||||
-rw-r--r-- | qt-ui/filtermodels.h | 4 | ||||
-rw-r--r-- | qt-ui/locationinformation.h | 5 |
3 files changed, 20 insertions, 3 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(); +} diff --git a/qt-ui/filtermodels.h b/qt-ui/filtermodels.h index 9d8724173..f9eb700dd 100644 --- a/qt-ui/filtermodels.h +++ b/qt-ui/filtermodels.h @@ -93,12 +93,16 @@ public slots: void myInvalidate(); void clearFilter(); + void startFilterDiveSite(int32_t uuid); + void stopFilterDiveSite(); + signals: void filterFinished(); private: MultiFilterSortModel(QObject *parent = 0); QList<MultiFilterInterface *> models; bool justCleared; + struct dive_site *curr_dive_site; }; #endif diff --git a/qt-ui/locationinformation.h b/qt-ui/locationinformation.h index 41f626b3f..49db2ce47 100644 --- a/qt-ui/locationinformation.h +++ b/qt-ui/locationinformation.h @@ -22,7 +22,7 @@ public: LocationInformationWidget(QWidget *parent = 0); protected: void showEvent(QShowEvent *); -\ + public slots: void acceptChanges(); void rejectChanges(); @@ -40,7 +40,8 @@ public slots: signals: void informationManagementEnded(); void coordinatesChanged(); - + void startFilterDiveSite(uint32_t uuid); + void stopFilterFiveSite(); private: struct dive_site *currentDs; Ui::LocationInformation ui; |