subsurface/qt-ui/undobuffer.cpp
Grace Karanja 8d1e4557a9 Add UndoCommand class
Add a class to handle all undo/redo events. Whenever a user
action affects a dive, an undo command will be created. A list of
these commands will be stored in the UndoBuffer, to allow for
moving forwards/backwards in the list.

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

60 lines
563 B
C++

#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)
{
}
UndoCommand::UndoCommand(QString commandName, dive *affectedDive)
{
name = commandName;
stateBefore = affectedDive;
}
void UndoCommand::undo()
{
}
void UndoCommand::redo()
{
}