|
Krita Source Code Documentation
|
#include <SvgChangeTextPaddingMarginStrategy.h>
Inheritance diagram for SvgChangeTextPaddingMarginStrategy:Public Member Functions | |
| KUndo2Command * | createCommand () override |
| void | finishInteraction (Qt::KeyboardModifiers modifiers) override |
| void | handleMouseMove (const QPointF &mouseLocation, Qt::KeyboardModifiers modifiers) override |
| void | paint (QPainter &painter, const KoViewConverter &converter) override |
| SvgChangeTextPaddingMarginStrategy (SvgTextTool *tool, KoSvgTextShape *shape, const QPointF &clicked) | |
| ~SvgChangeTextPaddingMarginStrategy () | |
Public Member Functions inherited from KoInteractionStrategy | |
| virtual void | cancelInteraction () |
| KoInteractionStrategy (KoToolBase *parent) | |
| constructor | |
| KoToolBase * | tool () const |
| virtual | ~KoInteractionStrategy () |
| Destructor. | |
Static Public Member Functions | |
| static std::optional< QPointF > | hitTest (KoSvgTextShape *shape, const QPointF &mousePos, const qreal grabSensitivityInPts) |
| hitTest Tests whether the current mouse position is over a text wrapping area, and if so, will return the angle vector at that point. | |
Private Attributes | |
| bool | m_isPadding |
| QPointF | m_lastMousePos |
| KoPathShape * | m_referenceShape |
| KoSvgTextShape * | m_shape |
Additional Inherited Members | |
Protected Member Functions inherited from KoInteractionStrategy | |
| uint | decorationThickness () const |
| uint | grabSensitivity () const |
| Convenience function to get the global grab sensitivity. | |
| uint | handleRadius () const |
| Convenience function to get the global handle radius. | |
| KoInteractionStrategy (KoInteractionStrategyPrivate &) | |
| constructor | |
Protected Attributes inherited from KoInteractionStrategy | |
| KoInteractionStrategyPrivate * | d_ptr |
Definition at line 17 of file SvgChangeTextPaddingMarginStrategy.h.
| SvgChangeTextPaddingMarginStrategy::SvgChangeTextPaddingMarginStrategy | ( | SvgTextTool * | tool, |
| KoSvgTextShape * | shape, | ||
| const QPointF & | clicked ) |
Definition at line 19 of file SvgChangeTextPaddingMarginStrategy.cpp.
References KoSvgTextProperties::defaultProperties(), distance(), KoShape::documentToShape(), KoSvgTextProperties::inheritFrom(), kisDistance(), m_isPadding, m_referenceShape, m_shape, KoPathSegment::nearestPoint(), KoPathSegment::pointAt(), KoSvgTextProperties::propertyOrDefault(), KoSvgTextProperties::ShapeMarginId, KoSvgTextProperties::ShapePaddingId, KoSvgTextShape::shapesInside, KoSvgTextShape::shapesSubtract, KoSvgTextShape::textProperties(), and value().
| SvgChangeTextPaddingMarginStrategy::~SvgChangeTextPaddingMarginStrategy | ( | ) |
Definition at line 76 of file SvgChangeTextPaddingMarginStrategy.cpp.
|
overridevirtual |
For interactions that are undo-able this method should be implemented to return such a command. Implementations should return 0 otherwise.
Implements KoInteractionStrategy.
Definition at line 164 of file SvgChangeTextPaddingMarginStrategy.cpp.
References getLine(), getProperties(), m_isPadding, m_lastMousePos, m_referenceShape, and m_shape.
|
overridevirtual |
Override to make final changes to the data on the end of an interaction.
Implements KoInteractionStrategy.
Definition at line 172 of file SvgChangeTextPaddingMarginStrategy.cpp.
|
overridevirtual |
Extending classes should implement this method to update the selectedShapes based on the new mouse position.
| mouseLocation | the new location in pt |
| modifiers | OR-ed set of keys pressed. |
Implements KoInteractionStrategy.
Definition at line 158 of file SvgChangeTextPaddingMarginStrategy.cpp.
References m_lastMousePos.
|
static |
hitTest Tests whether the current mouse position is over a text wrapping area, and if so, will return the angle vector at that point.
| shape | – shape to test for. |
| mousePos | – mousePos to test against. |
| grabSensitivityInPts | – grabSensitivity in Points |
Definition at line 81 of file SvgChangeTextPaddingMarginStrategy.cpp.
References KoShape::absoluteTransformation(), KoPathSegment::angleVectorAtParam(), KoPathShape::createShapeFromPainterPath(), KoShape::documentToShape(), KoPathSegment::isValid(), KoPathSegment::nearestPoint(), KoPathShape::segmentAtPoint(), KoShape::setTransformation(), and KoSvgTextShape::textWrappingAreas().
|
overridevirtual |
Reimplement this if the action needs to draw a "blob" on the canvas; that is, a transient decoration like a rubber band.
Reimplemented from KoInteractionStrategy.
Definition at line 137 of file SvgChangeTextPaddingMarginStrategy.cpp.
References KoShape::absoluteTransformation(), KoShape::createHandlePainterHelperView(), KoInteractionStrategy::decorationThickness(), KisHandlePainterHelper::drawConnectionLine(), KisHandlePainterHelper::drawPath(), KoSvgTextShape::generateTextAreas(), getLine(), getProperties(), KoInteractionStrategy::handleRadius(), m_isPadding, m_lastMousePos, m_referenceShape, m_shape, KisHandleStyle::selectedPrimaryHandles(), KisHandlePainterHelper::setHandleStyle(), KoSvgTextShape::shapesInside, KoSvgTextShape::shapesSubtract, and KoSvgTextShape::textProperties().
|
private |
Definition at line 37 of file SvgChangeTextPaddingMarginStrategy.h.
|
private |
Definition at line 38 of file SvgChangeTextPaddingMarginStrategy.h.
|
private |
Definition at line 36 of file SvgChangeTextPaddingMarginStrategy.h.
|
private |
Definition at line 35 of file SvgChangeTextPaddingMarginStrategy.h.