File indexing completed on 2024-05-12 15:58:52
0001 /* 0002 * SPDX-FileCopyrightText: 2021 Dmitry Kazakov <dimula73@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef KISTRANSACTIONWRAPPERFACTORY_H 0008 #define KISTRANSACTIONWRAPPERFACTORY_H 0009 0010 #include "kritaimage_export.h" 0011 #include "kis_types.h" 0012 0013 class KUndo2Command; 0014 0015 /** 0016 * A simple factory that allows wrapping a paint device transaction 0017 * with two commands. One command will be executed before the device 0018 * transaction's code, and the other one after the transaction has 0019 * been executed. 0020 * 0021 * The only use of this class now is to change/reset interstroke data of 0022 * a paint device alongside executing the transaction. 0023 */ 0024 class KRITAIMAGE_EXPORT KisTransactionWrapperFactory 0025 { 0026 public: 0027 virtual ~KisTransactionWrapperFactory(); 0028 0029 virtual KUndo2Command* createBeginTransactionCommand(KisPaintDeviceSP device) = 0; 0030 virtual KUndo2Command* createEndTransactionCommand() = 0; 0031 }; 0032 0033 #endif // KISTRANSACTIONWRAPPERFACTORY_H