CanvasManipulator Class Reference

#include <canvasmanipulator.h>

Inheritance diagram for CanvasManipulator:

Inheritance graph
[legend]
Collaboration diagram for CanvasManipulator:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Type {
  RepeatedItemAdd, RightClick, AutoConnector, ManualConnector,
  ItemMove, ItemResize, MechItemMove, Select,
  CanvasResize, ItemDrag, Draw
}

Public Member Functions

 CanvasManipulator (ItemDocument *itemDocument, CMManager *cmManager)
virtual ~CanvasManipulator ()
virtual Type type () const=0
virtual bool mousePressedInitial (const EventInfo &)
virtual bool mousePressedRepeat (const EventInfo &)
virtual bool mouseMoved (const EventInfo &)
virtual bool mouseReleased (const EventInfo &)

Protected Attributes

Type m_type
EventInfo m_eventInfo
QPoint m_prevPos
ItemDocumentp_itemDocument
ICNDocumentp_icnDocument
MechanicsDocumentp_mechanicsDocument
QCanvas * p_canvas
ItemGroupp_selectList
CNItemGroupp_cnItemSelectList
MechanicsGroupp_mechItemSelectList
CNItemp_cnItemClickedOn
MechanicsItemp_mechanicsItemClickedOn
CMManagerp_cmManager

Detailed Description

Abstract class for a "editing operation" on the ICNDocument, such as moving an item or resizing the canvas
Author:
David Saxton

Definition at line 169 of file canvasmanipulator.h.


Member Function Documentation

virtual bool CanvasManipulator::mousePressedInitial ( const EventInfo  )  [inline, virtual]

Called when the user single-clicks the mouse

Returns:
true if the manipulation operation has finished

Reimplemented in CMRepeatedItemAdd, CMRightClick, CMAutoConnector, CMManualConnector, CMItemMove, CMItemResize, CMMechItemMove, CMSelect, CMItemDrag, and CMDraw.

Definition at line 193 of file canvasmanipulator.h.

Referenced by CMManager::mousePressEvent().

virtual bool CanvasManipulator::mousePressedRepeat ( const EventInfo  )  [inline, virtual]

Called when the user single-clicks the mouse after the first time (only applicable for those operations who are not oneClick

Returns:
true if the manipulation operation has finished

Reimplemented in CMRepeatedItemAdd, and CMManualConnector.

Definition at line 199 of file canvasmanipulator.h.

Referenced by CMManager::mousePressEvent().

virtual bool CanvasManipulator::mouseMoved ( const EventInfo  )  [inline, virtual]

Called when the user moves the mouse

Returns:
true if the manipulation operation has finished

Reimplemented in CMRepeatedItemAdd, CMRightClick, CMAutoConnector, CMManualConnector, CMItemMove, CMItemResize, CMMechItemMove, CMSelect, CMItemDrag, and CMDraw.

Definition at line 204 of file canvasmanipulator.h.

Referenced by CMManager::mouseMoveEvent().

virtual bool CanvasManipulator::mouseReleased ( const EventInfo  )  [inline, virtual]

Called when the user releases the mouse

Returns:
true if the manipulation operation has finished

Reimplemented in CMRepeatedItemAdd, CMRightClick, CMAutoConnector, CMManualConnector, CMItemMove, CMItemResize, CMMechItemMove, CMSelect, CMItemDrag, and CMDraw.

Definition at line 209 of file canvasmanipulator.h.

Referenced by CMManager::mouseReleaseEvent().


The documentation for this class was generated from the following files:
Generated on Tue May 8 17:05:35 2007 for KTechLab by  doxygen 1.5.1