summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/undobuffer.cpp18
-rw-r--r--qt-ui/undobuffer.h13
2 files changed, 31 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()
+{
+
+}
diff --git a/qt-ui/undobuffer.h b/qt-ui/undobuffer.h
index a292d3ba7..beae8e390 100644
--- a/qt-ui/undobuffer.h
+++ b/qt-ui/undobuffer.h
@@ -4,6 +4,19 @@
#include <QObject>
#include "dive.h"
+class UndoCommand {
+private:
+ dive* stateBefore;
+ dive* stateAfter;
+ QString name;
+
+public:
+ explicit UndoCommand(QString commandName, dive* affectedDive);
+ void setStateAfter(dive* affectedDive);
+ void undo();
+ void redo();
+};
+
class UndoBuffer : public QObject
{
Q_OBJECT