|
Krita Source Code Documentation
|
#include <ShapeMoveStrategy.h>
Inheritance diagram for ShapeMoveStrategy: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 |
| ShapeMoveStrategy (KoToolBase *tool, KoSelection *selection, const QPointF &clicked) | |
| ~ShapeMoveStrategy () override | |
Public Member Functions inherited from KoInteractionStrategy | |
| virtual void | cancelInteraction () |
| KoInteractionStrategy (KoToolBase *parent) | |
| constructor | |
| KoToolBase * | tool () const |
| virtual | ~KoInteractionStrategy () |
| Destructor. | |
Private Member Functions | |
| void | moveSelection (const QPointF &diff) |
Private Attributes | |
| QPointer< KoCanvasBase > | m_canvas |
| QPointF | m_finalMove |
| QPointF | m_initialOffset |
| QList< QPointF > | m_newPositions |
| QList< QPointF > | m_previousPositions |
| QList< KoShape * > | m_selectedShapes |
| QPointF | m_start |
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 |
Implements the Move action on an object or selected objects.
Definition at line 27 of file ShapeMoveStrategy.h.
| ShapeMoveStrategy::ShapeMoveStrategy | ( | KoToolBase * | tool, |
| KoSelection * | selection, | ||
| const QPointF & | clicked ) |
Constructor that starts to move the objects.
| tool | the parent tool which controls this strategy |
| canvas | the canvas interface which will supply things like a selection object |
| clicked | the initial point that the user depressed (in pt). |
Definition at line 27 of file ShapeMoveStrategy.cpp.
References KoShape::absolutePosition(), KoFlake::Center, KoFlake::HotPosition, KoShape::linearizeSubtree(), m_canvas, m_initialOffset, m_newPositions, m_previousPositions, m_selectedShapes, m_start, KoSelection::selectedEditableShapes(), KoToolBase::setStatusText(), and KoInteractionStrategy::tool().
|
inlineoverride |
Definition at line 37 of file ShapeMoveStrategy.h.
|
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 91 of file ShapeMoveStrategy.cpp.
References KoToolBase::canvas(), m_finalMove, m_newPositions, m_previousPositions, m_selectedShapes, KoSnapGuide::reset(), KoCanvasBase::snapGuide, and KoInteractionStrategy::tool().
|
overridevirtual |
Override to make final changes to the data on the end of an interaction.
Implements KoInteractionStrategy.
Definition at line 100 of file ShapeMoveStrategy.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 50 of file ShapeMoveStrategy.cpp.
References KoToolBase::canvas(), m_finalMove, m_initialOffset, m_selectedShapes, m_start, moveSelection(), KoSnapGuide::snap(), KoCanvasBase::snapGuide, snapToClosestAxis(), and KoInteractionStrategy::tool().
|
private |
Definition at line 70 of file ShapeMoveStrategy.cpp.
References KoShape::absolutePosition(), KoShape::boundingRect(), KoToolBase::canvas(), KoFlake::Center, KoCanvasBase::clipToDocument(), m_newPositions, m_previousPositions, m_selectedShapes, KoShapeContainer::model, KoShape::parent(), KoShapeContainerModel::proposeMove(), KoShape::setAbsolutePosition(), KoInteractionStrategy::tool(), and KoShape::updateAbsolute().
|
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 105 of file ShapeMoveStrategy.cpp.
|
private |
Definition at line 49 of file ShapeMoveStrategy.h.
|
private |
Definition at line 47 of file ShapeMoveStrategy.h.
|
private |
Definition at line 47 of file ShapeMoveStrategy.h.
|
private |
Definition at line 46 of file ShapeMoveStrategy.h.
|
private |
Definition at line 45 of file ShapeMoveStrategy.h.
Definition at line 48 of file ShapeMoveStrategy.h.
|
private |
Definition at line 47 of file ShapeMoveStrategy.h.