undo: make picture (media) deletion undoable

The code is rather complex. Firstly, we have different representations
of pictures throughout the code. Secondly, this tries to do add the
pictures in batches to the divepicture model and that is always rather
tricky.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2020-04-17 23:18:58 +02:00 committed by Dirk Hohndel
parent 9962d47b56
commit 434644b381
13 changed files with 286 additions and 54 deletions

View file

@ -6,6 +6,7 @@
#define DIVELISTNOTIFIER_H
#include "core/dive.h"
#include "core/pictureobj.h"
#include <QObject>
@ -118,6 +119,8 @@ signals:
// Picture (media) related signals
void pictureOffsetChanged(dive *d, QString filename, offset_t offset);
void picturesRemoved(dive *d, QVector<QString> filenames);
void picturesAdded(dive *d, QVector<PictureObj> pics);
// This signal is emited every time a command is executed.
// This is used to hide an old multi-dives-edited warning message.