subsurface/qt-ui/undocommands.h
Grace Karanja 87ee8e8aef Add ability to undo shifting of dive time
Adds the ability to undo shifting of dive times. The change is captured
at simplewidgets.cpp and an undo command is created.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-14 15:46:37 -08:00

28 lines
497 B
C++

#ifndef UNDOCOMMANDS_H
#define UNDOCOMMANDS_H
#include <QUndoCommand>
#include "dive.h"
class UndoDeleteDive : public QUndoCommand {
public:
UndoDeleteDive(QList<struct dive*> diveList);
virtual void undo();
virtual void redo();
private:
QList<struct dive*> dives;
};
class UndoShiftTime : public QUndoCommand {
public:
UndoShiftTime(QList<int> diveList, int amount);
virtual void undo();
virtual void redo();
private:
QList<int> dives;
int timeChanged;
};
#endif // UNDOCOMMANDS_H