Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_node_compositeop_command.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2002 Patrick Julien <freak@codepimps.org>
3 * SPDX-FileCopyrightText: 2005 C. Boemann <cbo@boemann.dk>
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 */
7#ifndef KIS_NODE_COMPOSITEOP_COMMAND_H
8#define KIS_NODE_COMPOSITEOP_COMMAND_H
9
10#include "kis_node_command.h"
12#include <boost/optional.hpp>
13
16{
17
18public:
25 KisNodeCompositeOpCommand(KisNodeSP node, const QString& newCompositeOp);
26
27 void redo() override;
28 void undo() override;
29
30 int id() const override;
31 bool mergeWith(const KUndo2Command *command) override;
32 bool canMergeWith(const KUndo2Command *command) const override;
33
34 bool canAnnihilateWith(const KUndo2Command *command) const override;
35
36private:
37 void setCompositeOpImpl(const QString &compositeOp);
38
39private:
40 boost::optional<QString> m_oldCompositeOp;
42};
43
44#endif /* KIS_NODE_COMPOSITEOP_COMMAND_H */
virtual bool mergeWith(const KUndo2Command *other)
virtual void undo()
virtual void redo()
virtual bool canAnnihilateWith(const KUndo2Command *other) const
virtual int id() const
virtual bool canMergeWith(const KUndo2Command *command) const =0
the base command for commands altering a node
The command for setting the composite op.
boost::optional< QString > m_oldCompositeOp