File indexing completed on 2024-12-22 04:10:02

0001 /*
0002  *  SPDX-FileCopyrightText: 2002 Patrick Julien <freak@codepimps.org>
0003  *  SPDX-FileCopyrightText: 2005 C. Boemann <cbo@boemann.dk>
0004  *
0005  *  SPDX-License-Identifier: GPL-2.0-or-later
0006  */
0007 #ifndef KIS_NODE_COMMAND_H_
0008 #define KIS_NODE_COMMAND_H_
0009 
0010 #include <kritaimage_export.h>
0011 #include <kundo2command.h>
0012 #include "kis_types.h"
0013 
0014 class KisNode;
0015 
0016 /// the base command for commands altering a node
0017 class KRITAIMAGE_EXPORT KisNodeCommand : public KUndo2Command
0018 {
0019 
0020 public:
0021     /**
0022      * Constructor
0023      * @param name The name that will be shown in the ui
0024      * @param node The node the command will be working on.
0025      */
0026     KisNodeCommand(const KUndo2MagicString& name, KisNodeSP node);
0027     ~KisNodeCommand() override;
0028 
0029 protected:
0030     KisNodeSP m_node;
0031 };
0032 
0033 #endif /* KIS_NODE_COMMAND_H_*/