kword
InteractionPolicy Class Reference
#include <KWCanvas.h>
Inheritance diagram for InteractionPolicy:

Detailed Description
Interaction policy defines the behavior in case the user clicks or drags the mouse.The InteractionPolicy is created in the createPolicy() function which defines the resulting behavior and initiates a frame-move or a frame-resize, for example. The canvas forwards mouseMove events to the handleMouseMove() method and the interaction is either finished with finishInteraction() or cancelInteraction() (never both).
Definition at line 378 of file KWCanvas.h.
Public Member Functions | |
virtual void | handleMouseMove (Qt::ButtonState keyState, const KoPoint &point)=0 |
virtual KCommand * | createCommand ()=0 |
void | cancelInteraction () |
virtual void | finishInteraction ()=0 |
void | hadDragEvents () |
bool | gotDragEvents () |
Static Public Member Functions | |
static InteractionPolicy * | createPolicy (KWCanvas *parent, MouseMeaning meaning, KoPoint &point, Qt::ButtonState buttonState, Qt::ButtonState keyState) |
Protected Member Functions | |
InteractionPolicy (KWCanvas *parent, bool doInit=true, bool includeInlineFrames=false) | |
Protected Attributes | |
QValueList< FrameIndex > | m_indexFrame |
KWCanvas * | m_parent |
QValueList< KWFrame * > | m_frames |
Constructor & Destructor Documentation
|
Constructor.
Definition at line 2025 of file KWCanvas.cpp. |
Member Function Documentation
|
This method will undo frames based interactions by calling createCommand() and unexecuting that.
Definition at line 2096 of file KWCanvas.cpp. |
|
For interactions that are undo-able this method should be implemented to return such a command. Implementations should return 0 otherwise.
Implemented in FrameResizePolicy, FrameMovePolicy, and FrameSelectPolicy. |
|
This instanciates a new policy object and decides which policy is created based on the params.
Definition at line 2047 of file KWCanvas.cpp. |
|
Override to make final changes to the data on the end of an interaction.
Implemented in FrameResizePolicy, FrameMovePolicy, and FrameSelectPolicy. |
|
Extending classes should implement this method to alter the frames or other data based on the new mouse position.
Implemented in FrameResizePolicy, FrameMovePolicy, and FrameSelectPolicy. |
The documentation for this class was generated from the following files: