// SPDX-License-Identifier: GPL-2.0 #ifndef UNDOCOMMANDS_H #define UNDOCOMMANDS_H #include #include #include "core/dive.h" class UndoDeleteDive : public QUndoCommand { public: UndoDeleteDive(QList deletedDives); virtual void undo(); virtual void redo(); private: QList diveList; QList tripList; }; class UndoShiftTime : public QUndoCommand { public: UndoShiftTime(QList changedDives, int amount); virtual void undo(); virtual void redo(); private: QList diveList; int timeChanged; }; class UndoRenumberDives : public QUndoCommand { public: UndoRenumberDives(QMap > originalNumbers); virtual void undo(); virtual void redo(); private: QMap > oldNumbers; }; class UndoRemoveDivesFromTrip : public QUndoCommand { public: UndoRemoveDivesFromTrip(QMap removedDives); virtual void undo(); virtual void redo(); private: QMap divesToUndo; }; #endif // UNDOCOMMANDS_H