diff options
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/filterwidget2.cpp | 16 | ||||
-rw-r--r-- | desktop-widgets/filterwidget2.ui | 24 |
2 files changed, 30 insertions, 10 deletions
diff --git a/desktop-widgets/filterwidget2.cpp b/desktop-widgets/filterwidget2.cpp index 85c977b4e..77cefa5a8 100644 --- a/desktop-widgets/filterwidget2.cpp +++ b/desktop-widgets/filterwidget2.cpp @@ -140,10 +140,10 @@ void FilterWidget2::clearFilter() ui.fromTime->setTime(filterData.fromTime); ui.toDate->setDate(filterData.toDate.date()); ui.toTime->setTime(filterData.toTime); - ui.tagsMode->setCurrentIndex(filterData.tagsNegate ? 1 : 0); - ui.peopleMode->setCurrentIndex(filterData.peopleNegate ? 1 : 0); - ui.locationMode->setCurrentIndex(filterData.locationNegate ? 1 : 0); - ui.equipmentMode->setCurrentIndex(filterData.equipmentNegate ? 1 : 0); + ui.tagsMode->setCurrentIndex((int)filterData.tagsMode); + ui.peopleMode->setCurrentIndex((int)filterData.peopleMode); + ui.locationMode->setCurrentIndex((int)filterData.locationMode); + ui.equipmentMode->setCurrentIndex((int)filterData.equipmentMode); ignoreSignal = false; @@ -186,10 +186,10 @@ void FilterWidget2::updateFilter() filterData.people = ui.people->text().split(",", QString::SkipEmptyParts); filterData.location = ui.location->text().split(",", QString::SkipEmptyParts); filterData.equipment = ui.equipment->text().split(",", QString::SkipEmptyParts); - filterData.tagsNegate = ui.tagsMode->currentIndex() == 1; - filterData.peopleNegate = ui.peopleMode->currentIndex() == 1; - filterData.locationNegate = ui.locationMode->currentIndex() == 1; - filterData.equipmentNegate = ui.equipmentMode->currentIndex() == 1; + filterData.tagsMode = (FilterData::Mode)ui.tagsMode->currentIndex(); + filterData.peopleMode = (FilterData::Mode)ui.peopleMode->currentIndex(); + filterData.locationMode = (FilterData::Mode)ui.locationMode->currentIndex(); + filterData.equipmentMode = (FilterData::Mode)ui.equipmentMode->currentIndex(); filterData.logged = ui.logged->isChecked(); filterData.planned = ui.planned->isChecked(); diff --git a/desktop-widgets/filterwidget2.ui b/desktop-widgets/filterwidget2.ui index 0b95f7bae..92b61ba80 100644 --- a/desktop-widgets/filterwidget2.ui +++ b/desktop-widgets/filterwidget2.ui @@ -300,6 +300,11 @@ </item> <item> <property name="text"> + <string>Any of</string> + </property> + </item> + <item> + <property name="text"> <string>None of</string> </property> </item> @@ -314,6 +319,11 @@ </item> <item> <property name="text"> + <string>Any of</string> + </property> + </item> + <item> + <property name="text"> <string>None of</string> </property> </item> @@ -323,12 +333,17 @@ <widget class="QComboBox" name="locationMode"> <item> <property name="text"> - <string>Matches</string> + <string>All of</string> + </property> + </item> + <item> + <property name="text"> + <string>Any of</string> </property> </item> <item> <property name="text"> - <string>Doesn't match</string> + <string>None of</string> </property> </item> </widget> @@ -342,6 +357,11 @@ </item> <item> <property name="text"> + <string>Any of</string> + </property> + </item> + <item> + <property name="text"> <string>None of</string> </property> </item> |