Référence de la classe KoInteractionStrategy

#include <KoInteractionStrategy.h>

Graphe d'héritage de KoInteractionStrategy:

[légende]
Graphe de collaboration de KoInteractionStrategy:
[légende]
Liste de tous les membres

Fonctions membres publiques

virtual ~KoInteractionStrategy ()
 Destructor.
virtual void paint (QPainter &painter, KoViewConverter &converter)
virtual void handleMouseMove (const QPointF &mouseLocation, Qt::KeyboardModifiers modifiers)=0
virtual KCommand * createCommand ()=0
void cancelInteraction ()
virtual void finishInteraction (Qt::KeyboardModifiers modifiers)=0

Fonctions membres publiques statiques

static KoInteractionStrategycreateStrategy (KoPointerEvent *event, KoInteractionTool *parentTool, KoCanvasBase *canvas)

Fonctions membres protégées

 KoInteractionStrategy (KoTool *parent, KoCanvasBase *canvas)
 protected constructor. Use the createStrategy method()
void applyGrid (QPointF &point)

Attributs protégés

KoToolm_parent
 the KoTool instance that controls this strategy.
KoSelectionSet m_selectedShapes
 the objects this strategy will act on.
KoCanvasBasem_canvas
 the canvas which contains getters for document-data

Description détaillée

Abstract interface to define what actions a KoInteractionTool can do based on the Strategy design. e.g, move, select, transform.

KoInteractionStrategy is a Strategy for the KoInteractionTool and it defines the behavior in case the user clicks or drags the mouse. The strategy is created in the createPolicy() function which defines the resulting behavior and initiates a move or a resize, for example. The mouseMove events are forwarded to the handleMouseMove() method and the interaction is either finished with finishInteraction() or cancelInteraction() (never both).

Définition à la ligne 47 du fichier KoInteractionStrategy.h.


Documentation des contructeurs et destructeur

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

Destructor.

Définition à la ligne 51 du fichier KoInteractionStrategy.h.

KoInteractionStrategy::KoInteractionStrategy ( KoTool parent,
KoCanvasBase canvas 
) [protected]

protected constructor. Use the createStrategy method()

Définition à la ligne 47 du fichier KoInteractionStrategy.cpp.


Documentation des fonctions membres

virtual void KoInteractionStrategy::paint ( QPainter &  painter,
KoViewConverter converter 
) [inline, virtual]

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

Réimplémentée dans KoShapeMoveStrategy, KoShapeResizeStrategy, KoShapeRotateStrategy, KoShapeRubberSelectStrategy, et KoShapeShearStrategy.

Définition à la ligne 57 du fichier KoInteractionStrategy.h.

Référencé par KoPathTool::paint(), KoInteractionTool::paint(), et KoCreateShapesTool::paint().

Voici le graphe d'appel pour cette fonction :

virtual void KoInteractionStrategy::handleMouseMove ( const QPointF &  mouseLocation,
Qt::KeyboardModifiers  modifiers 
) [pure virtual]

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

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

Implémenté dans KoParameterChangeStrategy, KoPathControlPointMoveStrategy, KoPathPointMoveStrategy, KoShapeMoveStrategy, KoShapeResizeStrategy, KoShapeRotateStrategy, KoShapeRubberSelectStrategy, et KoShapeShearStrategy.

Référencé par KoPathTool::keyPressEvent(), KoInteractionTool::keyPressEvent(), KoPathTool::keyReleaseEvent(), KoInteractionTool::keyReleaseEvent(), KoPathTool::mouseMoveEvent(), et KoInteractionTool::mouseMoveEvent().

Voici le graphe d'appel pour cette fonction :

virtual KCommand* KoInteractionStrategy::createCommand (  )  [pure virtual]

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

Renvoie:
a command, or 0.

Implémenté dans KoCreateShapeStrategy, KoParameterChangeStrategy, KoPathControlPointMoveStrategy, KoPathPointMoveStrategy, KoShapeMoveStrategy, KoShapeResizeStrategy, KoShapeRotateStrategy, KoShapeRubberSelectStrategy, et KoShapeShearStrategy.

Référencé par cancelInteraction(), KoPathTool::mouseReleaseEvent(), et KoInteractionTool::mouseReleaseEvent().

Voici le graphe d'appel pour cette fonction :

void KoInteractionStrategy::cancelInteraction (  ) 

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

Définition à la ligne 39 du fichier KoInteractionStrategy.cpp.

Références createCommand().

Référencé par KoPathTool::keyPressEvent(), et KoInteractionTool::keyReleaseEvent().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :

virtual void KoInteractionStrategy::finishInteraction ( Qt::KeyboardModifiers  modifiers  )  [pure virtual]

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

Implémenté dans KoCreateShapeStrategy, KoParameterChangeStrategy, KoPathControlPointMoveStrategy, KoPathPointMoveStrategy, KoPathPointRubberSelectStrategy, KoShapeMoveStrategy, KoShapeResizeStrategy, KoShapeRotateStrategy, KoShapeRubberSelectStrategy, et KoShapeShearStrategy.

Référencé par KoPathTool::mouseReleaseEvent(), et KoInteractionTool::mouseReleaseEvent().

Voici le graphe d'appel pour cette fonction :

KoInteractionStrategy * KoInteractionStrategy::createStrategy ( KoPointerEvent event,
KoInteractionTool parentTool,
KoCanvasBase canvas 
) [static]

This instanciates a new strategy object and decides which one created based on the params.

Définition à la ligne 54 du fichier KoInteractionStrategy.cpp.

Références KoFlake::BottomMiddleHandle, KoSelection::boundingRect(), KoPointerEvent::buttons(), KoSelection::deselect(), KoSelection::deselectAll(), KoInteractionTool::handleAt(), KoShape::isLocked(), KoSelection::isSelected(), KoShape::isVisible(), KoFlake::LeftMiddleHandle, KoPointerEvent::modifiers(), KoFlake::NextUnselected, KoFlake::NoHandle, KoPointerEvent::point, KoInteractionTool::repaintDecorations(), KoFlake::RightMiddleHandle, KoSelection::select(), KoSelection::selectedShapes(), KoShapeManager::selection(), KoShapeManager::shapeAt(), KoCanvasBase::shapeManager(), KoFlake::ShapeOnTop, et KoFlake::TopMiddleHandle.

Référencé par KoInteractionTool::mousePressEvent().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :

void KoInteractionStrategy::applyGrid ( QPointF &  point  )  [protected]

Apply the grid settings to the argument point.

Paramètres:
point this point will be changed to end up on the grid.

Définition à la ligne 116 du fichier KoInteractionStrategy.cpp.

Références KoCanvasBase::gridSize(), et m_canvas.

Référencé par KoShapeResizeStrategy::handleMouseMove(), et KoShapeMoveStrategy::handleMouseMove().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :


Documentation des données membres

KoTool* KoInteractionStrategy::m_parent [protected]

the KoTool instance that controls this strategy.

Définition à la ligne 98 du fichier KoInteractionStrategy.h.

Référencé par KoCreateShapeStrategy::createCommand(), et KoShapeRubberSelectStrategy::finishInteraction().

KoSelectionSet KoInteractionStrategy::m_selectedShapes [protected]

the objects this strategy will act on.

Définition à la ligne 99 du fichier KoInteractionStrategy.h.

Référencé par KoShapeShearStrategy::createCommand(), KoShapeRotateStrategy::createCommand(), KoShapeResizeStrategy::createCommand(), KoShapeMoveStrategy::createCommand(), KoShapeShearStrategy::handleMouseMove(), KoShapeRotateStrategy::handleMouseMove(), KoShapeResizeStrategy::handleMouseMove(), KoShapeMoveStrategy::handleMouseMove(), KoShapeMoveStrategy::KoShapeMoveStrategy(), KoShapeResizeStrategy::KoShapeResizeStrategy(), KoShapeRotateStrategy::KoShapeRotateStrategy(), et KoShapeShearStrategy::KoShapeShearStrategy().

KoCanvasBase* KoInteractionStrategy::m_canvas [protected]

the canvas which contains getters for document-data

Définition à la ligne 100 du fichier KoInteractionStrategy.h.

Référencé par applyGrid(), KoCreateShapeStrategy::createCommand(), KoShapeRubberSelectStrategy::finishInteraction(), KoPathPointRubberSelectStrategy::finishInteraction(), KoCreateShapeStrategy::finishInteraction(), KoShapeShearStrategy::handleMouseMove(), KoShapeRubberSelectStrategy::handleMouseMove(), KoShapeRotateStrategy::handleMouseMove(), KoShapeResizeStrategy::handleMouseMove(), KoShapeMoveStrategy::handleMouseMove(), KoShapeShearStrategy::paint(), KoShapeRotateStrategy::paint(), KoShapeResizeStrategy::paint(), et KoShapeMoveStrategy::paint().


La documentation de cette classe a été générée à partir des fichiers suivants :
Généré le Wed Nov 22 23:46:09 2006 pour KPlato par  doxygen 1.5.1-p1