mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
filter: connect load filter preset functionality to ui
Add a button to the filter preset widget that allows the user to load a previously saved filter preset. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
51959d0feb
commit
c6bd2a7ffb
3 changed files with 63 additions and 3 deletions
|
@ -12,6 +12,7 @@
|
|||
#include "qt-models/filterconstraintmodel.h"
|
||||
|
||||
class FilterConstraintWidget;
|
||||
class QMenu;
|
||||
|
||||
class FilterWidget2 : public QWidget {
|
||||
Q_OBJECT
|
||||
|
@ -33,6 +34,7 @@ private slots:
|
|||
void constraintRemoved(const QModelIndex &parent, int first, int last);
|
||||
void constraintChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles);
|
||||
void constraintsReset();
|
||||
void updatePresetMenu();
|
||||
void on_addSetButton_clicked();
|
||||
|
||||
private:
|
||||
|
@ -43,6 +45,9 @@ private:
|
|||
void addConstraint(filter_constraint_type type);
|
||||
std::vector<std::unique_ptr<FilterConstraintWidget>> constraintWidgets;
|
||||
FilterData createFilterData() const;
|
||||
void setFilterData(const FilterData &filterData);
|
||||
void loadPreset(int index);
|
||||
std::unique_ptr<QMenu> loadFilterPresetMenu;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue