Tool Class Reference

Base class for tools, which are basically plug-in event handlers that the user selects from the toolbar. More...

#include <tool.h>

Collaboration diagram for Tool:

Collaboration graph
[legend]

List of all members.

Signals

void activated ()
 Signal from the activate() method.

Public Member Functions

 Tool (PDFScene *scn)
virtual void mouseMoveEvent (QGraphicsSceneMouseEvent *ev)=0
virtual void mousePressEvent (QGraphicsSceneMouseEvent *ev)=0
virtual void mouseReleaseEvent (QGraphicsSceneMouseEvent *ev)=0
virtual void mouseLeftClickEvent (QGraphicsSceneMouseEvent *ev)=0
virtual void activate ()=0
 Activate this Tool: set it to the current one in the Scene, set an appropriate cursor, emit activated(), etc.

Protected Attributes

PDFScenescene
 The scene to which this tool belongs, as given in the constructor.


Detailed Description

Base class for tools, which are basically plug-in event handlers that the user selects from the toolbar.

A Tool receives events from the Scene and implements the appropriate behavior. At most, one Tool per Scene is active at a time. (If no Tool is active, the default View/Scene behavior occurs when handling mouse events.)

Definition at line 17 of file tool.h.


Constructor & Destructor Documentation

Tool::Tool ( PDFScene scn  ) 

Definition at line 4 of file tool.cpp.


Member Function Documentation

virtual void Tool::activate (  )  [pure virtual]

Activate this Tool: set it to the current one in the Scene, set an appropriate cursor, emit activated(), etc.

Implemented in BoxTool, and SelectTool.

void Tool::activated (  )  [signal]

Signal from the activate() method.

(Each subclass must emit this signal.)

Referenced by SelectTool::activate().

Here is the caller graph for this function:

virtual void Tool::mouseLeftClickEvent ( QGraphicsSceneMouseEvent *  ev  )  [pure virtual]

Implemented in BoxTool, and SelectTool.

Referenced by PDFScene::mouseReleaseEvent().

Here is the caller graph for this function:

virtual void Tool::mouseMoveEvent ( QGraphicsSceneMouseEvent *  ev  )  [pure virtual]

Implemented in BoxTool, and SelectTool.

Referenced by PDFScene::mouseMoveEvent().

Here is the caller graph for this function:

virtual void Tool::mousePressEvent ( QGraphicsSceneMouseEvent *  ev  )  [pure virtual]

Implemented in BoxTool, and SelectTool.

Referenced by PDFScene::mousePressEvent().

Here is the caller graph for this function:

virtual void Tool::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  ev  )  [pure virtual]

Implemented in BoxTool, and SelectTool.

Referenced by PDFScene::mouseReleaseEvent().

Here is the caller graph for this function:


Member Data Documentation

PDFScene* Tool::scene [protected]


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

Generated on Tue Sep 8 15:09:51 2009 for Taborca by  doxygen 1.5.8