Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_simple_processing_visitor.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2013 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
8
9#include "kis_group_layer.h"
10#include "kis_paint_layer.h"
13
15#include "kis_filter_mask.h"
16#include "kis_transform_mask.h"
17#include "kis_selection_mask.h"
18#include "kis_image.h"
31{
32 Q_UNUSED(node);
33 Q_UNUSED(undoAdapter);
34}
35
37{
38 Q_UNUSED(layer);
39 Q_UNUSED(undoAdapter);
40}
41
43{
44 visitExternalLayer(layer, undoAdapter);
45}
46
48{
49 visitNodeWithPaintDevice(layer, undoAdapter);
50}
51
53{
54 using namespace KisDoSomethingCommandOps;
55 undoAdapter->addCommand(new KisDoSomethingCommand<ResetOp, KisGroupLayer*>(layer, false));
57}
58
60{
61 using namespace KisDoSomethingCommandOps;
63 visitNodeWithPaintDevice(layer, undoAdapter);
65}
66
68{
69 using namespace KisDoSomethingCommandOps;
71 visitNodeWithPaintDevice(layer, undoAdapter);
73}
74
76{
77 visitNodeWithPaintDevice(mask, undoAdapter);
78}
79
81{
82 Q_UNUSED(undoAdapter);
83
84 // If (when) it had paint device, we would implement different default
85 // strategy for it. Right now it has neither selection nor a paint device.
86 KIS_ASSERT_RECOVER_NOOP(!mask->selection() && !mask->paintDevice());
87}
88
93
95{
96 visitNodeWithPaintDevice(mask, undoAdapter);
97}
98
100{
101 visitColorizeMask(mask, undoAdapter);
102}
virtual void visitExternalLayer(KisExternalLayer *layer, KisUndoAdapter *undoAdapter)=0
virtual void visitNodeWithPaintDevice(KisNode *node, KisUndoAdapter *undoAdapter)=0
virtual void visitColorizeMask(KisColorizeMask *mask, KisUndoAdapter *undoAdapter)=0
void visit(KisNode *node, KisUndoAdapter *undoAdapter) override
virtual void addCommand(KUndo2Command *cmd)=0
#define KIS_ASSERT_RECOVER_NOOP(cond)
Definition kis_assert.h:97
KisSelectionSP selection
Definition kis_mask.cc:44
KisPaintDeviceSP paintDevice() const override