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
|
@ -9,6 +9,7 @@
|
|||
#include <vector>
|
||||
|
||||
struct DiveAndLocation;
|
||||
struct FilterData;
|
||||
|
||||
// We put everything in a namespace, so that we can shorten names without polluting the global namespace
|
||||
namespace Command {
|
||||
|
@ -133,6 +134,12 @@ void setPictureOffset(dive *d, const QString &filename, offset_t offset);
|
|||
void removePictures(const std::vector<PictureListForDeletion> &pictures);
|
||||
void addPictures(const std::vector<PictureListForAddition> &pictures);
|
||||
|
||||
// 8) Filter commands
|
||||
|
||||
void createFilterPreset(const QString &name, const FilterData &data);
|
||||
void removeFilterPreset(int index);
|
||||
void editFilterPreset(int index, const FilterData &data);
|
||||
|
||||
} // namespace Command
|
||||
|
||||
#endif // COMMAND_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue