|
Krita Source Code Documentation
|
#include <DefaultTool.h>
Inheritance diagram for DefaultTool:Classes | |
| class | MoveGradientHandleInteractionFactory |
| class | MoveMeshGradientHandleInteractionFactory |
Public Types | |
| enum | CanvasResource { HotPosition = 1410100299 } |
Public Slots | |
| void | activate (const QSet< KoShape * > &shapes) override |
| void | deactivate () override |
Public Slots inherited from KoToolBase | |
| virtual void | activate (const QSet< KoShape * > &shapes) |
| virtual void | deactivate () |
| virtual void | documentResourceChanged (int key, const QVariant &res) |
| virtual void | repaintDecorations () |
| virtual void | requestRedoDuringStroke () |
| virtual void | requestStrokeCancellation () |
| virtual void | requestStrokeEnd () |
| virtual void | requestUndoDuringStroke () |
| void | setStatusText (const QString &statusText) |
| void | updateOptionsWidgetIcons () |
Signals | |
| void | meshgradientHandleSelected (KoShapeMeshGradientHandles::Handle) |
Signals inherited from KoToolBase | |
| void | activateTool (const QString &id) |
| void | cursorChanged (const QCursor &cursor) |
| void | selectionChanged (bool hasSelection) |
| void | statusTextChanged (const QString &statusText) |
| void | textModeChanged (bool inTextMode) |
Public Member Functions | |
| void | copy () const override |
| reimplemented | |
| QRectF | decorationsRect () const override |
| DefaultTool (KoCanvasBase *canvas, bool connectToSelectedShapesProxy=false) | |
| void | deleteSelection () override |
| reimplemented | |
| void | deselect () override |
| reimplemented | |
| void | explicitUserStrokeEndRequest () override |
| explicitUserStrokeEndRequest is called by the input manager when the user presses Enter key or any equivalent. This callback comes before requestStrokeEnd(), which comes from a different source. | |
| KoFlake::SelectionHandle | handleAt (const QPointF &point, bool *innerHandleMeaning=0) |
| void | keyPressEvent (QKeyEvent *event) override |
| void | mouseDoubleClickEvent (KoPointerEvent *event) override |
| void | mouseMoveEvent (KoPointerEvent *event) override |
| void | mousePressEvent (KoPointerEvent *event) override |
| void | mouseReleaseEvent (KoPointerEvent *event) override |
| void | paint (QPainter &painter, const KoViewConverter &converter) override |
| bool | paste () override |
| reimplemented | |
| QMenu * | popupActionsMenu () override |
| bool | selectAll () override |
| reimplemented | |
| KoToolSelection * | selection () override |
| reimplemented | |
| KoSvgTextShape * | tryFetchCurrentShapeManagerOwnerTextShape () const |
| bool | updateTextContourMode () |
| bool | wantsAutoScroll () const override |
| ~DefaultTool () override | |
Public Member Functions inherited from KoInteractionTool | |
| void | keyPressEvent (QKeyEvent *event) override |
| void | keyReleaseEvent (QKeyEvent *event) override |
| KoInteractionTool (KoCanvasBase *canvas) | |
| void | mouseMoveEvent (KoPointerEvent *event) override |
| void | mousePressEvent (KoPointerEvent *event) override |
| void | mouseReleaseEvent (KoPointerEvent *event) override |
| void | paint (QPainter &painter, const KoViewConverter &converter) override |
| ~KoInteractionTool () override | |
Public Member Functions inherited from KoToolBase | |
| QAction * | action (const QString &name) const |
| KoCanvasBase * | canvas () const |
| Returns the canvas the tool is working on. | |
| QCursor | cursor () const |
| return the last emitted cursor | |
| virtual void | customMoveEvent (KoPointerEvent *event) |
| virtual void | customPressEvent (KoPointerEvent *event) |
| virtual void | customReleaseEvent (KoPointerEvent *event) |
| virtual void | cut () |
| int | decorationThickness () const |
| decorationThickness The minimum thickness for tool decoration lines, this is derived from the screen magnification, thus the HiDPI settings. Note: to use this effectively, also set the pen to isCosmetic(true); | |
| virtual void | dragLeaveEvent (QDragLeaveEvent *event) |
| virtual void | dragMoveEvent (QDragMoveEvent *event, const QPointF &point) |
| virtual void | dropEvent (QDropEvent *event, const QPointF &point) |
| KoToolFactoryBase * | factory () const |
| virtual void | focusInEvent (QFocusEvent *event) |
| virtual void | focusOutEvent (QFocusEvent *event) |
| virtual bool | hasSelection () |
| virtual void | inputMethodEvent (QInputMethodEvent *event) |
| virtual QVariant | inputMethodQuery (Qt::InputMethodQuery query) const |
| bool | isInTextMode () const |
| bool | isOpacityPresetMode () const |
| KoToolBase (KoCanvasBase *canvas) | |
| bool | maskSyntheticEvents () const |
| virtual void | mouseTripleClickEvent (KoPointerEvent *event) |
| QList< QPointer< QWidget > > | optionWidgets () |
| virtual KisPopupWidgetInterface * | popupWidget () |
| Q_INVOKABLE QString | toolId () const |
| ~KoToolBase () override | |
Protected Slots | |
| void | updateActions () |
| Update actions on selection change. | |
Protected Attributes | |
| QScopedPointer< QMenu > | m_contextMenu |
Protected Attributes inherited from KoToolBase | |
| KoToolBasePrivate * | d_ptr |
Private Slots | |
| void | selectionAlign (int _align) |
| void | selectionBooleanOp (int booleanOp) |
| void | selectionBringToFront () |
| void | selectionDistribute (int _distribute) |
| void | selectionGroup () |
| void | selectionMoveDown () |
| void | selectionMoveUp () |
| void | selectionSendToBack () |
| void | selectionSplitShapes () |
| void | selectionTransform (int transformAction) |
| void | selectionUngroup () |
| void | slotActivateEditFillGradient (bool value) |
| void | slotActivateEditFillMeshGradient (bool value) |
| void | slotActivateEditStrokeGradient (bool value) |
| void | slotAddShapesToFlow () |
| void | slotChangeTextType (int index) |
| void | slotPutTextOnPath () |
| void | slotRemoveShapesFromFlow () |
| void | slotReorderFlowShapes (int type) |
| void | slotResetMeshGradientState () |
| void | slotSubtractShapesFromFlow () |
| void | slotToggleFlowShapeType () |
Private Member Functions | |
| void | addMappedAction (KisSignalMapper *mapper, const QString &actionId, int type) |
| void | canvasResourceChanged (int key, const QVariant &res) override |
| QRectF | handlesSize () |
| Returns selection rectangle adjusted by handle proximity threshold. | |
| bool | moveSelection (int direction, Qt::KeyboardModifiers modifiers) |
| void | recalcSelectionBox (KoSelection *selection) |
| qreal | rotationOfHandle (KoFlake::SelectionHandle handle, bool useEdgeRotation) |
| Returns rotation angle of given handle of the current selection. | |
| void | selectionReorder (KoShapeReorderCommand::MoveShapeType order) |
| void | setupActions () |
| void | updateCursor () |
Private Attributes | |
| KisSignalMapper * | m_alignSignalsMapper {0} |
| qreal | m_angle |
| KisSignalMapper * | m_booleanSignalsMapper {0} |
| QScopedPointer< SelectionDecorator > | m_decorator |
| KisSignalMapper * | m_distributeSignalsMapper {0} |
| KoFlake::AnchorPosition | m_hotPosition |
| KoShapeMeshGradientHandles::Handle | m_hoveredMeshHandle |
| KoFlake::SelectionHandle | m_lastHandle |
| QPointF | m_lastPoint |
| bool | m_mouseWasInsideHandles |
| QCursor | m_rotateCursors [8] |
| KoShapeMeshGradientHandles::Handle | m_selectedMeshHandle |
| QPointF | m_selectionBox [8] |
| KoToolSelection * | m_selectionHandler |
| QPolygonF | m_selectionOutline |
| QCursor | m_shearCursors [8] |
| QCursor | m_sizeCursors [8] |
| DefaultToolTabbedWidget * | m_tabbedOptionWidget |
| KisSignalMapper * | m_textFlowSignalsMapper {0} |
| QScopedPointer< KoSvgTextShapeOutlineHelper > | m_textOutlineHelper |
| DefaultToolTextPropertiesInterface * | m_textPropertyInterface {0} |
| KisSignalMapper * | m_textTypeSignalsMapper {0} |
| KisSignalMapper * | m_transformSignalsMapper {0} |
Friends | |
| class | SelectionHandler |
| class | SelectionInteractionStrategy |
The default tool (associated with the arrow icon) implements the default interactions you have with flake objects.
The tool provides scaling, moving, selecting, rotation and soon skewing of any number of shapes.
Note that the implementation of those different strategies are delegated to the InteractionStrategy class and its subclasses.
Definition at line 41 of file DefaultTool.h.
| Enumerator | |
|---|---|
| HotPosition | |
Definition at line 53 of file DefaultTool.h.
|
explicit |
Constructor for basic interaction tool where user actions are translated and handled by interaction strategies of type KoInteractionStrategy.
| canvas | the canvas this tool will be working for. |
Definition at line 421 of file DefaultTool.cpp.
References KoToolBase::canvas(), m_rotateCursors, m_shearCursors, m_sizeCursors, m_textOutlineHelper, m_textPropertyInterface, KoToolBase::repaintDecorations(), KoCanvasBase::selectedShapesProxy(), KoToolBase::selectionChanged(), setupActions(), and updateActions().
|
override |
Definition at line 486 of file DefaultTool.cpp.
Definition at line 1454 of file DefaultTool.cpp.
References KoToolBase::action(), DefaultToolTabbedWidget::activate(), KoToolBase::activate(), KoToolBase::canvas(), m_alignSignalsMapper, m_booleanSignalsMapper, m_distributeSignalsMapper, m_lastHandle, m_mouseWasInsideHandles, m_tabbedOptionWidget, m_textFlowSignalsMapper, m_textPropertyInterface, m_textTypeSignalsMapper, m_transformSignalsMapper, KoFlake::NoHandle, KoToolBase::repaintDecorations(), selectionAlign(), selectionBooleanOp(), selectionBringToFront(), selectionDistribute(), selectionGroup(), selectionMoveDown(), selectionMoveUp(), selectionSendToBack(), selectionSplitShapes(), selectionTransform(), selectionUngroup(), KisTextPropertiesManager::setTextPropertiesInterface(), slotAddShapesToFlow(), slotChangeTextType(), slotPutTextOnPath(), slotRemoveShapesFromFlow(), slotReorderFlowShapes(), DefaultToolTextPropertiesInterface::slotSelectionChanged(), slotSubtractShapesFromFlow(), slotToggleFlowShapeType(), KisViewManager::textPropertyManager(), updateActions(), KoToolBase::useCursor(), and KisCanvas2::viewManager().
|
private |
Definition at line 780 of file DefaultTool.cpp.
References KoToolBase::action(), and KisSignalMapper::setMapping().
|
protected |
Definition at line 2311 of file DefaultTool.cpp.
References KoToolBase::action().
|
overrideprivatevirtual |
This method is called whenever a property in the resource provider associated with the canvas this tool belongs to changes. An example is currently selected foreground color.
Reimplemented from KoToolBase.
Definition at line 1955 of file DefaultTool.cpp.
References HotPosition, m_hotPosition, and KoToolBase::repaintDecorations().
|
overridevirtual |
reimplemented
Reimplemented from KoToolBase.
Definition at line 1306 of file DefaultTool.cpp.
References KoDrag::addToClipboard(), koSelection(), KoSelection::selectedShapes(), and KoDrag::setSvg().
Reimplemented from KoToolBase.
Reimplemented in ToolReferenceImages.
Definition at line 1924 of file DefaultTool.cpp.
References DefaultToolTabbedWidget::activate(), KoToolBase::isActivated(), m_tabbedOptionWidget, slotActivateEditFillGradient(), slotActivateEditFillMeshGradient(), slotActivateEditStrokeGradient(), and slotResetMeshGradientState().
|
overrideprotectedvirtual |
Implements KoInteractionTool.
Definition at line 1963 of file DefaultTool.cpp.
References KoFlake::Bottom, KoFlake::BottomLeft, KoFlake::BottomLeftHandle, KoFlake::BottomMiddleHandle, KoFlake::BottomRight, KoFlake::BottomRightHandle, KoPointerEvent::buttons(), KoToolBase::canvas(), KoFlake::Center, KoViewConverter::documentToView(), HANDLE_DISTANCE_SQ, handleAt(), HotPosition, KoPointerEvent::isTabletEvent(), kisSquareDistance(), koSelection(), KoFlake::Left, KoFlake::LeftMiddleHandle, m_hotPosition, m_tabbedOptionWidget, KoFlake::NextUnselected, KoFlake::NoHandle, KoPointerEvent::point, KoCanvasBase::resourceManager, KoFlake::Right, KoFlake::RightMiddleHandle, selection(), SelectionInteractionStrategy, KoShapeManager::shapeAt(), shapeManager(), KoFlake::ShapeOnTop, KoFlake::Top, KoFlake::TopLeft, KoFlake::TopLeftHandle, KoFlake::TopMiddleHandle, KoFlake::TopRight, KoFlake::TopRightHandle, DefaultToolTabbedWidget::useUniformScaling(), and KoCanvasBase::viewConverter().
|
overrideslot |
Definition at line 1518 of file DefaultTool.cpp.
References KoToolBase::action(), KoToolBase::canvas(), DefaultToolTextPropertiesInterface::clearSelection(), KoToolBase::deactivate(), DefaultToolTabbedWidget::deactivate(), m_alignSignalsMapper, m_booleanSignalsMapper, m_distributeSignalsMapper, m_tabbedOptionWidget, m_textFlowSignalsMapper, m_textPropertyInterface, m_textTypeSignalsMapper, m_transformSignalsMapper, KisTextPropertiesManager::setTextPropertiesInterface(), KisViewManager::textPropertyManager(), and KisCanvas2::viewManager().
|
overridevirtual |
TODO: avoid cons_cast by implementing proper caching strategy inrecalcSelectionBox() and handlesSize()
Reimplemented from KoToolBase.
Definition at line 1287 of file DefaultTool.cpp.
References KoSnapGuide::boundingRect(), KoToolBase::canvas(), handlesSize(), KoSnapGuide::isSnapping(), koSelection(), m_textOutlineHelper, and KoCanvasBase::snapGuide.
|
overridevirtual |
reimplemented
Reimplemented from KoToolBase.
Reimplemented in ToolReferenceImages.
Definition at line 1318 of file DefaultTool.cpp.
References KoCanvasBase::addCommand(), KoToolBase::canvas(), KoShape::isGeometryProtected(), and koSelection().
|
overridevirtual |
reimplemented
Reimplemented from KoToolBase.
Definition at line 1351 of file DefaultTool.cpp.
References KoToolBase::canvas(), KoSelection::deselectAll(), KoToolBase::repaintDecorations(), KoCanvasBase::selectedShapesProxy(), and KoSelectedShapesProxy::selection().
|
overridevirtual |
explicitUserStrokeEndRequest is called by the input manager when the user presses Enter key or any equivalent. This callback comes before requestStrokeEnd(), which comes from a different source.
Reimplemented from KoToolBase.
Definition at line 2322 of file DefaultTool.cpp.
References KoToolManager::instance(), koSelection(), KoToolManager::preferredToolForSelection(), KoSelection::selectedEditableShapesAndDelegates(), and KoToolManager::switchToolRequested().
| KoFlake::SelectionHandle DefaultTool::handleAt | ( | const QPointF & | point, |
| bool * | innerHandleMeaning = 0 ) |
Returns which selection handle is at params point (or NoHandle if none).
| point | the location (in pt) where we should look for a handle |
| innerHandleMeaning | this boolean is altered to true if the point is inside the selection rectangle and false if it is just outside. The value of innerHandleMeaning is undefined if the handle location is NoHandle |
Definition at line 1366 of file DefaultTool.cpp.
References KoFlake::BottomLeftHandle, KoFlake::BottomMiddleHandle, KoFlake::BottomRightHandle, KoToolBase::canvas(), KoViewConverter::documentToView(), HANDLE_DISTANCE_SQ, KoToolBase::handlePaintRect(), INNER_HANDLE_DISTANCE_SQ, kisSquareDistance(), koSelection(), KoFlake::LeftMiddleHandle, m_selectionBox, m_selectionOutline, KoFlake::NoHandle, recalcSelectionBox(), KoFlake::RightMiddleHandle, selection(), KoFlake::TopLeftHandle, KoFlake::TopMiddleHandle, KoFlake::TopRightHandle, and KoCanvasBase::viewConverter().
|
private |
Returns selection rectangle adjusted by handle proximity threshold.
Definition at line 1190 of file DefaultTool.cpp.
References KoToolBase::canvas(), HANDLE_DISTANCE, koSelection(), m_selectionOutline, recalcSelectionBox(), selection(), KoCanvasBase::viewConverter(), and KoViewConverter::viewToDocument().
|
protectedvirtual |
Reimplemented in ToolReferenceImages.
Definition at line 1127 of file DefaultTool.cpp.
References KoToolBase::canvas(), and KisCanvas2::localShapeManager().
|
overridevirtual |
Called when a key is pressed. Implementors should call event->ignore() if they do not actually use the event. Default implementation ignores this event.
| event | state and reason of this key press |
Reimplemented from KoToolBase.
Definition at line 1268 of file DefaultTool.cpp.
References KoInteractionTool::currentStrategy(), KoInteractionTool::keyPressEvent(), and moveSelection().
|
protectedvirtual |
Reimplemented in ToolReferenceImages.
Definition at line 1359 of file DefaultTool.cpp.
References KoToolBase::canvas(), KoCanvasBase::selectedShapesProxy(), and KoSelectedShapesProxy::selection().
|
signal |
|
overridevirtual |
Called when (one of) the mouse or stylus buttons is double clicked. Implementors should call event->ignore() if they do not actually use the event. Default implementation ignores this event.
| event | state and reason of this mouse or stylus press |
Reimplemented from KoToolBase.
Reimplemented in ToolReferenceImages.
Definition at line 1215 of file DefaultTool.cpp.
References explicitUserStrokeEndRequest(), koSelection(), KoPointerEvent::modifiers(), KoPointerEvent::point, selection(), KoShapeManager::shapeAt(), shapeManager(), and KoFlake::ShapeOnTop.
|
overridevirtual |
Called when the mouse or stylus moved over the canvas. Implementors should call event->ignore() if they do not actually use the event.
| event | state and reason of this mouse or stylus move |
Implements KoToolBase.
Definition at line 1162 of file DefaultTool.cpp.
References KoInteractionTool::currentStrategy(), handleAt(), handlesSize(), koSelection(), m_lastHandle, m_mouseWasInsideHandles, KoInteractionTool::mouseMoveEvent(), KoFlake::NoHandle, KoPointerEvent::point, and updateCursor().
|
overridevirtual |
Called when (one of) the mouse or stylus buttons is pressed. Implementors should call event->ignore() if they do not actually use the event.
| event | state and reason of this mouse or stylus press |
Implements KoToolBase.
Definition at line 1140 of file DefaultTool.cpp.
References KoToolBase::canvas(), isValidForCurrentLayer(), m_textOutlineHelper, KisFloatingMessage::Medium, KoInteractionTool::mousePressEvent(), KoPointerEvent::point, KisViewManager::showFloatingMessage(), updateActions(), updateCursor(), and KisCanvas2::viewManager().
|
overridevirtual |
Called when (one of) the mouse or stylus buttons is released. Implementors should call event->ignore() if they do not actually use the event.
| event | state and reason of this mouse or stylus release |
Implements KoToolBase.
Definition at line 1209 of file DefaultTool.cpp.
References KoInteractionTool::mouseReleaseEvent(), and updateCursor().
|
private |
Definition at line 1232 of file DefaultTool.cpp.
References KoCanvasBase::addCommand(), KoToolBase::canvas(), koSelection(), and KoSelection::selectedEditableShapes().
|
overridevirtual |
Called by the canvas to paint any decorations that the tool deems needed. The painter has the top left of the canvas as its origin.
| painter | used for painting the shape |
| converter | to convert between internal and view coordinates. |
Selection masks don't render the outline of the shapes, so we should do that explicitly when rendering them via selection
Implements KoToolBase.
Definition at line 1085 of file DefaultTool.cpp.
References KisNodeManager::activeNode(), KoToolBase::canvas(), KoToolBase::decorationThickness(), KoViewConverter::documentToView(), KoToolBase::handleRadius(), KoInteractionTool::hasInteractionFactory(), isSelectionMask(), koSelection(), m_decorator, m_hoveredMeshHandle, m_selectedMeshHandle, m_textOutlineHelper, KisViewManager::nodeManager(), KoSnapGuide::paint(), KoInteractionTool::paint(), selection(), KoCanvasBase::snapGuide, and KisCanvas2::viewManager().
|
overridevirtual |
reimplemented
Reimplemented from KoToolBase.
Definition at line 1332 of file DefaultTool.cpp.
|
overridevirtual |
Reimplemented from KoToolBase.
Reimplemented in ToolReferenceImages.
Definition at line 2236 of file DefaultTool.cpp.
References KoToolBase::action(), and m_contextMenu.
|
private |
Definition at line 1419 of file DefaultTool.cpp.
References KoFlake::BottomLeftHandle, KoFlake::BottomMiddleHandle, KoFlake::BottomRightHandle, KoSelection::firstSelectedShape(), KIS_ASSERT_RECOVER_RETURN, koSelection(), KoFlake::LeftMiddleHandle, m_angle, m_selectionBox, m_selectionOutline, KoFlake::RightMiddleHandle, selection(), KoFlake::TopLeftHandle, KoFlake::TopMiddleHandle, and KoFlake::TopRightHandle.
|
private |
Returns rotation angle of given handle of the current selection.
Definition at line 848 of file DefaultTool.cpp.
References KoShape::absolutePosition(), KoFlake::BottomLeft, KoFlake::BottomLeftHandle, KoFlake::BottomMiddleHandle, KoFlake::BottomRight, KoFlake::BottomRightHandle, koSelection(), KoFlake::LeftMiddleHandle, M_PI, KoFlake::NoHandle, KoFlake::RightMiddleHandle, KoFlake::TopLeft, KoFlake::TopLeftHandle, KoFlake::TopMiddleHandle, KoFlake::TopRight, and KoFlake::TopRightHandle.
|
overridevirtual |
reimplemented
Reimplemented from KoToolBase.
Definition at line 1338 of file DefaultTool.cpp.
References KoToolBase::canvas(), KoShape::isSelectable(), KoToolBase::repaintDecorations(), KoSelection::select(), KoCanvasBase::selectedShapesProxy(), KoSelectedShapesProxy::selection(), and shapeManager().
|
overridevirtual |
reimplemented
Reimplemented from KoToolBase.
Definition at line 2231 of file DefaultTool.cpp.
References m_selectionHandler.
|
privateslot |
Definition at line 1836 of file DefaultTool.cpp.
References KoShape::absoluteOutlineRect(), KoCanvasBase::addCommand(), KoToolBase::canvas(), koSelection(), KoCanvasResource::PageSize, and selection().
|
privateslot |
Definition at line 1708 of file DefaultTool.cpp.
References KoShape::absoluteTransformation(), KoCanvasBase::addCommand(), KoShape::background(), KoToolBase::canvas(), KoPathShape::createShapeFromPainterPath(), KisCanvas2::image(), KIS_SAFE_ASSERT_RECOVER_RETURN, koSelection(), kundo2_i18n(), kundo2_noi18n(), KoShape::outline(), KoShape::parent(), KritaUtils::pathShapeBooleanSpaceWorkaround(), KoCanvasBase::selectedShapesProxy(), selection(), KoShape::setBackground(), KoShape::setStroke(), KoShape::setZIndex(), KoCanvasBase::shapeController, KoShape::stroke(), and KoShape::zIndex().
|
privateslot |
Definition at line 1886 of file DefaultTool.cpp.
References KoShapeReorderCommand::BringToFront, and selectionReorder().
|
privateslot |
Definition at line 1868 of file DefaultTool.cpp.
References KoShape::absoluteOutlineRect(), KoCanvasBase::addCommand(), KoToolBase::canvas(), koSelection(), and selection().
|
privateslot |
Definition at line 1572 of file DefaultTool.cpp.
References KoCanvasBase::addCommand(), KoToolBase::canvas(), KoShape::compareShapeZIndex(), koSelection(), kundo2_i18n(), KoCanvasBase::selectedShapesProxy(), selection(), KoShape::setZIndex(), and KoCanvasBase::shapeController.
|
privateslot |
Definition at line 1896 of file DefaultTool.cpp.
References KoShapeReorderCommand::LowerShape, and selectionReorder().
|
privateslot |
Definition at line 1891 of file DefaultTool.cpp.
References KoShapeReorderCommand::RaiseShape, and selectionReorder().
|
private |
Definition at line 1906 of file DefaultTool.cpp.
References KoCanvasBase::addCommand(), KoToolBase::canvas(), KoShapeReorderCommand::createCommand(), koSelection(), selection(), and shapeManager().
|
privateslot |
Definition at line 1901 of file DefaultTool.cpp.
References selectionReorder(), and KoShapeReorderCommand::SendToBack.
|
privateslot |
Definition at line 1801 of file DefaultTool.cpp.
References KoCanvasBase::addCommand(), KoToolBase::canvas(), koSelection(), kundo2_i18n(), KoShape::parent(), KoCanvasBase::selectedShapesProxy(), selection(), KoPathShape::separate(), and KoCanvasBase::shapeController.
|
privateslot |
Definition at line 1630 of file DefaultTool.cpp.
References KoShape::absoluteOutlineRect(), KoShape::absoluteTransformation(), KoCanvasBase::addCommand(), KoToolBase::canvas(), koSelection(), kundo2_i18n(), kundo2_noi18n(), KoShape::outlineRect(), selection(), KUndo2Command::setText(), and KoShape::transformation().
|
privateslot |
Definition at line 1598 of file DefaultTool.cpp.
References KoCanvasBase::addCommand(), KoToolBase::canvas(), KoShape::compareShapeZIndex(), koSelection(), kundo2_i18n(), KoShape::parent(), KoCanvasBase::selectedShapesProxy(), selection(), KoCanvasBase::shapeController, shapeManager(), KoShapeContainer::shapes(), and KoShapeManager::topLevelShapes().
|
private |
Definition at line 787 of file DefaultTool.cpp.
References KoToolBase::action(), addMappedAction(), KoSvgTextReorderShapeInsideCommand::BringToFront, KoShapeAlignCommand::HorizontalCenterAlignment, KoShapeDistributeCommand::HorizontalCenterDistribution, KoShapeDistributeCommand::HorizontalGapsDistribution, KoShapeAlignCommand::HorizontalLeftAlignment, KoShapeDistributeCommand::HorizontalLeftDistribution, KoShapeAlignCommand::HorizontalRightAlignment, KoShapeDistributeCommand::HorizontalRightDistribution, KoSvgTextShape::InlineWrap, m_alignSignalsMapper, m_booleanSignalsMapper, m_contextMenu, m_distributeSignalsMapper, m_textFlowSignalsMapper, m_textTypeSignalsMapper, m_transformSignalsMapper, KoSvgTextReorderShapeInsideCommand::MoveEarlier, KoSvgTextReorderShapeInsideCommand::MoveLater, KoSvgTextShape::PreformattedText, KoSvgTextShape::PrePositionedText, KoSvgTextReorderShapeInsideCommand::SendToBack, KoShapeAlignCommand::VerticalBottomAlignment, KoShapeDistributeCommand::VerticalBottomDistribution, KoShapeAlignCommand::VerticalCenterAlignment, KoShapeDistributeCommand::VerticalCenterDistribution, KoShapeDistributeCommand::VerticalGapsDistribution, KoShapeAlignCommand::VerticalTopAlignment, and KoShapeDistributeCommand::VerticalTopDistribution.
|
protectedvirtual |
Reimplemented in ToolReferenceImages.
Definition at line 1136 of file DefaultTool.cpp.
References KoToolBase::canvas(), and KoCanvasBase::shapeManager().
|
privateslot |
Definition at line 490 of file DefaultTool.cpp.
References KoInteractionTool::addInteractionFactory(), KoFlake::Fill, KoInteractionTool::removeInteractionFactory(), KoToolBase::repaintDecorations(), and value().
|
privateslot |
Definition at line 514 of file DefaultTool.cpp.
References KoInteractionTool::addInteractionFactory(), KoFlake::Fill, m_tabbedOptionWidget, meshgradientHandleSelected(), KoInteractionTool::removeInteractionFactory(), and value().
|
privateslot |
Definition at line 502 of file DefaultTool.cpp.
References KoInteractionTool::addInteractionFactory(), KoInteractionTool::removeInteractionFactory(), KoToolBase::repaintDecorations(), KoFlake::StrokeFill, and value().
|
privateslot |
Definition at line 562 of file DefaultTool.cpp.
References KoCanvasBase::addCommand(), KoToolBase::canvas(), KoShape::compareShapeZIndex(), KoSvgTextShape::InlineWrap, koSelection(), kundo2_i18n(), KoSvgTextShape::PreformattedText, KoSvgTextRemoveShapeCommand::removeContourShapesFromFlow(), KoCanvasBase::selectedShapesProxy(), selection(), and KoSvgTextShape::textType().
|
privateslot |
Definition at line 534 of file DefaultTool.cpp.
References KoCanvasBase::addCommand(), KoToolBase::canvas(), KisCommandUtils::FlipFlopCommand::FINALIZING, KisCommandUtils::FlipFlopCommand::INITIALIZING, KoSvgTextShape::InlineWrap, koSelection(), KoSvgTextRemoveShapeCommand::removeContourShapesFromFlow(), KoSelection::selectedShapes(), KoCanvasBase::selectedShapesProxy(), KUndo2Command::setText(), KUndo2Command::text(), KoSvgTextShape::TextInShape, and KoSvgTextShape::textType().
|
privateslot |
This will always remove all previous text paths. While Krita's layout engine can handle multiple of them, the interaction hasn't been fully verified yet. So if someone implements multiple textpaths, they will also need to check if the cursor interaction makes sense.
Definition at line 602 of file DefaultTool.cpp.
References KoCanvasBase::addCommand(), KoToolBase::canvas(), KoShape::compareShapeZIndex(), KoSvgTextShape::InlineWrap, koSelection(), kundo2_i18n(), KoSvgTextShape::plainText, KoSvgTextShape::posForIndex(), KoSvgTextShape::PreformattedText, KoSvgTextRemoveShapeCommand::removeContourShapesFromFlow(), KoCanvasBase::selectedShapesProxy(), selection(), and KoSvgTextShape::textType().
|
privateslot |
Definition at line 692 of file DefaultTool.cpp.
References KoCanvasBase::addCommand(), KoToolBase::canvas(), koSelection(), kundo2_i18n(), KoCanvasBase::selectedShapesProxy(), selection(), KoSvgTextShape::shapeInContours(), and tryFetchCurrentShapeManagerOwnerTextShape().
|
privateslot |
Definition at line 737 of file DefaultTool.cpp.
References KoCanvasBase::addCommand(), KoSvgTextReorderShapeInsideCommand::BringToFront, KoToolBase::canvas(), koSelection(), kundo2_i18n(), KoSvgTextReorderShapeInsideCommand::MoveEarlier, KoSvgTextReorderShapeInsideCommand::MoveLater, selection(), KUndo2Command::setText(), KoSvgTextShape::shapesInside, and tryFetchCurrentShapeManagerOwnerTextShape().
|
privateslot |
Definition at line 529 of file DefaultTool.cpp.
References m_selectedMeshHandle.
|
privateslot |
Definition at line 647 of file DefaultTool.cpp.
References KoCanvasBase::addCommand(), KoToolBase::canvas(), KoShape::compareShapeZIndex(), KoSvgTextShape::InlineWrap, koSelection(), kundo2_i18n(), KoSvgTextShape::PreformattedText, KoSvgTextRemoveShapeCommand::removeContourShapesFromFlow(), KoCanvasBase::selectedShapesProxy(), selection(), and KoSvgTextShape::textType().
|
privateslot |
Definition at line 714 of file DefaultTool.cpp.
References KoCanvasBase::addCommand(), KoToolBase::canvas(), koSelection(), kundo2_i18n(), selection(), KoSvgTextShape::shapesInside, KoSvgTextShape::shapesSubtract, and tryFetchCurrentShapeManagerOwnerTextShape().
| KoSvgTextShape * DefaultTool::tryFetchCurrentShapeManagerOwnerTextShape | ( | ) | const |
Definition at line 687 of file DefaultTool.cpp.
References KoToolBase::canvas(), and KoCanvasBase::currentShapeManagerOwnerShape().
|
protectedslot |
Update actions on selection change.
Definition at line 2085 of file DefaultTool.cpp.
References KoToolBase::action(), KoToolBase::canvas(), koSelection(), KoCanvasResource::PageSize, KoCanvasBase::resourceManager, KoSelection::selectedEditableShapes(), KoToolBase::selectionChanged(), KoSvgTextShape::shapesInside, tryFetchCurrentShapeManagerOwnerTextShape(), and updateDistinctiveActions().
|
private |
Definition at line 967 of file DefaultTool.cpp.
References KoFlake::BottomLeftHandle, KoFlake::BottomMiddleHandle, KoFlake::BottomRightHandle, KoInteractionTool::currentStrategy(), KoToolBase::cursor(), koSelection(), KoFlake::LeftMiddleHandle, m_angle, m_lastHandle, m_mouseWasInsideHandles, m_rotateCursors, m_shearCursors, m_sizeCursors, KoFlake::NoHandle, KoFlake::RightMiddleHandle, rotationOfHandle(), selection(), KoToolBase::statusTextChanged(), KoFlake::TopLeftHandle, KoFlake::TopMiddleHandle, KoFlake::TopRightHandle, KoInteractionTool::tryUseCustomCursor(), and KoToolBase::useCursor().
|
protectedvirtual |
Enable/disable actions specific to the tool (vector vs. reference images)
Reimplemented in ToolReferenceImages.
Definition at line 2170 of file DefaultTool.cpp.
References KoToolBase::action(), KoSvgTextShape::InlineWrap, KoSvgTextShape::PreformattedText, KoSvgTextShape::PrePositionedText, KoPathShape::subpathCount(), and KoSvgTextShape::textType().
| bool DefaultTool::updateTextContourMode | ( | ) |
Definition at line 770 of file DefaultTool.cpp.
References m_textOutlineHelper.
|
overridevirtual |
Return if dragging (moving with the mouse down) to the edge of a canvas should scroll the canvas (default is true).
Reimplemented from KoToolBase.
Definition at line 775 of file DefaultTool.cpp.
|
friend |
Definition at line 209 of file DefaultTool.h.
|
friend |
Definition at line 155 of file DefaultTool.h.
|
private |
Definition at line 213 of file DefaultTool.h.
|
private |
Definition at line 207 of file DefaultTool.h.
|
private |
Definition at line 216 of file DefaultTool.h.
|
protected |
Definition at line 166 of file DefaultTool.h.
|
private |
Definition at line 197 of file DefaultTool.h.
|
private |
Definition at line 214 of file DefaultTool.h.
|
private |
Definition at line 191 of file DefaultTool.h.
|
private |
Definition at line 201 of file DefaultTool.h.
|
private |
Definition at line 190 of file DefaultTool.h.
|
private |
Definition at line 195 of file DefaultTool.h.
|
private |
Definition at line 192 of file DefaultTool.h.
|
private |
Definition at line 205 of file DefaultTool.h.
|
private |
Definition at line 200 of file DefaultTool.h.
|
private |
Definition at line 193 of file DefaultTool.h.
|
private |
Definition at line 208 of file DefaultTool.h.
|
private |
Definition at line 194 of file DefaultTool.h.
|
private |
Definition at line 206 of file DefaultTool.h.
|
private |
Definition at line 204 of file DefaultTool.h.
|
private |
Definition at line 211 of file DefaultTool.h.
|
private |
Definition at line 218 of file DefaultTool.h.
|
private |
Definition at line 198 of file DefaultTool.h.
|
private |
Definition at line 220 of file DefaultTool.h.
|
private |
Definition at line 217 of file DefaultTool.h.
|
private |
Definition at line 215 of file DefaultTool.h.