karbon
VTool Class Reference
#include <vtool.h>
Inheritance diagram for VTool:

Detailed Description
The base class for all karbon tools.Each tool has an icon, name and category. Basic mouse event and key handling is implemented here.
Definition at line 51 of file vtool.h.
Public Slots | |
virtual void | activate () |
Public Member Functions | |
VTool (KarbonView *view, const char *name) | |
virtual | ~VTool () |
virtual void | registerTool (VTool *tool) |
virtual void | deactivate () |
virtual bool | showDialog () const |
virtual QString | uiname () |
virtual QString | contextHelp () |
virtual enumToolType | toolType () |
virtual QString | statusText () |
virtual uint | priority () |
QString | icon () |
bool | mouseEvent (QMouseEvent *event, const KoPoint &) |
bool | keyEvent (QEvent *event) |
virtual void | refreshUnit () |
virtual void | setup (KActionCollection *) |
KRadioAction * | action () const |
virtual void | draw (VPainter *painter) |
Protected Member Functions | |
bool | isDragging () const |
virtual void | draw () |
virtual void | setCursor () const |
virtual void | mouseButtonPress () |
virtual void | rightMouseButtonPress () |
virtual void | mouseButtonRelease () |
virtual void | rightMouseButtonRelease () |
virtual void | mouseButtonDblClick () |
virtual void | mouseMove () |
virtual void | mouseDrag () |
virtual void | mouseDragRelease () |
virtual void | mouseDragShiftPressed () |
virtual void | mouseDragCtrlPressed () |
virtual void | mouseDragShiftReleased () |
virtual void | mouseDragCtrlReleased () |
virtual void | arrowKeyReleased (Qt::Key) |
virtual bool | keyReleased (Qt::Key) |
virtual void | cancel () |
virtual void | cancelStep () |
virtual void | accept () |
KarbonView * | view () const |
const KoPoint & | first () const |
const KoPoint & | last () const |
bool | shiftPressed () const |
bool | ctrlPressed () const |
bool | altPressed () const |
VToolController * | toolController () const |
Protected Attributes | |
KRadioAction * | m_action |
Constructor & Destructor Documentation
|
Constructs a new tool connected to the specified karbon view.
|
|
Destroys the tool and unregisters it from the connected part.
|
Member Function Documentation
|
Terminates the current tool drawing (if any). This event is invoked when Enter/Return is pressed. Reimplemented in VPencilTool, VPolylineTool, and VTextTool. |
|
Returns the tool's associated action object.
|
|
Called during the tool activation. A tool is supposed to set a mouse cursor and/or the statusbar properly here. Reimplemented in VImageTool, VZoomTool, VGradientTool, VPatternTool, VPencilTool, VPolylineTool, VRotateTool, VSelectNodesTool, VSelectTool, VShapeTool, VShearTool, and VTextTool. |
|
The status of the alt key.
|
|
"Arrow" key released up, down, left, right
Reimplemented in VPolygonTool, VSelectTool, VSpiralTool, and VStarTool. |
|
Cancels all tool operations. This event is invoked when ESC is pressed. Reimplemented in VEllipseTool, VGradientTool, VPatternTool, VPencilTool, VPolylineTool, VRotateTool, VSelectNodesTool, VSelectTool, VShapeTool, VShearTool, and VTextTool. |
|
Cancels the last tool step (if any). This event is invoked when Backspace is pressed. Reimplemented in VPencilTool, and VPolylineTool. |
|
The context help of the tool.
Reimplemented in VImageTool, VZoomTool, VGradientTool, VPatternTool, VPencilTool, VPolylineTool, VSelectTool, VShapeTool, and VTextTool. |
|
The status of the ctrl key.
|
|
Deactivates the tool.
Reimplemented in VImageTool, VZoomTool, VGradientTool, VPatternTool, VPencilTool, VPolylineTool, and VTextTool. |
|
Draws the actual tool state.
Reimplemented in VGradientTool, VPatternTool, and VTextTool. |
|
Most tools need to know the first mouse coordinate.
|
|
The tool icon name.
|
|
Returns the current dagging state.
|
|
This function processes every important key event. It then calls suiting functions like mouseButtonPress() so deriving tools don't need to directly deal with events themselves. |
|
Specified key released.
Reimplemented in VZoomTool, VGradientTool, VPatternTool, VSelectNodesTool, and VSelectTool. |
|
The last mouse coordinate.
|
|
Mouse button double click.
Reimplemented in VPencilTool, and VPolylineTool. |
|
Left mouse button press.
Reimplemented in VZoomTool, VEllipseTool, VGradientTool, VPatternTool, VPencilTool, VPolylineTool, VRotateTool, VSelectNodesTool, VSelectTool, VShapeTool, VShearTool, and VTextTool. |
|
Left mouse button release. The mouse wasn't moved. Reimplemented in VImageTool, VZoomTool, VEllipseTool, VGradientTool, VPatternTool, VPencilTool, VPolylineTool, VSelectNodesTool, VSelectTool, VShapeTool, and VTextTool. |
|
Mouse drag.
Reimplemented in VZoomTool, VGradientTool, VPatternTool, VPencilTool, VPolylineTool, VRotateTool, VSelectNodesTool, VSelectTool, VShapeTool, VShearTool, and VTextTool. |
|
Mouse drag with "Ctrl" key pressed at the same time.
Reimplemented in VPencilTool, VPolylineTool, VSelectTool, and VShapeTool. |
|
"Ctrl" key released while mouse drag.
Reimplemented in VPencilTool, VPolylineTool, VSelectTool, and VShapeTool. |
|
Mouse button release. The mouse was moved before. Reimplemented in VZoomTool, VEllipseTool, VGradientTool, VPatternTool, VPencilTool, VPolylineTool, VRotateTool, VSelectNodesTool, VSelectTool, VShapeTool, VShearTool, and VTextTool. |
|
Mouse drag with "Shift" key pressed at the same time.
Reimplemented in VPencilTool, VPolylineTool, VSelectTool, VShapeTool, and VTextTool. |
|
"Shift" key released while mouse drag.
Reimplemented in VPencilTool, VPolylineTool, VSelectTool, VShapeTool, and VTextTool. |
|
This function processes every important mouse event. It then calls suiting functions like mouseMoved() so deriving tools don't need to directly deal with events themselves. |
|
Mouse move. No mouse button is pressed. Reimplemented in VEllipseTool, VPencilTool, and VPolylineTool. |
|
Position in toolbox. Zero means no preferred position, other values indicate the true position. Reimplemented in VRotateTool, VSelectNodesTool, VSelectTool, and VShearTool. |
|
This function is called when the documents unit setting were changed.
Reimplemented in VEllipseTool, VPolygonTool, VRectangleTool, VRoundRectTool, VSelectTool, VSinusTool, VSpiralTool, and VStarTool. |
|
Registers the specified tool at the connected part. Tools should register themselves by calling this function.
|
|
Right mouse button press.
Reimplemented in VSelectNodesTool, and VSelectTool. |
|
Right mouse button release. The mouse wasn't moved. Reimplemented in VZoomTool, VPolylineTool, VSelectNodesTool, and VSelectTool. |
|
This function is called on each mouse event the tool receives.
Reimplemented in VGradientTool, VPatternTool, VSelectNodesTool, VSelectTool, and VShearTool. |
|
Called after tool creation. A tool is supposed to hook its associated action into the specified action collection here. Reimplemented in VImageTool, VZoomTool, VEllipseTool, VGradientTool, VPatternTool, VPencilTool, VPolygonTool, VPolylineTool, VRectangleTool, VRotateTool, VRoundRectTool, VSelectNodesTool, VSelectTool, VShearTool, VSinusTool, VSpiralTool, VStarTool, and VTextTool. |
|
The status of the shift key.
|
|
Shows the tools option dialog.
Reimplemented in VEllipseTool, VGradientTool, VPatternTool, VPencilTool, VPolygonTool, VRectangleTool, VRoundRectTool, VSelectTool, VSinusTool, VSpiralTool, VStarTool, and VTextTool. |
|
The tool status text.
Reimplemented in VImageTool, VZoomTool, VGradientTool, VRotateTool, VSelectNodesTool, VSelectTool, VShapeTool, and VShearTool. |
|
Helper function. Returns the parent view's toolcontroller. |
|
The tool type.
Reimplemented in VPencilTool, VPolylineTool, VRotateTool, VSelectNodesTool, VSelectTool, VShapeTool, and VShearTool. |
|
The name of the tool.
Reimplemented in VImageTool, VZoomTool, VEllipseTool, VGradientTool, VPatternTool, VPencilTool, VPolygonTool, VPolylineTool, VRectangleTool, VRotateTool, VRoundRectTool, VSelectNodesTool, VSelectTool, VShearTool, VSinusTool, VSpiralTool, VStarTool, and VTextTool. |
|
Returns the connected karbon view.
|
Member Data Documentation
|
The tool's action object.
|
The documentation for this class was generated from the following files: