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 | |
RAW | |
STRAIGHT | |
CURVE | |
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
void VPencilTool::accept | ( | ) | [protected, virtual] |
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.
void VPencilTool::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.cc.
void VPencilTool::cancel | ( | ) | [protected, virtual] |
Cancels all tool operations.
This event is invoked when ESC is pressed.
Reimplemented from VTool.
Definition at line 368 of file vpenciltool.cc.
void VPencilTool::cancelStep | ( | ) | [protected, virtual] |
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.
QString VPencilTool::contextHelp | ( | ) | [virtual] |
The context help of the tool.
Reimplemented from VTool.
Definition at line 159 of file vpenciltool.cc.
void VPencilTool::deactivate | ( | ) | [virtual] |
void VPencilTool::draw | ( | ) | [protected, virtual] |
Helper method: draws the polyline.
Reimplemented from VTool.
Definition at line 273 of file vpenciltool.cc.
void VPencilTool::mouseButtonDblClick | ( | ) | [protected, virtual] |
void VPencilTool::mouseButtonPress | ( | ) | [protected, virtual] |
void VPencilTool::mouseButtonRelease | ( | ) | [protected, virtual] |
Left mouse button release.
The mouse wasn't moved.
Reimplemented from VTool.
Definition at line 313 of file vpenciltool.cc.
void VPencilTool::mouseDrag | ( | ) | [protected, virtual] |
void VPencilTool::mouseDragCtrlPressed | ( | ) | [protected, virtual] |
Mouse drag with "Ctrl" key pressed at the same time.
Reimplemented from VTool.
Definition at line 352 of file vpenciltool.cc.
void VPencilTool::mouseDragCtrlReleased | ( | ) | [protected, virtual] |
"Ctrl" key released while mouse drag.
Reimplemented from VTool.
Definition at line 363 of file vpenciltool.cc.
void VPencilTool::mouseDragRelease | ( | ) | [protected, virtual] |
Mouse button release.
The mouse was moved before.
Reimplemented from VTool.
Definition at line 341 of file vpenciltool.cc.
void VPencilTool::mouseDragShiftPressed | ( | ) | [protected, virtual] |
Mouse drag with "Shift" key pressed at the same time.
Reimplemented from VTool.
Definition at line 347 of file vpenciltool.cc.
void VPencilTool::mouseDragShiftReleased | ( | ) | [protected, virtual] |
"Shift" key released while mouse drag.
Reimplemented from VTool.
Definition at line 358 of file vpenciltool.cc.
void VPencilTool::mouseMove | ( | ) | [protected, virtual] |
Mouse move.
No mouse button is pressed.
Reimplemented from VTool.
Definition at line 300 of file vpenciltool.cc.
void VPencilTool::setup | ( | KActionCollection * | collection | ) | [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.cc.
bool VPencilTool::showDialog | ( | ) | const [virtual] |
Shows the tools option dialog.
Reimplemented from VTool.
Definition at line 393 of file vpenciltool.cc.
virtual enumToolType VPencilTool::toolType | ( | ) | [inline, virtual] |
virtual QString VPencilTool::uiname | ( | ) | [inline, virtual] |
Member Data Documentation
bool VPencilTool::m_close [protected] |
KoPoint VPencilTool::m_lastVectorEnd [protected] |
KoPoint VPencilTool::m_lastVectorStart [protected] |
short VPencilTool::m_mode [protected] |
QPtrList<KoPoint> VPencilTool::m_Points [protected] |
The documentation for this class was generated from the following files: