karbon
VPencilTool Class Reference
#include <vpenciltool.h>
Inheritance diagram for VPencilTool:

Detailed Description
The pencil tool.This tool has three modes of operation * Raw - exactly what is drawn by the user is what is captured * Straightend - captured data is straightended * Smooth - captured data is converted to a bezier curve
Definition at line 81 of file vpenciltool.h.
Public Types | |
enum | { RAW, STRAIGHT, CURVE } |
Public Member Functions | |
VPencilTool (KarbonView *view) | |
~VPencilTool () | |
virtual void | activate () |
virtual void | deactivate () |
virtual void | setup (KActionCollection *collection) |
virtual QString | uiname () |
virtual QString | contextHelp () |
virtual enumToolType | toolType () |
virtual bool | showDialog () const |
Protected Member Functions | |
void | draw () |
virtual void | mouseMove () |
virtual void | mouseButtonPress () |
virtual void | mouseButtonRelease () |
virtual void | mouseButtonDblClick () |
virtual void | mouseDrag () |
virtual void | mouseDragRelease () |
virtual void | mouseDragShiftPressed () |
virtual void | mouseDragCtrlPressed () |
virtual void | mouseDragShiftReleased () |
virtual void | mouseDragCtrlReleased () |
virtual void | cancel () |
virtual void | cancelStep () |
virtual void | accept () |
Protected Attributes | |
QPtrList< KoPoint > | m_Points |
KoPoint | m_lastVectorStart |
KoPoint | m_lastVectorEnd |
bool | m_close |
short | m_mode |
bool | m_optimize |
float | m_combineAngle |
VPencilOptionsWidget * | m_optionWidget |
Member Function Documentation
|
Terminates the current tool drawing (if any). This event is invoked when Enter/Return is pressed. Reimplemented from VTool. Definition at line 386 of file vpenciltool.cc. |
|
Called during the tool activation. A tool is supposed to set a mouse cursor and/or the statusbar properly here. Reimplemented from VTool. Definition at line 169 of file vpenciltool.cc. |
|
Cancels all tool operations. This event is invoked when ESC is pressed. Reimplemented from VTool. Definition at line 368 of file vpenciltool.cc. |
|
Cancels the last tool step (if any). This event is invoked when Backspace is pressed. Reimplemented from VTool. Definition at line 376 of file vpenciltool.cc. |
|
The context help of the tool.
Reimplemented from VTool. Definition at line 159 of file vpenciltool.cc. |
|
Deactivates the tool.
Reimplemented from VTool. Definition at line 181 of file vpenciltool.cc. |
|
Helper method: draws the polyline.
Reimplemented from VTool. Definition at line 273 of file vpenciltool.cc. |
|
Mouse button double click.
Reimplemented from VTool. Definition at line 322 of file vpenciltool.cc. |
|
Left mouse button press.
Reimplemented from VTool. Definition at line 305 of file vpenciltool.cc. |
|
Left mouse button release. The mouse wasn't moved. Reimplemented from VTool. Definition at line 313 of file vpenciltool.cc. |
|
Mouse drag.
Reimplemented from VTool. Definition at line 328 of file vpenciltool.cc. |
|
Mouse drag with "Ctrl" key pressed at the same time.
Reimplemented from VTool. Definition at line 352 of file vpenciltool.cc. |
|
"Ctrl" key released while mouse drag.
Reimplemented from VTool. Definition at line 363 of file vpenciltool.cc. |
|
Mouse button release. The mouse was moved before. Reimplemented from VTool. Definition at line 341 of file vpenciltool.cc. |
|
Mouse drag with "Shift" key pressed at the same time.
Reimplemented from VTool. Definition at line 347 of file vpenciltool.cc. |
|
"Shift" key released while mouse drag.
Reimplemented from VTool. Definition at line 358 of file vpenciltool.cc. |
|
Mouse move. No mouse button is pressed. Reimplemented from VTool. Definition at line 300 of file vpenciltool.cc. |
|
Called after tool creation. A tool is supposed to hook its associated action into the specified action collection here. Reimplemented from VTool. Definition at line 399 of file vpenciltool.cc. |
|
Shows the tools option dialog.
Reimplemented from VTool. Definition at line 393 of file vpenciltool.cc. |
|
The tool type.
Reimplemented from VTool. Definition at line 93 of file vpenciltool.h. |
|
The name of the tool.
Reimplemented from VTool. Definition at line 91 of file vpenciltool.h. |
Member Data Documentation
|
Indicates if the Line is to close.
Definition at line 142 of file vpenciltool.h. |
|
The end of the last drawn vector.
Definition at line 137 of file vpenciltool.h. |
|
The start of the last drawn vector.
Definition at line 132 of file vpenciltool.h. |
|
The mode of the pencile.
Definition at line 148 of file vpenciltool.h. |
|
The list of this polyline points.
Definition at line 127 of file vpenciltool.h. |
The documentation for this class was generated from the following files: