summaryrefslogtreecommitdiffstats
path: root/qt-ui/undocommands.h
diff options
context:
space:
mode:
authorGravatar Grace Karanja <gracie.karanja89@gmail.com>2015-04-10 09:39:51 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-04-14 10:29:15 -0700
commit193edd9f13b4a1a6cbddd494de6b7aa38709be95 (patch)
tree0e2c4a9cdc0289b09933746973ec5476aa404bc2 /qt-ui/undocommands.h
parent8e32faa866a144fc29a806a7e61a72e7eaf2a9e4 (diff)
downloadsubsurface-193edd9f13b4a1a6cbddd494de6b7aa38709be95.tar.gz
Add ability to undo removing of dives from trips
Add the functionality to undo/redo removing of dives from trips. The code calling remove_dive_from_trip has moved to the UndoCommands class. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/undocommands.h')
-rw-r--r--qt-ui/undocommands.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/qt-ui/undocommands.h b/qt-ui/undocommands.h
index e4f2da8e1..bd8530d77 100644
--- a/qt-ui/undocommands.h
+++ b/qt-ui/undocommands.h
@@ -37,4 +37,14 @@ private:
int start;
};
+class UndoRemoveDivesFromTrip : public QUndoCommand {
+public:
+ UndoRemoveDivesFromTrip(QMap<struct dive*, dive_trip*> removedDives);
+ virtual void undo();
+ virtual void redo();
+
+private:
+ QMap<struct dive*, dive_trip*> divesToUndo;
+};
+
#endif // UNDOCOMMANDS_H