mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-03 15:43:09 +00:00
Filter: connect widget and filter
In the latest version of the new filter-widget the connection between widget and filter was lost. Connect both - but use a simple function call instead of a signal, since it is not immediately obivous where the connection should be made. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
891fcbf520
commit
cc0c4ab2f1
2 changed files with 9 additions and 8 deletions
|
@ -97,7 +97,7 @@ void FilterWidget2::updateFilter()
|
||||||
data.planned = ui->planned->isChecked();
|
data.planned = ui->planned->isChecked();
|
||||||
|
|
||||||
filterData = data;
|
filterData = data;
|
||||||
emit filterDataChanged(data);
|
filterDataChanged(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FilterWidget2::updateLogged(int value) {
|
void FilterWidget2::updateLogged(int value) {
|
||||||
|
@ -116,12 +116,17 @@ void FilterWidget2::updatePlanned(int value) {
|
||||||
void FilterWidget2::showEvent(QShowEvent *event)
|
void FilterWidget2::showEvent(QShowEvent *event)
|
||||||
{
|
{
|
||||||
QWidget::showEvent(event);
|
QWidget::showEvent(event);
|
||||||
emit filterDataChanged(filterData);
|
filterDataChanged(filterData);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FilterWidget2::hideEvent(QHideEvent *event)
|
void FilterWidget2::hideEvent(QHideEvent *event)
|
||||||
{
|
{
|
||||||
QWidget::hideEvent(event);
|
QWidget::hideEvent(event);
|
||||||
FilterData data;
|
FilterData data;
|
||||||
emit filterDataChanged(data);
|
filterDataChanged(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FilterWidget2::filterDataChanged(const FilterData &data)
|
||||||
|
{
|
||||||
|
MultiFilterSortModel::instance()->filterDataChanged(data);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,17 +24,13 @@ protected:
|
||||||
void hideEvent(QHideEvent *event) override;
|
void hideEvent(QHideEvent *event) override;
|
||||||
void showEvent(QShowEvent *event) override;
|
void showEvent(QShowEvent *event) override;
|
||||||
|
|
||||||
signals:
|
|
||||||
void filterDataChanged(const FilterData& data);
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void updatePlanned(int value);
|
void updatePlanned(int value);
|
||||||
void updateLogged(int value);
|
void updateLogged(int value);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<Ui::FilterWidget2> ui;
|
std::unique_ptr<Ui::FilterWidget2> ui;
|
||||||
|
void filterDataChanged(const FilterData &data);
|
||||||
FilterData filterData;
|
FilterData filterData;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue