summaryrefslogtreecommitdiffstats
path: root/qt-ui/undobuffer.cpp
diff options
context:
space:
mode:
authorGravatar Grace Karanja <gracie.karanja89@gmail.com>2015-02-09 09:30:27 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-02-09 21:02:16 -0800
commit8d1e4557a96f81a4cf263ea3d4e2228222d99e42 (patch)
treef65466c3a8cf30334b60b2338491953210fcff11 /qt-ui/undobuffer.cpp
parentc5138b2090e50cf76a51af1c561a31b5e01485db (diff)
downloadsubsurface-8d1e4557a96f81a4cf263ea3d4e2228222d99e42.tar.gz
Add UndoCommand class
Add a class to handle all undo/redo events. Whenever a user action affects a dive, an undo command will be created. A list of these commands will be stored in the UndoBuffer, to allow for moving forwards/backwards in the list. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/undobuffer.cpp')
-rw-r--r--qt-ui/undobuffer.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/qt-ui/undobuffer.cpp b/qt-ui/undobuffer.cpp
index fd74466be..1812f6f7a 100644
--- a/qt-ui/undobuffer.cpp
+++ b/qt-ui/undobuffer.cpp
@@ -39,3 +39,21 @@ void UndoBuffer::recordAfter(dive *affectedDive)
{
}
+
+
+
+UndoCommand::UndoCommand(QString commandName, dive *affectedDive)
+{
+ name = commandName;
+ stateBefore = affectedDive;
+}
+
+void UndoCommand::undo()
+{
+
+}
+
+void UndoCommand::redo()
+{
+
+}