libs/flake

KoCreateShapeStrategy Class Reference

A strategy for the KoCreateShapesTool. More...

#include <KoCreateShapeStrategy.h>

Inheritance diagram for KoCreateShapeStrategy:

List of all members.

Public Member Functions

 KoCreateShapeStrategy (KoCreateShapesTool *tool, KoCanvasBase *canvas, const QPointF &clicked)
virtual ~KoCreateShapeStrategy ()
QUndoCommandcreateCommand ()
void finishInteraction (Qt::KeyboardModifiers modifiers)
void handleMouseMove (const QPointF &mouseLocation, Qt::KeyboardModifiers modifiers)
void paint (QPainter &painter, const KoViewConverter &converter)

Detailed Description

A strategy for the KoCreateShapesTool.

Definition at line 35 of file KoCreateShapeStrategy.h.


Constructor & Destructor Documentation

KoCreateShapeStrategy::KoCreateShapeStrategy ( KoCreateShapesTool tool,
KoCanvasBase canvas,
const QPointF clicked 
)

Constructor that starts to create a new shape.

Parameters:
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 32 of file KoCreateShapeStrategy.cpp.

virtual KoCreateShapeStrategy::~KoCreateShapeStrategy (  )  [inline, virtual]

Definition at line 45 of file KoCreateShapeStrategy.h.


Member Function Documentation

QUndoCommand * KoCreateShapeStrategy::createCommand (  )  [virtual]

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.

Reimplemented from KoShapeRubberSelectStrategy.

Definition at line 55 of file KoCreateShapeStrategy.cpp.

void KoCreateShapeStrategy::finishInteraction ( Qt::KeyboardModifiers  modifiers  )  [virtual]

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

Reimplemented from KoShapeRubberSelectStrategy.

Definition at line 89 of file KoCreateShapeStrategy.cpp.

void KoCreateShapeStrategy::handleMouseMove ( const QPointF mouseLocation,
Qt::KeyboardModifiers  modifiers 
) [virtual]

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

Parameters:
mouseLocation the new location in pt
modifiers OR-ed set of keys pressed.

Reimplemented from KoShapeRubberSelectStrategy.

Definition at line 126 of file KoCreateShapeStrategy.cpp.

void KoCreateShapeStrategy::paint ( QPainter painter,
const KoViewConverter converter 
) [virtual]

Reimplement this if the action needs to draw a "blob" on the canvas; that is, a transient decoration like a rubber band.

Reimplemented from KoShapeRubberSelectStrategy.

Definition at line 95 of file KoCreateShapeStrategy.cpp.


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