Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_selection_manager.cc
Go to the documentation of this file.
1
2/*
3 * SPDX-FileCopyrightText: 2004 Boudewijn Rempt <boud@valdyas.org>
4 * SPDX-FileCopyrightText: 2007 Sven Langkamp <sven.langkamp@gmail.com>
5 *
6 * The outline algorithm uses the limn algorithm of fontutils by
7 * Karl Berry <karl@cs.umb.edu> and Kathryn Hargreaves <letters@cs.umb.edu>
8 *
9 * SPDX-License-Identifier: GPL-2.0-or-later
10 */
11
13#include <QApplication>
14#include <QClipboard>
15#include <QColor>
16#include <QMimeData>
17
18#include <QAction>
19#include <ktoggleaction.h>
20#include <klocalizedstring.h>
21#include <kstandardaction.h>
22#include <kactioncollection.h>
23
24#include <KoProperties.h>
25#include "KoCanvasController.h"
26#include "KoChannelInfo.h"
27#include "KoIntegerMaths.h"
28#include <KisDocument.h>
29#include <KisMainWindow.h>
30#include <KoSelection.h>
31#include <KoShapeManager.h>
33#include <KoShapeStroke.h>
34#include <KoColorSpace.h>
35#include <KoCompositeOp.h>
36#include <KoToolProxy.h>
37#include <KoSvgPaste.h>
38#include <kis_icon.h>
39
41#include "kis_node_manager.h"
42#include "canvas/kis_canvas2.h"
43#include "kis_config.h"
46#include "kis_debug.h"
47#include "kis_fill_painter.h"
48#include "kis_group_layer.h"
49#include "kis_layer.h"
50#include "kis_statusbar.h"
51#include "kis_paint_device.h"
52#include "kis_paint_layer.h"
53#include "kis_painter.h"
54#include "kis_transaction.h"
55#include "kis_selection.h"
56#include "kis_types.h"
58#include "kis_undo_adapter.h"
59#include "kis_pixel_selection.h"
62#include "kis_selection_mask.h"
67#include "kis_iterator_ng.h"
68#include "kis_clipboard.h"
69#include "KisViewManager.h"
72#include "KisView.h"
74
77#include "kis_action.h"
78#include "kis_action_manager.h"
80//new
81#include "kis_node_query_path.h"
82#include "kis_tool_shape.h"
83#include "kis_config_notifier.h"
84
91
95
97{
98 m_cut = actionManager->createStandardAction(KStandardAction::Cut, this, SLOT(cut()));
99 m_copy = actionManager->createStandardAction(KStandardAction::Copy, this, SLOT(copy()));
100 m_paste = actionManager->createStandardAction(KStandardAction::Paste, this, SLOT(paste()));
101
102 KisAction *action = actionManager->createAction("copy_sharp");
103 connect(action, SIGNAL(triggered()), this, SLOT(copySharp()));
104
105 action = actionManager->createAction("cut_sharp");
106 connect(action, SIGNAL(triggered()), this, SLOT(cutSharp()));
107
108 m_pasteNew = actionManager->createAction("paste_new");
109 connect(m_pasteNew, SIGNAL(triggered()), this, SLOT(pasteNew()));
110
111 m_pasteAt = actionManager->createAction("paste_at");
112 connect(m_pasteAt, SIGNAL(triggered()), this, SLOT(pasteAt()));
113
114 m_pasteInto = actionManager->createAction("paste_into");
115 connect(m_pasteInto, SIGNAL(triggered()), this, SLOT(pasteInto()));
116
117 m_pasteAsReference = actionManager->createAction("paste_as_reference");
118 connect(m_pasteAsReference, SIGNAL(triggered()), this, SLOT(pasteAsReference()));
119
120 m_pasteShapeStyle = actionManager->createAction("paste_shape_style");
121 connect(m_pasteShapeStyle, SIGNAL(triggered()), this, SLOT(pasteShapeStyle()));
122
123 m_copyMerged = actionManager->createAction("copy_merged");
124 connect(m_copyMerged, SIGNAL(triggered()), this, SLOT(copyMerged()));
125
126 m_selectAll = actionManager->createAction("select_all");
127 connect(m_selectAll, SIGNAL(triggered()), this, SLOT(selectAll()));
128
129 m_deselect = actionManager->createAction("deselect");
130 connect(m_deselect, SIGNAL(triggered()), this, SLOT(deselect()));
131
132 m_clear = actionManager->createAction("clear");
133 connect(m_clear, SIGNAL(triggered()), SLOT(clear()));
134
135 m_reselect = actionManager->createAction("reselect");
136 connect(m_reselect, SIGNAL(triggered()), this, SLOT(reselect()));
137
138 m_invert = actionManager->createAction("invert_selection");
139 m_invert->setOperationID("invertselection");
140
142
143 m_copyToNewLayer = actionManager->createAction("copy_selection_to_new_layer");
144 connect(m_copyToNewLayer, SIGNAL(triggered()), this, SLOT(copySelectionToNewLayer()));
145
146 m_cutToNewLayer = actionManager->createAction("cut_selection_to_new_layer");
147 connect(m_cutToNewLayer, SIGNAL(triggered()), this, SLOT(cutToNewLayer()));
148
149 m_fillForegroundColor = actionManager->createAction("fill_selection_foreground_color");
150 connect(m_fillForegroundColor, SIGNAL(triggered()), this, SLOT(fillForegroundColor()));
151
152 m_fillBackgroundColor = actionManager->createAction("fill_selection_background_color");
153 connect(m_fillBackgroundColor, SIGNAL(triggered()), this, SLOT(fillBackgroundColor()));
154
155 m_fillPattern = actionManager->createAction("fill_selection_pattern");
156 connect(m_fillPattern, SIGNAL(triggered()), this, SLOT(fillPattern()));
157
158 m_fillForegroundColorOpacity = actionManager->createAction("fill_selection_foreground_color_opacity");
159 connect(m_fillForegroundColorOpacity, SIGNAL(triggered()), this, SLOT(fillForegroundColorOpacity()));
160
161 m_fillBackgroundColorOpacity = actionManager->createAction("fill_selection_background_color_opacity");
162 connect(m_fillBackgroundColorOpacity, SIGNAL(triggered()), this, SLOT(fillBackgroundColorOpacity()));
163
164 m_fillPatternOpacity = actionManager->createAction("fill_selection_pattern_opacity");
165 connect(m_fillPatternOpacity, SIGNAL(triggered()), this, SLOT(fillPatternOpacity()));
166
167 m_strokeShapes = actionManager->createAction("stroke_shapes");
168 connect(m_strokeShapes, SIGNAL(triggered()), this, SLOT(paintSelectedShapes()));
169
170 m_toggleDisplaySelection = actionManager->createAction("toggle_display_selection");
171 connect(m_toggleDisplaySelection, SIGNAL(triggered()), this, SLOT(toggleDisplaySelection()));
172 m_toggleDisplaySelection->setChecked(true);
173
174 m_imageResizeToSelection = actionManager->createAction("resizeimagetoselection");
175 connect(m_imageResizeToSelection, SIGNAL(triggered()), this, SLOT(imageResizeToSelection()));
176
177 action = actionManager->createAction("edit_selection");
178 connect(action, SIGNAL(triggered()), SLOT(editSelection()));
179
180 action = actionManager->createAction("convert_to_vector_selection");
181 connect(action, SIGNAL(triggered()), SLOT(convertToVectorSelection()));
182
183 action = actionManager->createAction("convert_to_raster_selection");
184 connect(action, SIGNAL(triggered()), SLOT(convertToRasterSelection()));
185
186 action = actionManager->createAction("convert_shapes_to_vector_selection");
187 connect(action, SIGNAL(triggered()), SLOT(convertShapesToVectorSelection()));
188
189 action = actionManager->createAction("convert_selection_to_shape");
190 connect(action, SIGNAL(triggered()), SLOT(convertToShape()));
191
192 KisConfig cfg(true);
193 m_enableSelectionActionsPanel = actionManager->createAction("enable_sap");
195 connect(m_enableSelectionActionsPanel, SIGNAL(triggered(bool)), SLOT(enableSelectionActionsPanel(bool)));
196
197 action = actionManager->createAction("configure_sap");
198 action->setVisible(false);
199
200 m_toggleSelectionOverlayMode = actionManager->createAction("toggle-selection-overlay-mode");
201 connect(m_toggleSelectionOverlayMode, SIGNAL(triggered()), SLOT(slotToggleSelectionDecoration()));
202
203 m_strokeSelected = actionManager->createAction("stroke_selection");
204 connect(m_strokeSelected, SIGNAL(triggered()), SLOT(slotStrokeSelection()));
205
206 QClipboard *cb = QApplication::clipboard();
207 connect(cb, SIGNAL(dataChanged()), SLOT(clipboardDataChanged()));
208
209 connect(KisConfigNotifier::instance(), SIGNAL(configChanged()), SLOT(configChanged()));
210}
211
212
214{
215 if (m_imageView && m_imageView->canvasBase()) {
216 disconnect(m_imageView->canvasBase()->toolProxy(), SIGNAL(toolChanged(QString)), this, SLOT(clipboardDataChanged()));
217
218 KoSelection *selection = m_imageView->canvasBase()->globalShapeManager()->selection();
219 selection->disconnect(this, SLOT(shapeSelectionChanged()));
220 KisSelectionDecoration *decoration = qobject_cast<KisSelectionDecoration*>(m_imageView->canvasBase()->decoration("selection").data());
221 if (decoration) {
222 disconnect(SIGNAL(currentSelectionChanged()), decoration);
223 }
224 m_imageView->image()->undoAdapter()->disconnect(this);
226 }
227
228 m_imageView = imageView;
229 if (m_imageView) {
230 connect(m_imageView->canvasBase()->selectedShapesProxy(), SIGNAL(selectionChanged()), this, SLOT(shapeSelectionChanged()), Qt::UniqueConnection);
231
232 KisSelectionDecoration* decoration = qobject_cast<KisSelectionDecoration*>(m_imageView->canvasBase()->decoration("selection").data());
233 if (!decoration) {
234 decoration = new KisSelectionDecoration(m_imageView);
235 decoration->setVisible(true);
236 m_imageView->canvasBase()->addDecoration(decoration);
237 }
238 m_selectionDecoration = decoration;
239 connect(this, SIGNAL(currentSelectionChanged()), decoration, SLOT(selectionChanged()));
240 connect(m_imageView->image()->undoAdapter(), SIGNAL(selectionChanged()), SLOT(selectionChanged()));
241 connect(m_imageView->canvasBase()->toolProxy(), SIGNAL(toolChanged(QString)), SLOT(clipboardDataChanged()));
242
243 }
244}
245
246
251
253{
254 KisSelectionSP activeSelection = m_view->selection();
255 return activeSelection && !activeSelection->selectedRect().isEmpty();
256}
257
262
264{
265 if (m_view && m_view->canvasBase()) {
266 return m_view->canvasBase()->selectedShapesProxy()->selection()->count() > 0;
267 }
268 return false;
269}
270
276
278{
279 KisSelectionSP selection = m_view->selection();
280 return selection && selection->hasNonEmptyPixelSelection();
281}
282
284{
285 KisSelectionSP selection = m_view->selection();
286 return selection && selection->hasNonEmptyShapeSelection();
287}
288
290{
291 KisSelectionSP selection = m_view->selection();
292 return selection && selection->hasNonEmptyPixelSelection() && !selection->hasNonEmptyShapeSelection();
293}
294
296{
297 if (!m_view) return false;
298
299 KisLayerSP layer = m_view->activeLayer();
300
301 if (layer) {
306 if (layer->selectionMask()) return false;
307
308 KoProperties properties;
309 properties.setProperty("active", false);
310 properties.setProperty("visible", true);
311 QList<KisNodeSP> masks = layer->childNodes(QStringList("KisSelectionMask"), properties);
312
313 if (!masks.isEmpty()) {
314 return true;
315 }
316 }
317
318 KisImageSP image = m_view->image();
319 return image && image->canReselectGlobalSelection();
320}
321
323{
324 Q_ASSERT(m_view);
325 Q_ASSERT(m_clipboard);
326 if (!m_view || !m_clipboard) return;
327
329 bool haveDevice = m_view->activeDevice();
330
331 KisLayerSP activeLayer = m_view->activeLayer();
332 KisImageWSP image = activeLayer ? activeLayer->image() : 0;
333
334 // FIXME: how about pasting shapes?
335 // TODO: check if these manual update actually work and not
336 // overridden by KisActionManager
338 m_pasteAsReference->setEnabled(haveDevice);
339
341 Q_EMIT signalUpdateGUI();
342}
343
350
356
362
368
374
380
382{
384 factory.run(m_view);
385}
386
392
398
400{
402 factory.run(m_view);
403}
404
410
412{
414 factory.run(m_view);
415}
416
422
424{
426 factory.run(m_view);
427}
428
430{
432 factory.run(m_view);
433}
434
436{
437 if(m_invert)
438 m_invert->trigger();
439}
440
442{
444 factory.run(m_view);
445}
446
447
448#include <KoToolManager.h>
449#include <KoInteractionTool.h>
450
452{
453 KisSelectionSP selection = m_view->selection();
454 if (!selection) return;
455
456 KisAction *action = m_view->actionManager()->actionByName("show-global-selection-mask");
458
459 if (!action->isChecked()) {
460 action->setChecked(true);
461 Q_EMIT action->toggled(true);
462 Q_EMIT action->triggered(true);
463 }
464
465 KisNodeSP node = selection->parentNode();
467
469
470 if (selection->hasShapeSelection()) {
471 KisShapeSelection *shapeSelection = dynamic_cast<KisShapeSelection*>(selection->shapeSelection());
472 KIS_SAFE_ASSERT_RECOVER_RETURN(shapeSelection);
473
475
476 QList<KoShape*> shapes = shapeSelection->shapes();
477
478 if (shapes.isEmpty()) {
479 KIS_SAFE_ASSERT_RECOVER_NOOP(0 && "no shapes");
480 return;
481 }
482
483 Q_FOREACH (KoShape *shape, shapes) {
485 }
486 } else {
487 KoToolManager::instance()->switchToolRequested("KisToolTransform");
488 }
489}
490
496
502
508
514
522
524{
525 KisConfig cfg(true);
526
528}
529
531{
532 KisClearActionFactory factory;
533 factory.run(m_view);
534}
535
537{
538 KisFillActionFactory factory;
539 factory.run("fg", m_view);
540}
541
543{
544 KisFillActionFactory factory;
545 factory.run("bg", m_view);
546}
547
549{
550 KisFillActionFactory factory;
551 factory.run("pattern", m_view);
552}
553
555{
556 KisFillActionFactory factory;
557 factory.run("fg_opacity", m_view);
558}
559
561{
562 KisFillActionFactory factory;
563 factory.run("bg_opacity", m_view);
564}
565
567{
568 KisFillActionFactory factory;
569 factory.run("pattern_opacity", m_view);
570}
571
578
585
587{
589
590 m_selectionDecoration->toggleSlectionVisibility();
591 m_toggleDisplaySelection->blockSignals(true);
592 m_toggleDisplaySelection->setChecked(m_selectionDecoration->visible());
593 m_toggleDisplaySelection->blockSignals(false);
594
596}
597
599{
600 return m_toggleDisplaySelection->isChecked();
601}
602
604{
606
607 KoSelection * selection = shapeManager->selection();
608 QList<KoShape*> selectedShapes = selection->selectedShapes();
609
610 KoShapeStrokeSP border(new KoShapeStroke(0, Qt::lightGray));
611 Q_FOREACH (KoShape* shape, shapeManager->shapes()) {
612 if (dynamic_cast<KisShapeSelection*>(shape->parent())) {
613 if (selectedShapes.contains(shape))
614 shape->setStroke(border);
615 else
616 shape->setStroke(KoShapeStrokeSP());
617 }
618 }
619 m_view->updateGUI();
620}
621
627
629{
630 KisImageWSP image = m_view->image();
631 if (!image) return;
632
633 KisLayerSP layer = m_view->activeLayer();
634 if (!layer) return;
635
637
638 KisPaintLayerSP paintLayer = new KisPaintLayer(image, i18n("Stroked Shapes"), OPACITY_OPAQUE_U8);
639
640 KUndo2MagicString actionName = kundo2_i18n("Stroke Shapes");
641
642 m_adapter->beginMacro(actionName);
643 m_adapter->addNode(paintLayer.data(), layer->parent().data(), layer.data());
644
645 KisFigurePaintingToolHelper helper(actionName,
646 image,
647 paintLayer.data(),
651
652 Q_FOREACH (KoShape* shape, shapes) {
653 QTransform matrix = shape->absoluteTransformation() * QTransform::fromScale(image->xRes(), image->yRes());
654 QPainterPath mappedOutline = matrix.map(shape->outline());
655 helper.paintPainterPath(mappedOutline);
656 }
658}
659
671
673{
676 }
677 return false;
678}
680{
681 KisImageWSP image = m_view->image();
682
683 if (!image ) {
684 return;
685 }
686
688 bool isVectorLayer = false;
689 if (currentNode->inherits("KisShapeLayer")) {
690 isVectorLayer = true;
691 }
692
693 QPointer<KisDlgStrokeSelection> dlg = new KisDlgStrokeSelection(image, m_view, isVectorLayer);
694
695 if (dlg->exec() == QDialog::Accepted) {
696 StrokeSelectionOptions params = dlg->getParams();
697 if (params.brushSelected){
699 factory.run(m_view, params);
700 }
701 else {
703 factory.run(m_view, params);
704 }
705 }
706 delete dlg;
707
708
709}
710
711#include "KisImageBarrierLock.h"
713
715{
716 KisImageSP image = m_view->image();
717
719 return;
720 }
721
722 KUndo2MagicString actionName;
724 KisCanvas2 *canvas = m_view->canvasBase();
725
726
727 {
728 KisImageBarrierLock lock(image);
729
730 KisPaintDeviceSP device = node->projection();
731 if (!device) device = node->paintDevice();
732 if (!device) device = node->original();
733
734 if (!device) return;
735
736 QRect rc = device->exactBounds();
737 if (rc.isEmpty()) {
738
739 if (action == SELECTION_REPLACE || action == SELECTION_INTERSECT) {
742 }
743
744 return;
745 }
746
748
752 if (!canvas->imageView()->selection()) {
753 action = SELECTION_REPLACE;
754 }
755
756 switch (action) {
757 case SELECTION_ADD:
758 actionName = kundo2_i18n("Select Opaque (Add)");
759 break;
761 actionName = kundo2_i18n("Select Opaque (Subtract)");
762 break;
764 actionName = kundo2_i18n("Select Opaque (Intersect)");
765 break;
767 actionName = kundo2_i18n("Select Opaque (Symmetric Difference)");
768 break;
769 default:
770 actionName = kundo2_i18n("Select Opaque");
771 break;
772 }
773
774 qint32 x, y, w, h;
775 rc.getRect(&x, &y, &w, &h);
776
777 const KoColorSpace * cs = device->colorSpace();
778
779 KisHLineConstIteratorSP deviter = device->createHLineConstIteratorNG(x, y, w);
780 KisHLineIteratorSP selIter = tmpSel ->createHLineIteratorNG(x, y, w);
781
782 for (int row = y; row < h + y; ++row) {
783 do {
784 *selIter->rawData() = cs->opacityU8(deviter->oldRawData());
785 } while (deviter->nextPixel() && selIter->nextPixel());
786 deviter->nextRow();
787 selIter->nextRow();
788 }
789 }
790
791 KisSelectionToolHelper helper(canvas, actionName);
792 tmpSel->invalidateOutlineCache();
793 helper.selectPixelSelection(tmpSel, action);
794}
QList< QString > QStringList
SelectionAction
@ SELECTION_REPLACE
@ SELECTION_INTERSECT
@ SELECTION_SYMMETRICDIFFERENCE
@ SELECTION_SUBTRACT
@ SELECTION_ADD
const quint8 OPACITY_OPAQUE_U8
QSharedPointer< KoShapeStroke > KoShapeStrokeSP
#define KoInteractionTool_ID
A KisActionManager class keeps track of KisActions. These actions are always associated with the GUI....
KisAction * createAction(const QString &name)
KisAction * actionByName(const QString &name) const
KisAction * createStandardAction(KStandardAction::StandardAction, const QObject *receiver, const char *member)
void registerOperation(KisOperation *operation)
void setOperationID(const QString &id)
virtual const quint8 * oldRawData() const =0
virtual bool nextPixel()=0
KisSelectedShapesProxy selectedShapesProxy
KoShapeManager shapeManager
QPointer< KisView > imageView() const
KoShapeManager * globalShapeManager() const
KoCanvasResourceProvider * resourceManager()
static KisClipboard * instance()
bool hasClip() const
static KisConfigNotifier * instance()
bool selectionActionBar(bool defaultValue=false) const
void setSelectionActionBar(bool value)
void paintPainterPath(const QPainterPath &path)
virtual void nextRow()=0
bool canReselectGlobalSelection()
Definition kis_image.cc:706
double xRes() const
double yRes() const
void addNode(KisNodeSP node, KisNodeSP parent, KisNodeSP aboveThis, KisImageLayerAddCommand::Flags flags=KisImageLayerAddCommand::DoRedoUpdates|KisImageLayerAddCommand::DoUndoUpdates)
void beginMacro(const KUndo2MagicString &macroName)
void slotNonUiActivatedNode(KisNodeSP node)
QRect exactBounds() const
KisHLineIteratorSP createHLineIteratorNG(qint32 x, qint32 y, qint32 w)
const KoColorSpace * colorSpace() const
KisHLineConstIteratorSP createHLineConstIteratorNG(qint32 x, qint32 y, qint32 w) const
static void runSingleCommandStroke(KisImageSP image, KUndo2Command *cmd, KisStrokeJobData::Sequentiality sequentiality=KisStrokeJobData::SEQUENTIAL, KisStrokeJobData::Exclusivity exclusivity=KisStrokeJobData::NORMAL)
runSingleCommandStroke creates a stroke and runs cmd in it. The text() field of cmd is used as a titl...
KoSelection * selection() override
QPointer< KisSelectionDecoration > m_selectionDecoration
void setup(KisActionManager *actionManager)
KisAction * m_enableSelectionActionsPanel
KisAction * m_fillBackgroundColorOpacity
KisSelectionManager(KisViewManager *view)
bool haveAnySelectionWithPixels()
Checks if the current selection is editable and has some pixels selected in the pixel selection.
void selectOpaqueOnNode(KisNodeSP node, SelectionAction action)
void setView(QPointer< KisView >imageView)
void currentSelectionChanged()
KisNodeCommandsAdapter * m_adapter
KisAction * m_toggleSelectionOverlayMode
KisAction * m_fillForegroundColorOpacity
QPointer< KisView > m_imageView
void enableSelectionActionsPanel(bool enabled)
void displaySelectionChanged()
void selectPixelSelection(KisProcessingApplicator &applicator, KisPixelSelectionSP selection, SelectionAction action)
void setSelection(KisImageWSP image)
bool blockUntilOperationsFinished(KisImageSP image)
blockUntilOperationsFinished blocks the GUI of the application until execution of actions on image is...
KisActionManager * actionManager() const
KisCanvas2 * canvasBase() const
Return the canvas base class.
KisSelectionSP selection()
KisLayerSP activeLayer()
Convenience method to get at the active layer.
KisPaintDeviceSP activeDevice()
Convenience method to get at the active paint device.
KisNodeManager * nodeManager() const
The node manager handles everything about nodes.
KisImageWSP image() const
Return the image this view is displaying.
KisCanvasResourceProvider * canvasResourceProvider()
KisStatusBar * statusBar() const
Return the wrapper class around the statusbar.
virtual quint8 opacityU8(const quint8 *pixel) const =0
void setProperty(const QString &name, const QVariant &value)
void select(KoShape *shape)
int count() const
return the selection count, i.e. the number of all selected shapes
const QList< KoShape * > selectedShapes() const
QList< KoShape * > shapes() const
QList< KoShape * > shapes
KoSelection * selection
virtual QPainterPath outline() const
Definition KoShape.cpp:554
KoShapeContainer * parent() const
Definition KoShape.cpp:857
virtual void setStroke(KoShapeStrokeModelSP stroke)
Definition KoShape.cpp:899
QTransform absoluteTransformation() const
Definition KoShape.cpp:330
bool hasShapes()
void switchToolRequested(const QString &id)
static KoToolManager * instance()
Return the toolmanager singleton.
#define KIS_SAFE_ASSERT_RECOVER_RETURN(cond)
Definition kis_assert.h:128
#define KIS_ASSERT_RECOVER_RETURN(cond)
Definition kis_assert.h:75
#define KIS_SAFE_ASSERT_RECOVER_NOOP(cond)
Definition kis_assert.h:130
KisSharedPtr< KisPixelSelection > KisPixelSelectionSP
Definition kis_types.h:159
KUndo2MagicString kundo2_i18n(const char *text)
virtual KisPaintDeviceSP projection() const =0
virtual KisPaintDeviceSP original() const =0
KisImageWSP image
virtual KisPaintDeviceSP paintDevice() const =0
void run(KisViewManager *view) override
void run(KisViewManager *view) override
void run(Flags flags, KisViewManager *view)
void run(KisViewManager *view) override
void run(const QString &fillSource, KisViewManager *view)
virtual KisSelectionMaskSP selectionMask() const
Definition kis_layer.cc:504
QList< KisNodeSP > childNodes(const QStringList &nodeTypes, const KoProperties &properties) const
Definition kis_node.cpp:439
KisNodeWSP parent
Definition kis_node.cpp:86
void run(Flags flags, KisViewManager *view)
void run(KisViewManager *view) override
void run(KisViewManager *view) override
void run(KisViewManager *view) override
void run(KisViewManager *view) override
void run(KisViewManager *view) override
void run(KisViewManager *view) override
void run(KisViewManager *view) override
bool hasNonEmptyPixelSelection() const
bool hasNonEmptyShapeSelection() const
KisSelectionComponent * shapeSelection
QRect selectedRect() const
bool hasShapeSelection() const
KisNodeWSP parentNode
void run(KisViewManager *view, const StrokeSelectionOptions &params)
void run(KisViewManager *view, const StrokeSelectionOptions &params)