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>
This commit is contained in:
Berthold Stoeger 2019-01-25 22:11:30 +01:00 committed by Dirk Hohndel
parent c210bfc0e0
commit a455b32e02
3 changed files with 41 additions and 16 deletions

View file

@ -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;