|
Krita Source Code Documentation
|
#include <kis_selection_tool_helper.h>
Public Member Functions | |
| void | addSelectionShape (KoShape *shape, SelectionAction action=SELECTION_DEFAULT) |
| void | addSelectionShapes (QList< KoShape * > shapes, SelectionAction action=SELECTION_DEFAULT) |
| bool | canShortcutToDeselect (const QRect &rect, SelectionAction action) |
| bool | canShortcutToNoop (const QRect &rect, SelectionAction action) |
| KisSelectionToolHelper (KisCanvas2 *canvas, const KUndo2MagicString &name) | |
| void | selectPixelSelection (KisPixelSelectionSP selection, SelectionAction action) |
| void | selectPixelSelection (KisProcessingApplicator &applicator, KisPixelSelectionSP selection, SelectionAction action) |
| bool | tryDeselectCurrentSelection (const QRectF selectionViewRect, SelectionAction action) |
| SelectionMode | tryOverrideSelectionMode (KisSelectionSP activeSelection, SelectionMode currentMode, SelectionAction currentAction) const |
| virtual | ~KisSelectionToolHelper () |
Static Public Member Functions | |
| static QMenu * | getSelectionContextMenu (KisCanvas2 *canvas) |
Private Attributes | |
| QPointer< KisCanvas2 > | m_canvas |
| KisImageSP | m_image |
| KisLayerSP | m_layer |
| KUndo2MagicString | m_name |
XXX: Doc!
Definition at line 24 of file kis_selection_tool_helper.h.
| KisSelectionToolHelper::KisSelectionToolHelper | ( | KisCanvas2 * | canvas, |
| const KUndo2MagicString & | name ) |
Definition at line 40 of file kis_selection_tool_helper.cpp.
|
virtual |
Definition at line 47 of file kis_selection_tool_helper.cpp.
| void KisSelectionToolHelper::addSelectionShape | ( | KoShape * | shape, |
| SelectionAction | action = SELECTION_DEFAULT ) |
Definition at line 162 of file kis_selection_tool_helper.cpp.
References addSelectionShapes().
| void KisSelectionToolHelper::addSelectionShapes | ( | QList< KoShape * > | shapes, |
| SelectionAction | action = SELECTION_DEFAULT ) |
Mark the shapes that they belong to a shape selection
Definition at line 169 of file kis_selection_tool_helper.cpp.
References KoShape::absoluteTransformation(), KisCommandUtils::CompositeCommand::addCommand(), KisProcessingApplicator::applyCommand(), KisView::canvasBase(), KisPixelSelection::clear(), KoPathShape::createShapeFromPainterPath(), KisProcessingApplicator::end(), KisTransaction::endAndTake(), KisView::image(), KisCoordinatesConverter::imageRectInDocumentPixels(), KIS_ASSERT_RECOVER, KisIconUtils::loadIcon(), m_canvas, m_name, KisProcessingApplicator::NONE, KoShape::outline(), KritaUtils::pathShapeBooleanSpaceWorkaround(), KisSelection::pixelSelection, KisView::selection(), SELECTION_ADD, SELECTION_DEFAULT, SELECTION_INTERSECT, SELECTION_REPLACE, SELECTION_SUBTRACT, SELECTION_SYMMETRICDIFFERENCE, KoShape::setUserData(), KoCanvasBase::shapeController, KoShapeContainer::shapes(), KisSelection::shapeSelection, KisView::showFloatingMessage, KritaUtils::tryCloseTornSubpathsAfterIntersection(), KoShape::userData(), KisView::viewConverter, and KisImage::wrapAroundModePermitted().
| bool KisSelectionToolHelper::canShortcutToDeselect | ( | const QRect & | rect, |
| SelectionAction | action ) |
Definition at line 326 of file kis_selection_tool_helper.cpp.
References SELECTION_INTERSECT, and SELECTION_REPLACE.
| bool KisSelectionToolHelper::canShortcutToNoop | ( | const QRect & | rect, |
| SelectionAction | action ) |
Definition at line 331 of file kis_selection_tool_helper.cpp.
References SELECTION_ADD.
|
static |
Definition at line 352 of file kis_selection_tool_helper.cpp.
References KisKActionCollection::action(), KisViewManager::actionCollection(), KisSelection::hasShapeSelection(), KisViewManager::selection(), KisViewManager::selectionEditable(), and KisCanvas2::viewManager().
| void KisSelectionToolHelper::selectPixelSelection | ( | KisPixelSelectionSP | selection, |
| SelectionAction | action ) |
Definition at line 62 of file kis_selection_tool_helper.cpp.
References KisProcessingApplicator::end(), KisView::image(), m_canvas, m_name, selectPixelSelection(), and KisProcessingApplicator::SUPPORTS_WRAPAROUND_MODE.
| void KisSelectionToolHelper::selectPixelSelection | ( | KisProcessingApplicator & | applicator, |
| KisPixelSelectionSP | selection, | ||
| SelectionAction | action ) |
Definition at line 77 of file kis_selection_tool_helper.cpp.
References KisCommandUtils::CompositeCommand::addCommand(), KisProcessingApplicator::applyCommand(), KisPixelSelection::applySelection(), KisImage::bounds(), KisSharedPtr< T >::clear(), KisTransaction::endAndTake(), KisView::image(), KisPixelSelection::invert(), KisPixelSelection::isEmpty(), KIS_SAFE_ASSERT_RECOVER, m_canvas, KisSelection::pixelSelection, KisPixelSelection::selectedExactRect(), KisSelection::selectedExactRect(), KisPixelSelection::selectedRect(), KisView::selection(), SELECTION_INTERSECT, SELECTION_REPLACE, SELECTION_SUBTRACT, SELECTION_SYMMETRICDIFFERENCE, KisStrokeJobData::SEQUENTIAL, KisPaintDevice::setDirty(), and KisSelection::updateProjection().
| bool KisSelectionToolHelper::tryDeselectCurrentSelection | ( | const QRectF | selectionViewRect, |
| SelectionAction | action ) |
Definition at line 336 of file kis_selection_tool_helper.cpp.
References m_canvas, KisAlgebra2D::maxDimension(), SELECTION_INTERSECT, SELECTION_REPLACE, and SELECTION_SYMMETRICDIFFERENCE.
| SelectionMode KisSelectionToolHelper::tryOverrideSelectionMode | ( | KisSelectionSP | activeSelection, |
| SelectionMode | currentMode, | ||
| SelectionAction | currentAction ) const |
Definition at line 409 of file kis_selection_tool_helper.cpp.
References KisSelection::hasShapeSelection(), PIXEL_SELECTION, SELECTION_DEFAULT, SELECTION_REPLACE, and SHAPE_PROTECTION.
|
private |
Definition at line 47 of file kis_selection_tool_helper.h.
|
private |
Definition at line 48 of file kis_selection_tool_helper.h.
|
private |
Definition at line 49 of file kis_selection_tool_helper.h.
|
private |
Definition at line 50 of file kis_selection_tool_helper.h.