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:
Berthold Stoeger 2020-05-27 09:31:26 +02:00 committed by Dirk Hohndel
parent 536fc05dd6
commit 2f5223035a
7 changed files with 184 additions and 0 deletions

View file

@ -125,6 +125,11 @@ signals:
void picturesRemoved(dive *d, QVector<QString> filenames);
void picturesAdded(dive *d, QVector<PictureObj> pics);
// Filter related signals
void filterPresetAdded(int index);
void filterPresetRemoved(int index);
void filterPresetChanged(int index);
// This signal is emited every time a command is executed.
// This is used to hide an old multi-dives-edited warning message.
// This is necessary, so that the user can't click on the "undo" button and undo