subsurface/qt-ui/undobuffer.h
Grace Karanja 853dfa6673 Create UndoBuffer class
Add an empty UndoBuffer class. This will be built up on to
implement a working undo/redo mechanism.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-09 21:02:07 -08:00

24 lines
419 B
C++

#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