|
Krita Source Code Documentation
|
#include <kis_selection_manager.h>
Inheritance diagram for KisSelectionManager:Public Slots | |
| void | clear () |
| void | clipboardDataChanged () |
| void | convertShapesToVectorSelection () |
| void | convertToRasterSelection () |
| void | convertToShape () |
| void | convertToVectorSelection () |
| void | copy () |
| void | copyMerged () |
| void | copySelectionToNewLayer () |
| void | copySharp () |
| void | cut () |
| void | cutSharp () |
| void | cutToNewLayer () |
| void | deselect () |
| void | editSelection () |
| void | fillBackgroundColor () |
| void | fillBackgroundColorOpacity () |
| void | fillForegroundColor () |
| void | fillForegroundColorOpacity () |
| void | fillPattern () |
| void | fillPatternOpacity () |
| void | imageResizeToSelection () |
| void | invert () |
| void | paintSelectedShapes () |
| void | paste () |
| void | pasteAsReference () |
| void | pasteAt () |
| void | pasteInto () |
| void | pasteNew () |
| void | pasteShapeStyle () |
| void | reselect () |
| void | selectAll () |
| void | selectionChanged () |
| void | selectOpaqueOnNode (KisNodeSP node, SelectionAction action) |
| void | shapeSelectionChanged () |
| void | slotStrokeSelection () |
| void | slotToggleSelectionDecoration () |
| void | toggleDisplaySelection () |
| void | updateGUI () |
Signals | |
| void | currentSelectionChanged () |
| void | displaySelectionChanged () |
| void | signalUpdateGUI () |
| void | strokeSelected () |
Public Member Functions | |
| bool | canReselectDeactivatedSelection () |
| bool | displaySelection () |
| bool | haveAnySelectionWithPixels () |
| Checks if the current selection is editable and has some pixels selected in the pixel selection. | |
| bool | havePixelsInClipboard () |
| bool | havePixelsSelected () |
| bool | haveRasterSelectionWithPixels () |
| bool | haveShapeSelectionWithShapes () |
| bool | haveShapesInClipboard () |
| bool | haveShapesSelected () |
| KisSelectionManager (KisViewManager *view) | |
| void | setup (KisActionManager *actionManager) |
| void | setView (QPointer< KisView >imageView) |
| bool | showSelectionAsMask () const |
| ~KisSelectionManager () override | |
Properties | |
| bool | displaySelection |
| bool | havePixelsSelected |
Private Member Functions | |
| void | fill (const KoColor &color, bool fillWithPattern, const QString &transactionText) |
| void | updateStatusBar () |
The selection manager is responsible selections and the clipboard.
Definition at line 36 of file kis_selection_manager.h.
| KisSelectionManager::KisSelectionManager | ( | KisViewManager * | view | ) |
Definition at line 84 of file kis_selection_manager.cc.
References KisClipboard::instance(), and m_clipboard.
|
override |
Definition at line 91 of file kis_selection_manager.cc.
| bool KisSelectionManager::canReselectDeactivatedSelection | ( | ) |
If we have an active selection mask, then no reselection is possible
Definition at line 284 of file kis_selection_manager.cc.
References KisViewManager::activeLayer(), KisImage::canReselectGlobalSelection(), KisNode::childNodes(), KisViewManager::image(), m_view, KisLayer::selectionMask(), and KoProperties::setProperty().
|
slot |
Definition at line 504 of file kis_selection_manager.cc.
References m_view, and KisClearActionFactory::run().
|
slot |
Definition at line 236 of file kis_selection_manager.cc.
References m_view, and KisViewManager::updateGUI().
|
slot |
Definition at line 492 of file kis_selection_manager.cc.
References m_view, and KisShapesToVectorSelectionActionFactory::run().
|
slot |
Definition at line 486 of file kis_selection_manager.cc.
References m_view, and KisSelectionToRasterActionFactory::run().
|
slot |
Definition at line 498 of file kis_selection_manager.cc.
References m_view, and KisSelectionToShapeActionFactory::run().
|
slot |
Definition at line 480 of file kis_selection_manager.cc.
References m_view, and KisSelectionToVectorActionFactory::run().
|
slot |
Definition at line 352 of file kis_selection_manager.cc.
References m_view, KisCutCopyActionFactory::None, and KisCutCopyActionFactory::run().
|
slot |
Definition at line 370 of file kis_selection_manager.cc.
References m_view, and KisCopyMergedActionFactory::run().
|
slot |
Definition at line 546 of file kis_selection_manager.cc.
References copy(), KisPasteActionFactory::ForceNewLayer, m_view, and KisPasteActionFactory::run().
|
slot |
Definition at line 364 of file kis_selection_manager.cc.
References m_view, KisCutCopyActionFactory::run(), and KisCutCopyActionFactory::SharpClip.
|
signal |
|
slot |
Definition at line 346 of file kis_selection_manager.cc.
References KisCutCopyActionFactory::CutClip, m_view, and KisCutCopyActionFactory::run().
|
slot |
Definition at line 358 of file kis_selection_manager.cc.
References KisCutCopyActionFactory::CutClip, m_view, KisCutCopyActionFactory::run(), and KisCutCopyActionFactory::SharpClip.
|
slot |
Definition at line 553 of file kis_selection_manager.cc.
References cut(), KisPasteActionFactory::ForceNewLayer, m_view, and KisPasteActionFactory::run().
|
slot |
Definition at line 418 of file kis_selection_manager.cc.
References m_view, and KisDeselectActionFactory::run().
| bool KisSelectionManager::displaySelection | ( | ) |
This function return if the selection should be displayed
|
signal |
|
slot |
Definition at line 440 of file kis_selection_manager.cc.
References KisActionManager::actionByName(), KisViewManager::actionManager(), KisViewManager::canvasBase(), KisSelection::hasShapeSelection(), KoToolManager::instance(), KIS_SAFE_ASSERT_RECOVER_NOOP, KIS_SAFE_ASSERT_RECOVER_RETURN, KoInteractionTool_ID, m_view, KisViewManager::nodeManager(), KisSelection::parentNode, KoSelection::select(), KisCanvas2::selectedShapesProxy, KisViewManager::selection(), KisSelectedShapesProxy::selection(), KoShapeContainer::shapes(), KisSelection::shapeSelection, KisNodeManager::slotNonUiActivatedNode(), and KoToolManager::switchToolRequested().
|
private |
|
slot |
Definition at line 516 of file kis_selection_manager.cc.
References m_view, and KisFillActionFactory::run().
|
slot |
Definition at line 534 of file kis_selection_manager.cc.
References m_view, and KisFillActionFactory::run().
|
slot |
Definition at line 510 of file kis_selection_manager.cc.
References m_view, and KisFillActionFactory::run().
|
slot |
Definition at line 528 of file kis_selection_manager.cc.
References m_view, and KisFillActionFactory::run().
|
slot |
Definition at line 522 of file kis_selection_manager.cc.
References m_view, and KisFillActionFactory::run().
|
slot |
Definition at line 540 of file kis_selection_manager.cc.
References m_view, and KisFillActionFactory::run().
| bool KisSelectionManager::haveAnySelectionWithPixels | ( | ) |
Checks if the current selection is editable and has some pixels selected in the pixel selection.
Definition at line 266 of file kis_selection_manager.cc.
References KisSelection::hasNonEmptyPixelSelection(), m_view, and KisViewManager::selection().
| bool KisSelectionManager::havePixelsInClipboard | ( | ) |
Definition at line 247 of file kis_selection_manager.cc.
References KisClipboard::hasClip(), and m_clipboard.
| bool KisSelectionManager::havePixelsSelected | ( | ) |
| bool KisSelectionManager::haveRasterSelectionWithPixels | ( | ) |
Definition at line 278 of file kis_selection_manager.cc.
References KisSelection::hasNonEmptyPixelSelection(), KisSelection::hasNonEmptyShapeSelection(), m_view, and KisViewManager::selection().
| bool KisSelectionManager::haveShapeSelectionWithShapes | ( | ) |
Definition at line 272 of file kis_selection_manager.cc.
References KisSelection::hasNonEmptyShapeSelection(), m_view, and KisViewManager::selection().
| bool KisSelectionManager::haveShapesInClipboard | ( | ) |
Definition at line 260 of file kis_selection_manager.cc.
References KoSvgPaste::hasShapes(), and paste().
| bool KisSelectionManager::haveShapesSelected | ( | ) |
Definition at line 252 of file kis_selection_manager.cc.
References KisViewManager::canvasBase(), KoSelection::count(), m_view, KisCanvas2::selectedShapesProxy, and KisSelectedShapesProxy::selection().
|
slot |
Definition at line 596 of file kis_selection_manager.cc.
References m_view, and KisImageResizeToSelectionActionFactory::run().
|
slot |
Definition at line 424 of file kis_selection_manager.cc.
References m_invert.
|
slot |
Definition at line 602 of file kis_selection_manager.cc.
References KoShape::absoluteTransformation(), KisViewManager::activeLayer(), KisNodeCommandsAdapter::addNode(), KisNodeCommandsAdapter::beginMacro(), KisViewManager::canvasBase(), KisViewManager::canvasResourceProvider(), KisSharedPtr< T >::data(), KisWeakSharedPtr< T >::data(), KisNodeCommandsAdapter::endMacro(), KisToolShapeUtils::FillStyleNone, KisViewManager::image(), kundo2_i18n(), m_adapter, m_view, OPACITY_OPAQUE_U8, KoShape::outline(), KisFigurePaintingToolHelper::paintPainterPath(), KisNode::parent, KisCanvasResourceProvider::resourceManager(), KoSelection::selectedShapes(), KoShapeManager::selection, KisCanvas2::shapeManager, KisToolShapeUtils::StrokeStyleForeground, KisImage::xRes(), and KisImage::yRes().
|
slot |
Definition at line 376 of file kis_selection_manager.cc.
References m_view, KisPasteActionFactory::None, and KisPasteActionFactory::run().
|
slot |
Definition at line 394 of file kis_selection_manager.cc.
References m_view, and KisPasteReferenceActionFactory::run().
|
slot |
Definition at line 382 of file kis_selection_manager.cc.
References m_view, KisPasteActionFactory::PasteAtCursor, and KisPasteActionFactory::run().
|
slot |
Definition at line 388 of file kis_selection_manager.cc.
References m_view, and KisPasteIntoActionFactory::run().
|
slot |
Definition at line 400 of file kis_selection_manager.cc.
References m_view, and KisPasteNewActionFactory::run().
|
slot |
Definition at line 406 of file kis_selection_manager.cc.
References m_view, and KisPasteShapeStyleActionFactory::run().
|
slot |
Definition at line 430 of file kis_selection_manager.cc.
References m_view, and KisReselectActionFactory::run().
|
slot |
Definition at line 412 of file kis_selection_manager.cc.
References m_view, and KisSelectAllActionFactory::run().
|
slot |
Definition at line 340 of file kis_selection_manager.cc.
References currentSelectionChanged(), m_view, and KisViewManager::updateGUI().
|
slot |
If there is nothing selected, just create a new selection
Definition at line 688 of file kis_selection_manager.cc.
References KisViewManager::blockUntilOperationsFinished(), KisViewManager::canvasBase(), KisPaintDevice::colorSpace(), KisPaintDevice::createHLineConstIteratorNG(), KisPaintDevice::createHLineIteratorNG(), KisPaintDevice::exactBounds(), KisViewManager::image(), KisCanvas2::imageView(), KisPixelSelection::invalidateOutlineCache(), KIS_ASSERT_RECOVER_RETURN, kundo2_i18n(), m_view, KisBaseConstIteratorNG::nextPixel(), KisHLineConstIteratorNG::nextRow(), KisBaseConstAccessor::oldRawData(), KoColorSpace::opacityU8(), KisBaseNode::original(), KisBaseNode::paintDevice(), KisBaseNode::projection(), KisProcessingApplicator::runSingleCommandStroke(), KisViewManager::selection(), SELECTION_ADD, SELECTION_INTERSECT, SELECTION_REPLACE, SELECTION_SUBTRACT, SELECTION_SYMMETRICDIFFERENCE, and KisSelectionToolHelper::selectPixelSelection().
| void KisSelectionManager::setup | ( | KisActionManager * | actionManager | ) |
Definition at line 95 of file kis_selection_manager.cc.
References clear(), clipboardDataChanged(), connect(), convertShapesToVectorSelection(), convertToRasterSelection(), convertToShape(), convertToVectorSelection(), copy(), KStandardAction::Copy, copyMerged(), copySelectionToNewLayer(), copySharp(), KisActionManager::createAction(), KisActionManager::createStandardAction(), cut(), KStandardAction::Cut, cutSharp(), cutToNewLayer(), deselect(), editSelection(), fillBackgroundColor(), fillBackgroundColorOpacity(), fillForegroundColor(), fillForegroundColorOpacity(), fillPattern(), fillPatternOpacity(), imageResizeToSelection(), m_clear, m_copy, m_copyMerged, m_copyToNewLayer, m_cut, m_cutToNewLayer, m_deselect, m_fillBackgroundColor, m_fillBackgroundColorOpacity, m_fillForegroundColor, m_fillForegroundColorOpacity, m_fillPattern, m_fillPatternOpacity, m_imageResizeToSelection, m_invert, m_paste, m_pasteAsReference, m_pasteAt, m_pasteInto, m_pasteNew, m_pasteShapeStyle, m_reselect, m_selectAll, m_strokeSelected, m_strokeShapes, m_toggleDisplaySelection, m_toggleSelectionOverlayMode, paintSelectedShapes(), paste(), KStandardAction::Paste, pasteAsReference(), pasteAt(), pasteInto(), pasteNew(), pasteShapeStyle(), KisActionManager::registerOperation(), reselect(), selectAll(), KisAction::setOperationID(), slotStrokeSelection(), slotToggleSelectionDecoration(), and toggleDisplaySelection().
Definition at line 202 of file kis_selection_manager.cc.
References clipboardDataChanged(), connect(), currentSelectionChanged(), m_imageView, m_selectionDecoration, selectionChanged(), KisSelectionDecoration::setVisible(), and shapeSelectionChanged().
|
slot |
Definition at line 577 of file kis_selection_manager.cc.
References KisViewManager::canvasBase(), KisCanvas2::globalShapeManager(), m_view, KoShape::parent(), KoSelection::selectedShapes(), KoShapeManager::selection, KoShape::setStroke(), KoShapeManager::shapes, and KisViewManager::updateGUI().
| bool KisSelectionManager::showSelectionAsMask | ( | ) | const |
Definition at line 646 of file kis_selection_manager.cc.
References m_selectionDecoration, and KisSelectionDecoration::Mask.
|
signal |
|
slot |
Definition at line 653 of file kis_selection_manager.cc.
References StrokeSelectionOptions::brushSelected, KisViewManager::canvasResourceProvider(), KoCanvasResource::CurrentKritaNode, KisViewManager::image(), m_view, KoCanvasResourceProvider::resource(), KisCanvasResourceProvider::resourceManager(), KisStrokeSelectionActionFactory::run(), and KisStrokeBrushSelectionActionFactory::run().
|
slot |
Definition at line 634 of file kis_selection_manager.cc.
References KisSelectionDecoration::Ants, displaySelectionChanged(), KIS_ASSERT_RECOVER_RETURN, m_selectionDecoration, and KisSelectionDecoration::Mask.
|
signal |
|
slot |
Definition at line 560 of file kis_selection_manager.cc.
References displaySelectionChanged(), KIS_ASSERT_RECOVER_RETURN, m_selectionDecoration, and m_toggleDisplaySelection.
|
slot |
Definition at line 311 of file kis_selection_manager.cc.
References KisViewManager::activeDevice(), KisViewManager::activeLayer(), havePixelsInClipboard(), KisBaseNode::image, m_clipboard, m_pasteAsReference, m_pasteNew, m_view, signalUpdateGUI(), and updateStatusBar().
|
private |
Definition at line 333 of file kis_selection_manager.cc.
References KisViewManager::image(), m_view, KisStatusBar::setSelection(), and KisViewManager::statusBar().
|
private |
Definition at line 136 of file kis_selection_manager.h.
|
private |
Definition at line 150 of file kis_selection_manager.h.
|
private |
Definition at line 134 of file kis_selection_manager.h.
|
private |
Definition at line 138 of file kis_selection_manager.h.
|
private |
Definition at line 139 of file kis_selection_manager.h.
|
private |
Definition at line 153 of file kis_selection_manager.h.
|
private |
Definition at line 140 of file kis_selection_manager.h.
|
private |
Definition at line 147 of file kis_selection_manager.h.
|
private |
Definition at line 149 of file kis_selection_manager.h.
|
private |
Definition at line 132 of file kis_selection_manager.h.
|
private |
Definition at line 155 of file kis_selection_manager.h.
|
private |
Definition at line 158 of file kis_selection_manager.h.
|
private |
Definition at line 154 of file kis_selection_manager.h.
|
private |
Definition at line 157 of file kis_selection_manager.h.
|
private |
Definition at line 156 of file kis_selection_manager.h.
|
private |
Definition at line 159 of file kis_selection_manager.h.
|
private |
Definition at line 160 of file kis_selection_manager.h.
Definition at line 133 of file kis_selection_manager.h.
|
private |
Definition at line 152 of file kis_selection_manager.h.
|
private |
Definition at line 141 of file kis_selection_manager.h.
|
private |
Definition at line 144 of file kis_selection_manager.h.
|
private |
Definition at line 142 of file kis_selection_manager.h.
|
private |
Definition at line 143 of file kis_selection_manager.h.
|
private |
Definition at line 145 of file kis_selection_manager.h.
|
private |
Definition at line 146 of file kis_selection_manager.h.
|
private |
Definition at line 167 of file kis_selection_manager.h.
|
private |
Definition at line 151 of file kis_selection_manager.h.
|
private |
Definition at line 148 of file kis_selection_manager.h.
|
private |
Definition at line 168 of file kis_selection_manager.h.
|
private |
Definition at line 164 of file kis_selection_manager.h.
|
private |
Definition at line 161 of file kis_selection_manager.h.
|
private |
Definition at line 162 of file kis_selection_manager.h.
|
private |
Definition at line 163 of file kis_selection_manager.h.
|
private |
Definition at line 131 of file kis_selection_manager.h.
|
read |
Definition at line 40 of file kis_selection_manager.h.
|
read |
Definition at line 41 of file kis_selection_manager.h.