summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Grace Karanja <gracie.karanja89@gmail.com>2015-02-11 09:28:43 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-02-11 08:05:53 -0800
commit6d996a78742deb349cc1cb66ddea6abfb1b813d5 (patch)
tree59dcc66359ca254cf5b9a3a2f033104bf2d6beb9 /qt-ui
parentef14798d6d5e575a08aa8affc0815962813ecf29 (diff)
downloadsubsurface-6d996a78742deb349cc1cb66ddea6abfb1b813d5.tar.gz
Add a structure to hold undo commands
Add the undocommands.cpp / undocommands.h files, which will hold a collection of classes that will hold undo commands. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/undocommands.cpp16
-rw-r--r--qt-ui/undocommands.h17
2 files changed, 33 insertions, 0 deletions
diff --git a/qt-ui/undocommands.cpp b/qt-ui/undocommands.cpp
new file mode 100644
index 000000000..f76f021b3
--- /dev/null
+++ b/qt-ui/undocommands.cpp
@@ -0,0 +1,16 @@
+#include "undocommands.h"
+
+UndoDeleteDive::UndoDeleteDive(QList<dive *> diveList)
+{
+
+}
+
+void UndoDeleteDive::undo()
+{
+
+}
+
+void UndoDeleteDive::redo()
+{
+
+}
diff --git a/qt-ui/undocommands.h b/qt-ui/undocommands.h
new file mode 100644
index 000000000..9a7803f9e
--- /dev/null
+++ b/qt-ui/undocommands.h
@@ -0,0 +1,17 @@
+#ifndef UNDOCOMMANDS_H
+#define UNDOCOMMANDS_H
+
+#include <QUndoCommand>
+#include "dive.h"
+
+class UndoDeleteDive : public QUndoCommand {
+public:
+ UndoDeleteDive(QList<struct dive*> diveList);
+ virtual void undo();
+ virtual void redo();
+
+private:
+ QList<struct dive*> dives;
+};
+
+#endif // UNDOCOMMANDS_H