diff options
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/undobuffer.cpp | 41 | ||||
-rw-r--r-- | qt-ui/undobuffer.h | 24 |
2 files changed, 65 insertions, 0 deletions
diff --git a/qt-ui/undobuffer.cpp b/qt-ui/undobuffer.cpp new file mode 100644 index 000000000..fd74466be --- /dev/null +++ b/qt-ui/undobuffer.cpp @@ -0,0 +1,41 @@ +#include "undobuffer.h" + +UndoBuffer::UndoBuffer(QObject *parent) : QObject(parent) +{ + +} + +UndoBuffer::~UndoBuffer() +{ + +} + +bool UndoBuffer::canUndo() +{ + +} + +bool UndoBuffer::canRedo() +{ + +} + +void UndoBuffer::redo() +{ + +} + +void UndoBuffer::undo() +{ + +} + +void UndoBuffer::recordbefore(QString commandName, dive *affectedDive) +{ + +} + +void UndoBuffer::recordAfter(dive *affectedDive) +{ + +} diff --git a/qt-ui/undobuffer.h b/qt-ui/undobuffer.h new file mode 100644 index 000000000..a292d3ba7 --- /dev/null +++ b/qt-ui/undobuffer.h @@ -0,0 +1,24 @@ +#ifndef UNDOBUFFER_H +#define UNDOBUFFER_H + +#include <QObject> +#include "dive.h" + +class UndoBuffer : public QObject +{ + Q_OBJECT +public: + explicit UndoBuffer(QObject *parent = 0); + ~UndoBuffer(); + bool canUndo(); + bool canRedo(); +private: + int curIdx; +public slots: + void redo(); + void undo(); + void recordbefore(QString commandName, dive *affectedDive); + void recordAfter(dive *affectedDive); +}; + +#endif // UNDOBUFFER_H |