karbon
VPolylineTool Class Reference
#include <vpolylinetool.h>
Inheritance diagram for VPolylineTool:

Detailed Description
The polyline tool.When the tool is activated, you draw your polyline until the tool is deactivated. When the mouse button is pressed, you add a Bezier node and sets the vector by dragging it. While dragging, when you press on CTRL, you edit the other vector, and when you press on SHIFT the current segment, the segment becames a line.
Definition at line 49 of file vpolylinetool.h.
Public Member Functions | |
VPolylineTool (KarbonView *view) | |
~VPolylineTool () | |
virtual void | setup (KActionCollection *collection) |
virtual void | activate () |
virtual void | deactivate () |
virtual QString | uiname () |
virtual QString | contextHelp () |
virtual enumToolType | toolType () |
Protected Slots | |
void | commandExecuted () |
Protected Member Functions | |
void | draw () |
void | drawBezierVector (KoPoint &start, KoPoint &end) |
virtual void | mouseMove () |
virtual void | mouseButtonPress () |
virtual void | mouseButtonRelease () |
virtual void | rightMouseButtonRelease () |
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_bezierPoints |
KoPoint | m_lastVectorStart |
KoPoint | m_lastVectorEnd |
bool | m_close |
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 474 of file vpolylinetool.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 70 of file vpolylinetool.cc. |
|
Cancels all tool operations. This event is invoked when ESC is pressed. Reimplemented from VTool. Definition at line 440 of file vpolylinetool.cc. |
|
Cancels the last tool step (if any). This event is invoked when Backspace is pressed. Reimplemented from VTool. Definition at line 448 of file vpolylinetool.cc. |
|
The context help of the tool.
Reimplemented from VTool. Definition at line 56 of file vpolylinetool.cc. |
|
Deactivates the tool.
Reimplemented from VTool. Definition at line 83 of file vpolylinetool.cc. |
|
Helper method: draws the polyline.
Reimplemented from VTool. Definition at line 140 of file vpolylinetool.cc. |
|
Helper method: draws a bezier vector.
Definition at line 168 of file vpolylinetool.cc. |
|
Mouse button double click.
Reimplemented from VTool. Definition at line 334 of file vpolylinetool.cc. |
|
Left mouse button press.
Reimplemented from VTool. Definition at line 232 of file vpolylinetool.cc. |
|
Left mouse button release. The mouse wasn't moved. Reimplemented from VTool. Definition at line 252 of file vpolylinetool.cc. |
|
Mouse drag.
Reimplemented from VTool. Definition at line 340 of file vpolylinetool.cc. |
|
Mouse drag with "Ctrl" key pressed at the same time.
Reimplemented from VTool. Definition at line 410 of file vpolylinetool.cc. |
|
"Ctrl" key released while mouse drag.
Reimplemented from VTool. Definition at line 428 of file vpolylinetool.cc. |
|
Mouse button release. The mouse was moved before. Reimplemented from VTool. Definition at line 399 of file vpolylinetool.cc. |
|
Mouse drag with "Shift" key pressed at the same time.
Reimplemented from VTool. Definition at line 405 of file vpolylinetool.cc. |
|
"Shift" key released while mouse drag.
Reimplemented from VTool. Definition at line 423 of file vpolylinetool.cc. |
|
Mouse move. No mouse button is pressed. Reimplemented from VTool. Definition at line 215 of file vpolylinetool.cc. |
|
Right mouse button release. The mouse wasn't moved. Reimplemented from VTool. Definition at line 327 of file vpolylinetool.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 480 of file vpolylinetool.cc. |
|
The tool type.
Reimplemented from VTool. Definition at line 63 of file vpolylinetool.h. |
|
The name of the tool.
Reimplemented from VTool. Definition at line 61 of file vpolylinetool.h. |
Member Data Documentation
|
The list of this polyline points.
Definition at line 95 of file vpolylinetool.h. |
|
Indicates if the polyline is to close.
Definition at line 110 of file vpolylinetool.h. |
|
The end of the last drawn vector.
Definition at line 105 of file vpolylinetool.h. |
|
The start of the last drawn vector.
Definition at line 100 of file vpolylinetool.h. |
The documentation for this class was generated from the following files: