File indexing completed on 2024-10-13 04:15:11
0001 /* 0002 * SPDX-FileCopyrightText: (C) 2020 Carl Schwan <carl@carlschwan.eu> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.1-or-later 0005 */ 0006 0007 #pragma once 0008 0009 class QImage; 0010 0011 /** 0012 * A class implementing the command pattern. This is used to implemented various filters. 0013 */ 0014 class UndoCommand 0015 { 0016 public: 0017 virtual ~UndoCommand() = 0; 0018 0019 /** 0020 * Applies the change to the document. 0021 */ 0022 virtual QImage redo(QImage image) = 0; 0023 0024 /** 0025 * Revert a change to the document. 0026 */ 0027 virtual QImage undo(QImage image) = 0; 0028 };