summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--desktop-widgets/filterwidget2.cpp3
-rw-r--r--desktop-widgets/filterwidget2.ui89
2 files changed, 65 insertions, 27 deletions
diff --git a/desktop-widgets/filterwidget2.cpp b/desktop-widgets/filterwidget2.cpp
index 66080cfca..9eb4f733b 100644
--- a/desktop-widgets/filterwidget2.cpp
+++ b/desktop-widgets/filterwidget2.cpp
@@ -161,4 +161,7 @@ void FilterWidget2::hideEvent(QHideEvent *event)
void FilterWidget2::filterDataChanged(const FilterData &data)
{
MultiFilterSortModel::instance()->filterDataChanged(data);
+
+ ui.filterText->setText(tr("%L1/%L2 shown").arg(MultiFilterSortModel::instance()->divesDisplayed)
+ .arg(dive_table.nr));
}
diff --git a/desktop-widgets/filterwidget2.ui b/desktop-widgets/filterwidget2.ui
index 7ed52ef4e..0822a582f 100644
--- a/desktop-widgets/filterwidget2.ui
+++ b/desktop-widgets/filterwidget2.ui
@@ -14,10 +14,17 @@
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
- <item row="8" column="1" colspan="4">
+ <item row="0" column="0">
+ <widget class="QLabel" name="filterText">
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="8" column="2" colspan="7">
<widget class="QLineEdit" name="tags"/>
</item>
- <item row="1" column="1">
+ <item row="1" column="2">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Min</string>
@@ -31,7 +38,7 @@
</property>
</widget>
</item>
- <item row="3" column="3">
+ <item row="3" column="7">
<widget class="QLabel" name="label_13">
<property name="text">
<string>Max</string>
@@ -52,10 +59,10 @@
</property>
</widget>
</item>
- <item row="3" column="2">
+ <item row="3" column="6">
<widget class="QDoubleSpinBox" name="minWaterTemp"/>
</item>
- <item row="12" column="1" colspan="4">
+ <item row="12" column="2" colspan="7">
<widget class="QCheckBox" name="invertFilter">
<property name="toolTip">
<string>Display dives that will not match the search, only applies to tags, people, location and equipment</string>
@@ -65,14 +72,14 @@
</property>
</widget>
</item>
- <item row="2" column="3">
+ <item row="2" column="7">
<widget class="QLabel" name="label_16">
<property name="text">
<string>Max</string>
</property>
</widget>
</item>
- <item row="3" column="1">
+ <item row="3" column="2">
<widget class="QLabel" name="label_12">
<property name="text">
<string>Min</string>
@@ -93,14 +100,14 @@
</property>
</widget>
</item>
- <item row="4" column="1">
+ <item row="4" column="2">
<widget class="QLabel" name="label_17">
<property name="text">
<string>Min</string>
</property>
</widget>
</item>
- <item row="3" column="4">
+ <item row="3" column="8">
<widget class="QDoubleSpinBox" name="maxWaterTemp"/>
</item>
<item row="2" column="0">
@@ -110,21 +117,21 @@
</property>
</widget>
</item>
- <item row="2" column="1">
+ <item row="2" column="2">
<widget class="QLabel" name="label_14">
<property name="text">
<string>Min</string>
</property>
</widget>
</item>
- <item row="1" column="3">
+ <item row="1" column="7">
<widget class="QLabel" name="label_15">
<property name="text">
<string>Max</string>
</property>
</widget>
</item>
- <item row="10" column="1" colspan="4">
+ <item row="10" column="2" colspan="7">
<widget class="QLineEdit" name="location"/>
</item>
<item row="11" column="0">
@@ -134,13 +141,13 @@
</property>
</widget>
</item>
- <item row="4" column="2">
+ <item row="4" column="6">
<widget class="QDoubleSpinBox" name="minAirTemp"/>
</item>
- <item row="4" column="4">
+ <item row="4" column="8">
<widget class="QDoubleSpinBox" name="maxAirTemp"/>
</item>
- <item row="11" column="1" colspan="4">
+ <item row="11" column="2" colspan="7">
<widget class="QLineEdit" name="equipment"/>
</item>
<item row="3" column="0">
@@ -150,10 +157,10 @@
</property>
</widget>
</item>
- <item row="9" column="1" colspan="4">
+ <item row="9" column="2" colspan="7">
<widget class="QLineEdit" name="people"/>
</item>
- <item row="4" column="3">
+ <item row="4" column="7">
<widget class="QLabel" name="label_18">
<property name="text">
<string>Max</string>
@@ -174,7 +181,7 @@
</property>
</widget>
</item>
- <item row="2" column="4">
+ <item row="2" column="8">
<widget class="StarWidget" name="maxVisibility" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
@@ -187,7 +194,7 @@
</property>
</widget>
</item>
- <item row="2" column="2">
+ <item row="2" column="6">
<widget class="StarWidget" name="minVisibility" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
@@ -200,7 +207,7 @@
</property>
</widget>
</item>
- <item row="1" column="2">
+ <item row="1" column="6">
<widget class="StarWidget" name="minRating" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
@@ -213,7 +220,7 @@
</property>
</widget>
</item>
- <item row="1" column="4">
+ <item row="1" column="8">
<widget class="StarWidget" name="maxRating" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
@@ -226,7 +233,7 @@
</property>
</widget>
</item>
- <item row="7" column="1">
+ <item row="7" column="2">
<widget class="QCheckBox" name="logged">
<property name="text">
<string>Logged</string>
@@ -236,7 +243,7 @@
</property>
</widget>
</item>
- <item row="7" column="2">
+ <item row="7" column="6">
<widget class="QCheckBox" name="planned">
<property name="text">
<string>Planned</string>
@@ -246,26 +253,54 @@
</property>
</widget>
</item>
- <item row="5" column="3">
+ <item row="5" column="7">
<widget class="QTimeEdit" name="fromTime"/>
</item>
- <item row="5" column="1" colspan="2">
+ <item row="5" column="2" colspan="5">
<widget class="QDateTimeEdit" name="fromDate">
<property name="calendarPopup">
<bool>true</bool>
</property>
</widget>
</item>
- <item row="6" column="1" colspan="2">
+ <item row="6" column="2" colspan="5">
<widget class="QDateTimeEdit" name="toDate">
<property name="calendarPopup">
<bool>true</bool>
</property>
</widget>
</item>
- <item row="6" column="3">
+ <item row="6" column="7">
<widget class="QTimeEdit" name="toTime"/>
</item>
+ <item row="0" column="3">
+ <widget class="QToolButton" name="close">
+ <property name="toolTip">
+ <string>Close and reset filters</string>
+ </property>
+ <property name="icon">
+ <iconset>
+ <normaloff>:filter-close</normaloff>:filter-close</iconset>
+ </property>
+ <property name="autoRaise">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QToolButton" name="clear">
+ <property name="toolTip">
+ <string>Reset filters</string>
+ </property>
+ <property name="icon">
+ <iconset>
+ <normaloff>:edit-clear-icon</normaloff>:edit-clear-icon</iconset>
+ </property>
+ <property name="autoRaise">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
<customwidgets>