subsurface/desktop-widgets/filterwidget2.h
Berthold Stoeger 5aacd73a00 Filter: call update title directly in filter model
Instead of sending a signal when counts change, catching them
in the filter widget and update the window title there,
directly update the window title in the model. This removes a
signal/slot pair.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-04-12 18:19:07 +03:00

45 lines
815 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();
QString shownText();
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();
private:
bool ignoreSignal;
bool isActive() const;
Ui::FilterWidget2 ui;
void filterDataChanged(const FilterData &data);
FilterData filterData;
};
#endif