#include <vpenciltool.h>
Public Types | |
| enum | { RAW , STRAIGHT , CURVE } |
Public Member Functions | |
| VPencilTool (KarbonView *view) | |
| virtual void | activate () |
| virtual void | deactivate () |
| virtual void | setup (TDEActionCollection *collection) |
| virtual TQString | uiname () |
| virtual TQString | contextHelp () |
| virtual enumToolType | toolType () |
| virtual bool | showDialog () const |
| Public Member Functions inherited from VTool | |
| VTool (KarbonView *view, const char *name) | |
| virtual | ~VTool () |
| virtual void | registerTool (VTool *tool) |
| 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 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 Member Functions inherited from VTool | |
| bool | isDragging () const |
| virtual void | setCursor () const |
| virtual void | rightMouseButtonPress () |
| virtual void | rightMouseButtonRelease () |
| 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_Points |
| KoPoint | m_lastVectorStart |
| KoPoint | m_lastVectorEnd |
| bool | m_close |
| short | m_mode |
| bool | m_optimize |
| float | m_combineAngle |
| VPencilOptionsWidget * | m_optionWidget |
| Protected Attributes inherited from VTool | |
| TDERadioAction * | m_action |
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 82 of file vpenciltool.h.
Member Enumeration Documentation
◆ anonymous enum
| anonymous enum |
Definition at line 98 of file vpenciltool.h.
Constructor & Destructor Documentation
◆ VPencilTool()
| VPencilTool::VPencilTool | ( | KarbonView * | view | ) |
Definition at line 141 of file vpenciltool.cpp.
◆ ~VPencilTool()
| VPencilTool::~VPencilTool | ( | ) |
Definition at line 153 of file vpenciltool.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 386 of file vpenciltool.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 169 of file vpenciltool.cpp.
◆ cancel()
|
protectedvirtual |
Cancels all tool operations.
This event is invoked when ESC is pressed.
Reimplemented from VTool.
Definition at line 368 of file vpenciltool.cpp.
◆ cancelStep()
|
protectedvirtual |
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.cpp.
◆ contextHelp()
|
virtual |
The context help of the tool.
Reimplemented from VTool.
Definition at line 159 of file vpenciltool.cpp.
◆ deactivate()
|
virtual |
◆ draw()
|
protectedvirtual |
Helper method: draws the polyline.
Reimplemented from VTool.
Definition at line 273 of file vpenciltool.cpp.
◆ mouseButtonDblClick()
|
protectedvirtual |
Mouse button double click.
Reimplemented from VTool.
Definition at line 322 of file vpenciltool.cpp.
◆ mouseButtonPress()
|
protectedvirtual |
◆ mouseButtonRelease()
|
protectedvirtual |
Left mouse button release.
The mouse wasn't moved.
Reimplemented from VTool.
Definition at line 313 of file vpenciltool.cpp.
◆ mouseDrag()
|
protectedvirtual |
◆ mouseDragCtrlPressed()
|
protectedvirtual |
Mouse drag with "Ctrl" key pressed at the same time.
Reimplemented from VTool.
Definition at line 352 of file vpenciltool.cpp.
◆ mouseDragCtrlReleased()
|
protectedvirtual |
"Ctrl" key released while mouse drag.
Reimplemented from VTool.
Definition at line 363 of file vpenciltool.cpp.
◆ mouseDragRelease()
|
protectedvirtual |
Mouse button release.
The mouse was moved before.
Reimplemented from VTool.
Definition at line 341 of file vpenciltool.cpp.
◆ mouseDragShiftPressed()
|
protectedvirtual |
Mouse drag with "Shift" key pressed at the same time.
Reimplemented from VTool.
Definition at line 347 of file vpenciltool.cpp.
◆ mouseDragShiftReleased()
|
protectedvirtual |
"Shift" key released while mouse drag.
Reimplemented from VTool.
Definition at line 358 of file vpenciltool.cpp.
◆ mouseMove()
|
protectedvirtual |
Mouse move.
No mouse button is pressed.
Reimplemented from VTool.
Definition at line 300 of file vpenciltool.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 399 of file vpenciltool.cpp.
◆ showDialog()
|
virtual |
Shows the tools option dialog.
Reimplemented from VTool.
Definition at line 393 of file vpenciltool.cpp.
◆ toolType()
|
inlinevirtual |
◆ uiname()
|
inlinevirtual |
Member Data Documentation
◆ m_close
|
protected |
Indicates if the Line is to close.
Definition at line 143 of file vpenciltool.h.
◆ m_combineAngle
|
protected |
Definition at line 153 of file vpenciltool.h.
◆ m_lastVectorEnd
|
protected |
The end of the last drawn vector.
Definition at line 138 of file vpenciltool.h.
◆ m_lastVectorStart
|
protected |
The start of the last drawn vector.
Definition at line 133 of file vpenciltool.h.
◆ m_mode
|
protected |
The mode of the pencile.
Definition at line 149 of file vpenciltool.h.
◆ m_optimize
|
protected |
Definition at line 151 of file vpenciltool.h.
◆ m_optionWidget
|
protected |
Definition at line 155 of file vpenciltool.h.
◆ m_Points
|
protected |
The list of this polyline points.
Definition at line 128 of file vpenciltool.h.
The documentation for this class was generated from the following files:
