mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
c6bd2a7ffb
commit
142f76374c
3 changed files with 241 additions and 189 deletions
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue