mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
c383079626
Implement the close & reset functionality, by reseting the application state to "Default". This is currently the only state from where the fiter can be called. To make it consistent with CTRL^F, clear the filter in the hide() slot, which is called in both cases. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
43 lines
791 B
C++
43 lines
791 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;
|
|
|
|
public slots:
|
|
void updatePlanned(int value);
|
|
void updateLogged(int value);
|
|
private slots:
|
|
void clearFilter();
|
|
void closeFilter();
|
|
void temperatureChanged();
|
|
void countsChanged();
|
|
|
|
private:
|
|
bool ignoreSignal;
|
|
Ui::FilterWidget2 ui;
|
|
void filterDataChanged(const FilterData &data);
|
|
FilterData filterData;
|
|
};
|
|
|
|
#endif
|