diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-02-10 22:55:09 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-02-11 20:29:05 -0800 |
commit | a07d8cf5ea0179f3e99e73feb4a04533d7940e55 (patch) | |
tree | 1ea4459c874f7caf0b55e045c9dd15351092fe72 /desktop-widgets/filterwidget2.cpp | |
parent | b3f0fd3e1894ab987be268726abca5ec2ebaeaf9 (diff) | |
download | subsurface-a07d8cf5ea0179f3e99e73feb4a04533d7940e55.tar.gz |
Filter: implement starts-with and exact modes
Currently, we do substring search. Implement starts-with and
exact mode (for example when search for "Cave vs. Cavern" tags).
For each textual search criterion add a combo-box.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/filterwidget2.cpp')
-rw-r--r-- | desktop-widgets/filterwidget2.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/desktop-widgets/filterwidget2.cpp b/desktop-widgets/filterwidget2.cpp index 140016a03..da20fc45c 100644 --- a/desktop-widgets/filterwidget2.cpp +++ b/desktop-widgets/filterwidget2.cpp @@ -24,6 +24,7 @@ FilterWidget2::FilterWidget2(QWidget* parent) : // TODO: unhide this when we discover how to search for equipment. ui.equipment->hide(); ui.equipmentMode->hide(); + ui.equipmentStringMode->hide(); ui.labelEquipment->hide(); ui.fromDate->setDisplayFormat(prefs.date_format); @@ -154,6 +155,12 @@ void FilterWidget2::clearFilter() ui.suitMode->setCurrentIndex((int)filterData.suitMode); ui.dnotesMode->setCurrentIndex((int)filterData.dnotesMode); ui.equipmentMode->setCurrentIndex((int)filterData.equipmentMode); + ui.tagsStringMode->setCurrentIndex((int)filterData.tagsStringMode); + ui.peopleStringMode->setCurrentIndex((int)filterData.peopleStringMode); + ui.locationStringMode->setCurrentIndex((int)filterData.locationStringMode); + ui.suitStringMode->setCurrentIndex((int)filterData.suitStringMode); + ui.dnotesStringMode->setCurrentIndex((int)filterData.dnotesStringMode); + ui.equipmentStringMode->setCurrentIndex((int)filterData.equipmentStringMode); ignoreSignal = false; @@ -204,6 +211,12 @@ void FilterWidget2::updateFilter() filterData.suitMode = (FilterData::Mode)ui.suitMode->currentIndex(); filterData.dnotesMode = (FilterData::Mode)ui.dnotesMode->currentIndex(); filterData.equipmentMode = (FilterData::Mode)ui.equipmentMode->currentIndex(); + filterData.tagsStringMode = (FilterData::StringMode)ui.tagsStringMode->currentIndex(); + filterData.peopleStringMode = (FilterData::StringMode)ui.peopleStringMode->currentIndex(); + filterData.locationStringMode = (FilterData::StringMode)ui.locationStringMode->currentIndex(); + filterData.suitStringMode = (FilterData::StringMode)ui.suitStringMode->currentIndex(); + filterData.dnotesStringMode = (FilterData::StringMode)ui.dnotesStringMode->currentIndex(); + filterData.equipmentStringMode = (FilterData::StringMode)ui.equipmentStringMode->currentIndex(); filterData.logged = ui.logged->isChecked(); filterData.planned = ui.planned->isChecked(); |