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