Krita Source Code Documentation
Loading...
Searching...
No Matches
SvgSelectTextStrategy Class Reference

#include <SvgSelectTextStrategy.h>

+ Inheritance diagram for SvgSelectTextStrategy:

Public Member Functions

void cancelInteraction () override
 
KUndo2CommandcreateCommand () override
 
void finishInteraction (Qt::KeyboardModifiers modifiers) override
 
void handleMouseMove (const QPointF &mouseLocation, Qt::KeyboardModifiers modifiers) override
 
 SvgSelectTextStrategy (KoToolBase *tool, SvgTextCursor *cursor, const QPointF &clicked)
 
 ~SvgSelectTextStrategy () override=default
 
- Public Member Functions inherited from KoInteractionStrategy
 KoInteractionStrategy (KoToolBase *parent)
 constructor
 
virtual void paint (QPainter &painter, const KoViewConverter &converter)
 
KoToolBasetool () const
 
virtual ~KoInteractionStrategy ()
 Destructor.
 

Private Attributes

SvgTextCursorm_cursor
 
QPointF m_dragEnd
 
QPointF m_dragStart
 

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
KoInteractionStrategyPrivated_ptr
 

Detailed Description

Definition at line 14 of file SvgSelectTextStrategy.h.

Constructor & Destructor Documentation

◆ SvgSelectTextStrategy()

SvgSelectTextStrategy::SvgSelectTextStrategy ( KoToolBase * tool,
SvgTextCursor * cursor,
const QPointF & clicked )

Definition at line 10 of file SvgSelectTextStrategy.cpp.

12 , m_cursor(cursor)
13 , m_dragStart(clicked)
14{
17}
KoInteractionStrategy(KoToolBase *parent)
constructor
void setPosToPoint(QPointF point, bool moveAnchor=true)
Set the pos from a point. This currently does a search inside the text shape.

References m_cursor, m_dragEnd, m_dragStart, and SvgTextCursor::setPosToPoint().

◆ ~SvgSelectTextStrategy()

SvgSelectTextStrategy::~SvgSelectTextStrategy ( )
overridedefault

Member Function Documentation

◆ cancelInteraction()

void SvgSelectTextStrategy::cancelInteraction ( )
overridevirtual

This method will undo frames based interactions by calling createCommand() and unexecuting that.

Reimplemented from KoInteractionStrategy.

Definition at line 32 of file SvgSelectTextStrategy.cpp.

33{
34 return;
35}

◆ createCommand()

KUndo2Command * SvgSelectTextStrategy::createCommand ( )
overridevirtual

For interactions that are undo-able this method should be implemented to return such a command. Implementations should return 0 otherwise.

Returns
a command, or 0.

Implements KoInteractionStrategy.

Definition at line 27 of file SvgSelectTextStrategy.cpp.

28{
29 return nullptr;
30}

◆ finishInteraction()

void SvgSelectTextStrategy::finishInteraction ( Qt::KeyboardModifiers modifiers)
overridevirtual

Override to make final changes to the data on the end of an interaction.

Implements KoInteractionStrategy.

Definition at line 37 of file SvgSelectTextStrategy.cpp.

38{
39 Q_UNUSED(modifiers)
42}

References m_cursor, m_dragEnd, m_dragStart, and SvgTextCursor::setPosToPoint().

◆ handleMouseMove()

void SvgSelectTextStrategy::handleMouseMove ( const QPointF & mouseLocation,
Qt::KeyboardModifiers modifiers )
overridevirtual

Extending classes should implement this method to update the selectedShapes based on the new mouse position.

Parameters
mouseLocationthe new location in pt
modifiersOR-ed set of keys pressed.

Implements KoInteractionStrategy.

Definition at line 19 of file SvgSelectTextStrategy.cpp.

20{
21 Q_UNUSED(modifiers)
22 m_dragEnd = mouseLocation;
25}

References m_cursor, m_dragEnd, m_dragStart, and SvgTextCursor::setPosToPoint().

Member Data Documentation

◆ m_cursor

SvgTextCursor* SvgSelectTextStrategy::m_cursor
private

Definition at line 26 of file SvgSelectTextStrategy.h.

◆ m_dragEnd

QPointF SvgSelectTextStrategy::m_dragEnd
private

Definition at line 28 of file SvgSelectTextStrategy.h.

◆ m_dragStart

QPointF SvgSelectTextStrategy::m_dragStart
private

Definition at line 27 of file SvgSelectTextStrategy.h.


The documentation for this class was generated from the following files: