summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/filterwidget2.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-01-25 22:11:30 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-01-26 08:05:39 -0800
commita455b32e0241ac6928293005ede8e2d79220533d (patch)
tree3c0a76d8da25a763e48455536d35dc1658624d35 /desktop-widgets/filterwidget2.h
parentc210bfc0e0205067c4f4274afc7975486e35252a (diff)
downloadsubsurface-a455b32e0241ac6928293005ede8e2d79220533d.tar.gz
Filter: implement reset filter
Move initialization to a separate function and connect that to the reset button. Two points of note: 1) Reseting the text-fields causes signals. Thus, signals have to be ignored during reset. Do this with a new flag. 2) To make reset of the from-date work, the from-date has to be initialized to a distinct value. Setting a default-constructed QDateTime leaves the widget unchanged. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/filterwidget2.h')
-rw-r--r--desktop-widgets/filterwidget2.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/desktop-widgets/filterwidget2.h b/desktop-widgets/filterwidget2.h
index 23d08dd2a..2988fac67 100644
--- a/desktop-widgets/filterwidget2.h
+++ b/desktop-widgets/filterwidget2.h
@@ -28,10 +28,12 @@ public slots:
void updatePlanned(int value);
void updateLogged(int value);
private slots:
+ void clearFilter();
void temperatureChanged();
void countsChanged();
private:
+ bool ignoreSignal;
Ui::FilterWidget2 ui;
void filterDataChanged(const FilterData &data);
FilterData filterData;