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
90
94
96{
97 m_cut = actionManager->createStandardAction(KStandardAction::Cut, this, SLOT(cut()));
98 m_copy = actionManager->createStandardAction(KStandardAction::Copy, this, SLOT(copy()));
99 m_paste = actionManager->createStandardAction(KStandardAction::Paste, this, SLOT(paste()));
100
101 KisAction *action = actionManager->createAction("copy_sharp");
102 connect(action, SIGNAL(triggered()), this, SLOT(copySharp()));
103
104 action = actionManager->createAction("cut_sharp");
105 connect(action, SIGNAL(triggered()), this, SLOT(cutSharp()));
106
107 m_pasteNew = actionManager->createAction("paste_new");
108 connect(m_pasteNew, SIGNAL(triggered()), this, SLOT(pasteNew()));
109
110 m_pasteAt = actionManager->createAction("paste_at");
111 connect(m_pasteAt, SIGNAL(triggered()), this, SLOT(pasteAt()));
112
113 m_pasteInto = actionManager->createAction("paste_into");
114 connect(m_pasteInto, SIGNAL(triggered()), this, SLOT(pasteInto()));
115
116 m_pasteAsReference = actionManager->createAction("paste_as_reference");
117 connect(m_pasteAsReference, SIGNAL(triggered()), this, SLOT(pasteAsReference()));
118
119 m_pasteShapeStyle = actionManager->createAction("paste_shape_style");
120 connect(m_pasteShapeStyle, SIGNAL(triggered()), this, SLOT(pasteShapeStyle()));
121
122 m_copyMerged = actionManager->createAction("copy_merged");
123 connect(m_copyMerged, SIGNAL(triggered()), this, SLOT(copyMerged()));
124
125 m_selectAll = actionManager->createAction("select_all");
126 connect(m_selectAll, SIGNAL(triggered()), this, SLOT(selectAll()));
127
128 m_deselect = actionManager->createAction("deselect");
129 connect(m_deselect, SIGNAL(triggered()), this, SLOT(deselect()));
130
131 m_clear = actionManager->createAction("clear");
132 connect(m_clear, SIGNAL(triggered()), SLOT(clear()));
133
134 m_reselect = actionManager->createAction("reselect");
135 connect(m_reselect, SIGNAL(triggered()), this, SLOT(reselect()));
136
137 m_invert = actionManager->createAction("invert_selection");
138 m_invert->setOperationID("invertselection");
139
141
142 m_copyToNewLayer = actionManager->createAction("copy_selection_to_new_layer");
143 connect(m_copyToNewLayer, SIGNAL(triggered()), this, SLOT(copySelectionToNewLayer()));
144
145 m_cutToNewLayer = actionManager->createAction("cut_selection_to_new_layer");
146 connect(m_cutToNewLayer, SIGNAL(triggered()), this, SLOT(cutToNewLayer()));
147
148 m_fillForegroundColor = actionManager->createAction("fill_selection_foreground_color");
149 connect(m_fillForegroundColor, SIGNAL(triggered()), this, SLOT(fillForegroundColor()));
150
151 m_fillBackgroundColor = actionManager->createAction("fill_selection_background_color");
152 connect(m_fillBackgroundColor, SIGNAL(triggered()), this, SLOT(fillBackgroundColor()));
153
154 m_fillPattern = actionManager->createAction("fill_selection_pattern");
155 connect(m_fillPattern, SIGNAL(triggered()), this, SLOT(fillPattern()));
156
157 m_fillForegroundColorOpacity = actionManager->createAction("fill_selection_foreground_color_opacity");
158 connect(m_fillForegroundColorOpacity, SIGNAL(triggered()), this, SLOT(fillForegroundColorOpacity()));
159
160 m_fillBackgroundColorOpacity = actionManager->createAction("fill_selection_background_color_opacity");
161 connect(m_fillBackgroundColorOpacity, SIGNAL(triggered()), this, SLOT(fillBackgroundColorOpacity()));
162
163 m_fillPatternOpacity = actionManager->createAction("fill_selection_pattern_opacity");
164 connect(m_fillPatternOpacity, SIGNAL(triggered()), this, SLOT(fillPatternOpacity()));
165
166 m_strokeShapes = actionManager->createAction("stroke_shapes");
167 connect(m_strokeShapes, SIGNAL(triggered()), this, SLOT(paintSelectedShapes()));
168
169 m_toggleDisplaySelection = actionManager->createAction("toggle_display_selection");
170 connect(m_toggleDisplaySelection, SIGNAL(triggered()), this, SLOT(toggleDisplaySelection()));
171 m_toggleDisplaySelection->setChecked(true);
172
173 m_imageResizeToSelection = actionManager->createAction("resizeimagetoselection");
174 connect(m_imageResizeToSelection, SIGNAL(triggered()), this, SLOT(imageResizeToSelection()));
175
176 action = actionManager->createAction("edit_selection");
177 connect(action, SIGNAL(triggered()), SLOT(editSelection()));
178
179 action = actionManager->createAction("convert_to_vector_selection");
180 connect(action, SIGNAL(triggered()), SLOT(convertToVectorSelection()));
181
182 action = actionManager->createAction("convert_to_raster_selection");
183 connect(action, SIGNAL(triggered()), SLOT(convertToRasterSelection()));
184
185 action = actionManager->createAction("convert_shapes_to_vector_selection");
186 connect(action, SIGNAL(triggered()), SLOT(convertShapesToVectorSelection()));
187
188 action = actionManager->createAction("convert_selection_to_shape");
189 connect(action, SIGNAL(triggered()), SLOT(convertToShape()));
190
191 m_toggleSelectionOverlayMode = actionManager->createAction("toggle-selection-overlay-mode");
193
194 m_strokeSelected = actionManager->createAction("stroke_selection");
195 connect(m_strokeSelected, SIGNAL(triggered()), SLOT(slotStrokeSelection()));
196
197 QClipboard *cb = QApplication::clipboard();
198 connect(cb, SIGNAL(dataChanged()), SLOT(clipboardDataChanged()));
199}
200
201
203{
204 if (m_imageView && m_imageView->canvasBase()) {
205 disconnect(m_imageView->canvasBase()->toolProxy(), SIGNAL(toolChanged(QString)), this, SLOT(clipboardDataChanged()));
206
207 KoSelection *selection = m_imageView->canvasBase()->globalShapeManager()->selection();
208 selection->disconnect(this, SLOT(shapeSelectionChanged()));
209 KisSelectionDecoration *decoration = qobject_cast<KisSelectionDecoration*>(m_imageView->canvasBase()->decoration("selection").data());
210 if (decoration) {
211 disconnect(SIGNAL(currentSelectionChanged()), decoration);
212 }
213 m_imageView->image()->undoAdapter()->disconnect(this);
215 }
216
217 m_imageView = imageView;
218 if (m_imageView) {
219 connect(m_imageView->canvasBase()->selectedShapesProxy(), SIGNAL(selectionChanged()), this, SLOT(shapeSelectionChanged()), Qt::UniqueConnection);
220
221 KisSelectionDecoration* decoration = qobject_cast<KisSelectionDecoration*>(m_imageView->canvasBase()->decoration("selection").data());
222 if (!decoration) {
223 decoration = new KisSelectionDecoration(m_imageView);
224 decoration->setVisible(true);
225 m_imageView->canvasBase()->addDecoration(decoration);
226 }
227 m_selectionDecoration = decoration;
228 connect(this, SIGNAL(currentSelectionChanged()), decoration, SLOT(selectionChanged()));
229 connect(m_imageView->image()->undoAdapter(), SIGNAL(selectionChanged()), SLOT(selectionChanged()));
230 connect(m_imageView->canvasBase()->toolProxy(), SIGNAL(toolChanged(QString)), SLOT(clipboardDataChanged()));
231
232 }
233}
234
235
240
242{
243 KisSelectionSP activeSelection = m_view->selection();
244 return activeSelection && !activeSelection->selectedRect().isEmpty();
245}
246
251
253{
254 if (m_view && m_view->canvasBase()) {
255 return m_view->canvasBase()->selectedShapesProxy()->selection()->count() > 0;
256 }
257 return false;
258}
259
265
267{
268 KisSelectionSP selection = m_view->selection();
269 return selection && selection->hasNonEmptyPixelSelection();
270}
271
273{
274 KisSelectionSP selection = m_view->selection();
275 return selection && selection->hasNonEmptyShapeSelection();
276}
277
279{
280 KisSelectionSP selection = m_view->selection();
281 return selection && selection->hasNonEmptyPixelSelection() && !selection->hasNonEmptyShapeSelection();
282}
283
285{
286 if (!m_view) return false;
287
288 KisLayerSP layer = m_view->activeLayer();
289
290 if (layer) {
295 if (layer->selectionMask()) return false;
296
297 KoProperties properties;
298 properties.setProperty("active", false);
299 properties.setProperty("visible", true);
300 QList<KisNodeSP> masks = layer->childNodes(QStringList("KisSelectionMask"), properties);
301
302 if (!masks.isEmpty()) {
303 return true;
304 }
305 }
306
307 KisImageSP image = m_view->image();
308 return image && image->canReselectGlobalSelection();
309}
310
312{
313 Q_ASSERT(m_view);
314 Q_ASSERT(m_clipboard);
315 if (!m_view || !m_clipboard) return;
316
318 bool haveDevice = m_view->activeDevice();
319
320 KisLayerSP activeLayer = m_view->activeLayer();
321 KisImageWSP image = activeLayer ? activeLayer->image() : 0;
322
323 // FIXME: how about pasting shapes?
324 // TODO: check if these manual update actually work and not
325 // overridden by KisActionManager
327 m_pasteAsReference->setEnabled(haveDevice);
328
330 Q_EMIT signalUpdateGUI();
331}
332
339
345
351
357
363
369
371{
373 factory.run(m_view);
374}
375
381
387
389{
391 factory.run(m_view);
392}
393
399
401{
403 factory.run(m_view);
404}
405
411
413{
415 factory.run(m_view);
416}
417
419{
421 factory.run(m_view);
422}
423
425{
426 if(m_invert)
427 m_invert->trigger();
428}
429
431{
433 factory.run(m_view);
434}
435
436
437#include <KoToolManager.h>
438#include <KoInteractionTool.h>
439
441{
442 KisSelectionSP selection = m_view->selection();
443 if (!selection) return;
444
445 KisAction *action = m_view->actionManager()->actionByName("show-global-selection-mask");
447
448 if (!action->isChecked()) {
449 action->setChecked(true);
450 Q_EMIT action->toggled(true);
451 Q_EMIT action->triggered(true);
452 }
453
454 KisNodeSP node = selection->parentNode();
456
458
459 if (selection->hasShapeSelection()) {
460 KisShapeSelection *shapeSelection = dynamic_cast<KisShapeSelection*>(selection->shapeSelection());
461 KIS_SAFE_ASSERT_RECOVER_RETURN(shapeSelection);
462
464
465 QList<KoShape*> shapes = shapeSelection->shapes();
466
467 if (shapes.isEmpty()) {
468 KIS_SAFE_ASSERT_RECOVER_NOOP(0 && "no shapes");
469 return;
470 }
471
472 Q_FOREACH (KoShape *shape, shapes) {
474 }
475 } else {
476 KoToolManager::instance()->switchToolRequested("KisToolTransform");
477 }
478}
479
485
491
497
503
505{
506 KisClearActionFactory factory;
507 factory.run(m_view);
508}
509
511{
512 KisFillActionFactory factory;
513 factory.run("fg", m_view);
514}
515
517{
518 KisFillActionFactory factory;
519 factory.run("bg", m_view);
520}
521
523{
524 KisFillActionFactory factory;
525 factory.run("pattern", m_view);
526}
527
529{
530 KisFillActionFactory factory;
531 factory.run("fg_opacity", m_view);
532}
533
535{
536 KisFillActionFactory factory;
537 factory.run("bg_opacity", m_view);
538}
539
541{
542 KisFillActionFactory factory;
543 factory.run("pattern_opacity", m_view);
544}
545
552
559
561{
563
564 m_selectionDecoration->toggleVisibility();
565 m_toggleDisplaySelection->blockSignals(true);
566 m_toggleDisplaySelection->setChecked(m_selectionDecoration->visible());
567 m_toggleDisplaySelection->blockSignals(false);
568
570}
571
573{
574 return m_toggleDisplaySelection->isChecked();
575}
576
578{
580
581 KoSelection * selection = shapeManager->selection();
582 QList<KoShape*> selectedShapes = selection->selectedShapes();
583
584 KoShapeStrokeSP border(new KoShapeStroke(0, Qt::lightGray));
585 Q_FOREACH (KoShape* shape, shapeManager->shapes()) {
586 if (dynamic_cast<KisShapeSelection*>(shape->parent())) {
587 if (selectedShapes.contains(shape))
588 shape->setStroke(border);
589 else
590 shape->setStroke(KoShapeStrokeSP());
591 }
592 }
593 m_view->updateGUI();
594}
595
601
603{
604 KisImageWSP image = m_view->image();
605 if (!image) return;
606
607 KisLayerSP layer = m_view->activeLayer();
608 if (!layer) return;
609
611
612 KisPaintLayerSP paintLayer = new KisPaintLayer(image, i18n("Stroked Shapes"), OPACITY_OPAQUE_U8);
613
614 KUndo2MagicString actionName = kundo2_i18n("Stroke Shapes");
615
616 m_adapter->beginMacro(actionName);
617 m_adapter->addNode(paintLayer.data(), layer->parent().data(), layer.data());
618
619 KisFigurePaintingToolHelper helper(actionName,
620 image,
621 paintLayer.data(),
625
626 Q_FOREACH (KoShape* shape, shapes) {
627 QTransform matrix = shape->absoluteTransformation() * QTransform::fromScale(image->xRes(), image->yRes());
628 QPainterPath mappedOutline = matrix.map(shape->outline());
629 helper.paintPainterPath(mappedOutline);
630 }
632}
633
645
647{
650 }
651 return false;
652}
654{
655 KisImageWSP image = m_view->image();
656
657 if (!image ) {
658 return;
659 }
660
662 bool isVectorLayer = false;
663 if (currentNode->inherits("KisShapeLayer")) {
664 isVectorLayer = true;
665 }
666
667 QPointer<KisDlgStrokeSelection> dlg = new KisDlgStrokeSelection(image, m_view, isVectorLayer);
668
669 if (dlg->exec() == QDialog::Accepted) {
670 StrokeSelectionOptions params = dlg->getParams();
671 if (params.brushSelected){
673 factory.run(m_view, params);
674 }
675 else {
677 factory.run(m_view, params);
678 }
679 }
680 delete dlg;
681
682
683}
684
685#include "KisImageBarrierLock.h"
687
689{
690 KisImageSP image = m_view->image();
691
693 return;
694 }
695
696 KUndo2MagicString actionName;
698 KisCanvas2 *canvas = m_view->canvasBase();
699
700
701 {
702 KisImageBarrierLock lock(image);
703
704 KisPaintDeviceSP device = node->projection();
705 if (!device) device = node->paintDevice();
706 if (!device) device = node->original();
707
708 if (!device) return;
709
710 QRect rc = device->exactBounds();
711 if (rc.isEmpty()) {
712
713 if (action == SELECTION_REPLACE || action == SELECTION_INTERSECT) {
716 }
717
718 return;
719 }
720
722
726 if (!canvas->imageView()->selection()) {
727 action = SELECTION_REPLACE;
728 }
729
730 switch (action) {
731 case SELECTION_ADD:
732 actionName = kundo2_i18n("Select Opaque (Add)");
733 break;
735 actionName = kundo2_i18n("Select Opaque (Subtract)");
736 break;
738 actionName = kundo2_i18n("Select Opaque (Intersect)");
739 break;
741 actionName = kundo2_i18n("Select Opaque (Symmetric Difference)");
742 break;
743 default:
744 actionName = kundo2_i18n("Select Opaque");
745 break;
746 }
747
748 qint32 x, y, w, h;
749 rc.getRect(&x, &y, &w, &h);
750
751 const KoColorSpace * cs = device->colorSpace();
752
753 KisHLineConstIteratorSP deviter = device->createHLineConstIteratorNG(x, y, w);
754 KisHLineIteratorSP selIter = tmpSel ->createHLineIteratorNG(x, y, w);
755
756 for (int row = y; row < h + y; ++row) {
757 do {
758 *selIter->rawData() = cs->opacityU8(deviter->oldRawData());
759 } while (deviter->nextPixel() && selIter->nextPixel());
760 deviter->nextRow();
761 selIter->nextRow();
762 }
763 }
764
765 KisSelectionToolHelper helper(canvas, actionName);
766 tmpSel->invalidateOutlineCache();
767 helper.selectPixelSelection(tmpSel, action);
768}
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
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
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
void paintPainterPath(const QPainterPath &path)
virtual void nextRow()=0
bool canReselectGlobalSelection()
Definition kis_image.cc:705
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_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 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:630
KoShapeContainer * parent() const
Definition KoShape.cpp:1039
virtual void setStroke(KoShapeStrokeModelSP stroke)
Definition KoShape.cpp:1081
QTransform absoluteTransformation() const
Definition KoShape.cpp:382
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:498
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)