mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
25 lines
419 B
C
25 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
|