mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-01 14:40:28 +00:00
87ee8e8aef
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>
28 lines
497 B
C++
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
|