diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2018-11-16 15:24:11 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-12-14 01:05:18 +0800 |
commit | 43178be1f23dca936b177b79245818e971bedde3 (patch) | |
tree | 26a9e653b02c375b173fa739753735cb7bb94aea /desktop-widgets/filterwidget2.h | |
parent | 81bb6086c0e7f7ba6d4100a49cc9cf32556caaaf (diff) | |
download | subsurface-43178be1f23dca936b177b79245818e971bedde3.tar.gz |
Handle Show / Close of the Filter Box
when you close, remove filter. when you open again, restore.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'desktop-widgets/filterwidget2.h')
-rw-r--r-- | desktop-widgets/filterwidget2.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/desktop-widgets/filterwidget2.h b/desktop-widgets/filterwidget2.h index a9d976ec8..80629f0cc 100644 --- a/desktop-widgets/filterwidget2.h +++ b/desktop-widgets/filterwidget2.h @@ -2,6 +2,8 @@ #define FILTERWIDGET_2_H #include <QWidget> +#include <QHideEvent> +#include <QShowEvent> #include <memory> @@ -18,12 +20,16 @@ class FilterWidget2 : public QWidget { public: explicit FilterWidget2(QWidget *parent = 0); void updateFilter(); +protected: + void hideEvent(QHideEvent *event) override; + void showEvent(QShowEvent *event) override; signals: void filterDataChanged(const FilterData& data); private: std::unique_ptr<Ui::FilterWidget2> ui; + FilterData filterData; }; #endif |