mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
filter: add filter preset undo commands
Add undo commands to add / edit / delete filter presets. These are styled after the other undo commands: On changes, the UI is informed by DiveListNotifier signals. Editing is a simple std::swap of values. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
536fc05dd6
commit
2f5223035a
7 changed files with 184 additions and 0 deletions
|
@ -6,6 +6,7 @@
|
|||
#include "command_edit.h"
|
||||
#include "command_edit_trip.h"
|
||||
#include "command_event.h"
|
||||
#include "command_filter.h"
|
||||
#include "command_pictures.h"
|
||||
|
||||
namespace Command {
|
||||
|
@ -377,4 +378,19 @@ void addPictures(const std::vector<PictureListForAddition> &pictures)
|
|||
execute(new AddPictures(pictures));
|
||||
}
|
||||
|
||||
void createFilterPreset(const QString &name, const FilterData &data)
|
||||
{
|
||||
execute(new CreateFilterPreset(name, data));
|
||||
}
|
||||
|
||||
void removeFilterPreset(int index)
|
||||
{
|
||||
execute(new RemoveFilterPreset(index));
|
||||
}
|
||||
|
||||
void editFilterPreset(int index, const FilterData &data)
|
||||
{
|
||||
execute(new EditFilterPreset(index, data));
|
||||
}
|
||||
|
||||
} // namespace Command
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue