#include <vpolylinetool.h>
Public Member Functions | |
| VPolylineTool (KarbonView *view) | |
| virtual void | setup (TDEActionCollection *collection) |
| virtual void | activate () |
| virtual void | deactivate () |
| virtual TQString | uiname () |
| virtual TQString | contextHelp () |
| virtual enumToolType | toolType () |
Public Member Functions inherited from VTool | |
| VTool (KarbonView *view, const char *name) | |
| virtual | ~VTool () |
| virtual void | registerTool (VTool *tool) |
| virtual bool | showDialog () const |
| virtual TQString | statusText () |
| virtual uint | priority () |
| TQString | icon () |
| bool | mouseEvent (TQMouseEvent *event, const KoPoint &) |
| bool | keyEvent (TQEvent *event) |
| virtual void | refreshUnit () |
| TDERadioAction * | action () const |
| virtual void | draw (VPainter *painter) |
Protected Slots | |
| void | commandExecuted () |
Protected Member Functions | |
| void | draw () |
| void | drawBezierVector (KoPoint &start, KoPoint &end) |
| void | createObject () |
| void | initializePath (VPath &path) |
| 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 Member Functions inherited from VTool | |
| bool | isDragging () const |
| virtual void | setCursor () const |
| virtual void | rightMouseButtonPress () |
| virtual void | arrowKeyReleased (TQt::Key) |
| virtual bool | keyReleased (TQt::Key) |
| 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 | |
| TQPtrList< KoPoint > | m_bezierPoints |
| KoPoint | m_lastVectorStart |
| KoPoint | m_lastVectorEnd |
| bool | m_close |
Protected Attributes inherited from VTool | |
| TDERadioAction * | m_action |
Additional Inherited Members | |
Public Slots inherited from VTool |
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.
Constructor & Destructor Documentation
◆ VPolylineTool()
| VPolylineTool::VPolylineTool | ( | KarbonView * | view | ) |
Definition at line 42 of file vpolylinetool.cpp.
◆ ~VPolylineTool()
| VPolylineTool::~VPolylineTool | ( | ) |
Definition at line 50 of file vpolylinetool.cpp.
Member Function Documentation
◆ accept()
|
protectedvirtual |
Terminates the current tool drawing (if any).
This event is invoked when Enter/Return is pressed.
Reimplemented from VTool.
Definition at line 477 of file vpolylinetool.cpp.
◆ activate()
|
virtual |
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.cpp.
◆ cancel()
|
protectedvirtual |
Cancels all tool operations.
This event is invoked when ESC is pressed.
Reimplemented from VTool.
Definition at line 443 of file vpolylinetool.cpp.
◆ cancelStep()
|
protectedvirtual |
Cancels the last tool step (if any).
This event is invoked when Backspace is pressed.
Reimplemented from VTool.
Definition at line 451 of file vpolylinetool.cpp.
◆ commandExecuted
|
protectedslot |
Definition at line 499 of file vpolylinetool.cpp.
◆ contextHelp()
|
virtual |
The context help of the tool.
Reimplemented from VTool.
Definition at line 56 of file vpolylinetool.cpp.
◆ createObject()
|
protected |
Creates the polyline from the bezier points.
Definition at line 114 of file vpolylinetool.cpp.
◆ deactivate()
|
virtual |
◆ draw()
|
protectedvirtual |
Helper method: draws the polyline.
Reimplemented from VTool.
Definition at line 152 of file vpolylinetool.cpp.
◆ drawBezierVector()
|
protected |
Helper method: draws a bezier vector.
Definition at line 168 of file vpolylinetool.cpp.
◆ initializePath()
|
protected |
Initializes the specified path with the actual bezier points.
Definition at line 83 of file vpolylinetool.cpp.
◆ mouseButtonDblClick()
|
protectedvirtual |
Mouse button double click.
Reimplemented from VTool.
Definition at line 337 of file vpolylinetool.cpp.
◆ mouseButtonPress()
|
protectedvirtual |
Left mouse button press.
Reimplemented from VTool.
Definition at line 232 of file vpolylinetool.cpp.
◆ mouseButtonRelease()
|
protectedvirtual |
Left mouse button release.
The mouse wasn't moved.
Reimplemented from VTool.
Definition at line 252 of file vpolylinetool.cpp.
◆ mouseDrag()
|
protectedvirtual |
◆ mouseDragCtrlPressed()
|
protectedvirtual |
Mouse drag with "Ctrl" key pressed at the same time.
Reimplemented from VTool.
Definition at line 413 of file vpolylinetool.cpp.
◆ mouseDragCtrlReleased()
|
protectedvirtual |
"Ctrl" key released while mouse drag.
Reimplemented from VTool.
Definition at line 431 of file vpolylinetool.cpp.
◆ mouseDragRelease()
|
protectedvirtual |
Mouse button release.
The mouse was moved before.
Reimplemented from VTool.
Definition at line 402 of file vpolylinetool.cpp.
◆ mouseDragShiftPressed()
|
protectedvirtual |
Mouse drag with "Shift" key pressed at the same time.
Reimplemented from VTool.
Definition at line 408 of file vpolylinetool.cpp.
◆ mouseDragShiftReleased()
|
protectedvirtual |
"Shift" key released while mouse drag.
Reimplemented from VTool.
Definition at line 426 of file vpolylinetool.cpp.
◆ mouseMove()
|
protectedvirtual |
Mouse move.
No mouse button is pressed.
Reimplemented from VTool.
Definition at line 215 of file vpolylinetool.cpp.
◆ rightMouseButtonRelease()
|
protectedvirtual |
Right mouse button release.
The mouse wasn't moved.
Reimplemented from VTool.
Definition at line 327 of file vpolylinetool.cpp.
◆ setup()
|
virtual |
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 483 of file vpolylinetool.cpp.
◆ toolType()
|
inlinevirtual |
◆ uiname()
|
inlinevirtual |
Member Data Documentation
◆ m_bezierPoints
|
protected |
The list of this polyline points.
Definition at line 106 of file vpolylinetool.h.
◆ m_close
|
protected |
Indicates if the polyline is to close.
Definition at line 121 of file vpolylinetool.h.
◆ m_lastVectorEnd
|
protected |
The end of the last drawn vector.
Definition at line 116 of file vpolylinetool.h.
◆ m_lastVectorStart
|
protected |
The start of the last drawn vector.
Definition at line 111 of file vpolylinetool.h.
The documentation for this class was generated from the following files:

Public Member Functions inherited from