mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-01 06:30:26 +00:00
853dfa6673
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>
24 lines
419 B
C++
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
|