From 142f76374c72499358154f239f1c4726995e427e Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Thu, 28 May 2020 22:19:58 +0200 Subject: 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 --- desktop-widgets/filterwidget2.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'desktop-widgets/filterwidget2.h') 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 &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 loadFilterPresetMenu; }; -- cgit v1.2.3-70-g09d2