subsurface/desktop-widgets/filterwidget2.h
Tomaz Canabrava 43178be1f2 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>
2018-12-14 01:05:18 +08:00

35 lines
612 B
C++

#ifndef FILTERWIDGET_2_H
#define FILTERWIDGET_2_H
#include <QWidget>
#include <QHideEvent>
#include <QShowEvent>
#include <memory>
#include "ui_filterwidget2.h"
#include "qt-models/filtermodels.h"
namespace Ui {
class FilterWidget2;
}
class FilterWidget2 : public QWidget {
Q_OBJECT
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