summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/filterwidget2.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-05-28 22:19:58 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-09-29 16:13:03 -0700
commit142f76374c72499358154f239f1c4726995e427e (patch)
treee94ddd0c8aca5f42d8763d4ad13c161292331ae7 /desktop-widgets/filterwidget2.h
parentc6bd2a7ffb1388f56d54fe67042bd0c9f44eaf9a (diff)
downloadsubsurface-142f76374c72499358154f239f1c4726995e427e.tar.gz
filter: add filter preset table
Add a table view that shows all presets and a button to delete old presets. When clicking on an item, load the preset. When the filter is reset, deselect any item. Change the preset-loading code: instead of simply loading the preset, select the preset in the table. Thus, it will be loaded implicitly. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/filterwidget2.h')
-rw-r--r--desktop-widgets/filterwidget2.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/desktop-widgets/filterwidget2.h b/desktop-widgets/filterwidget2.h
index 55d65fab2..a727c964c 100644
--- a/desktop-widgets/filterwidget2.h
+++ b/desktop-widgets/filterwidget2.h
@@ -35,6 +35,8 @@ private slots:
void constraintChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles);
void constraintsReset();
void updatePresetMenu();
+ void presetClicked(const QModelIndex &index);
+ void presetSelected(const QItemSelection &selected, const QItemSelection &);
void on_addSetButton_clicked();
private:
@@ -47,6 +49,8 @@ private:
FilterData createFilterData() const;
void setFilterData(const FilterData &filterData);
void loadPreset(int index);
+ void selectPreset(int i);
+ void clearFilterData();
std::unique_ptr<QMenu> loadFilterPresetMenu;
};