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) |
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 Attributes | |
QPtrList< KoPoint > | m_bezierPoints |
KoPoint | m_lastVectorStart |
KoPoint | m_lastVectorEnd |
bool | m_close |
Member Function Documentation
void VPolylineTool::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 477 of file vpolylinetool.cc.
void VPolylineTool::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.cc.
void VPolylineTool::cancel | ( | ) | [protected, virtual] |
Cancels all tool operations.
This event is invoked when ESC is pressed.
Reimplemented from VTool.
Definition at line 443 of file vpolylinetool.cc.
void VPolylineTool::cancelStep | ( | ) | [protected, virtual] |
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.cc.
QString VPolylineTool::contextHelp | ( | ) | [virtual] |
The context help of the tool.
Reimplemented from VTool.
Definition at line 56 of file vpolylinetool.cc.
void VPolylineTool::createObject | ( | ) | [protected] |
void VPolylineTool::deactivate | ( | ) | [virtual] |
void VPolylineTool::draw | ( | ) | [protected, virtual] |
Helper method: draws the polyline.
Reimplemented from VTool.
Definition at line 152 of file vpolylinetool.cc.
void VPolylineTool::drawBezierVector | ( | KoPoint & | start, | |
KoPoint & | end | |||
) | [protected] |
void VPolylineTool::initializePath | ( | VPath & | path | ) | [protected] |
Initializes the specified path with the actual bezier points.
Definition at line 83 of file vpolylinetool.cc.
void VPolylineTool::mouseButtonDblClick | ( | ) | [protected, virtual] |
Mouse button double click.
Reimplemented from VTool.
Definition at line 337 of file vpolylinetool.cc.
void VPolylineTool::mouseButtonPress | ( | ) | [protected, virtual] |
void VPolylineTool::mouseButtonRelease | ( | ) | [protected, virtual] |
Left mouse button release.
The mouse wasn't moved.
Reimplemented from VTool.
Definition at line 252 of file vpolylinetool.cc.
void VPolylineTool::mouseDrag | ( | ) | [protected, virtual] |
void VPolylineTool::mouseDragCtrlPressed | ( | ) | [protected, virtual] |
Mouse drag with "Ctrl" key pressed at the same time.
Reimplemented from VTool.
Definition at line 413 of file vpolylinetool.cc.
void VPolylineTool::mouseDragCtrlReleased | ( | ) | [protected, virtual] |
"Ctrl" key released while mouse drag.
Reimplemented from VTool.
Definition at line 431 of file vpolylinetool.cc.
void VPolylineTool::mouseDragRelease | ( | ) | [protected, virtual] |
Mouse button release.
The mouse was moved before.
Reimplemented from VTool.
Definition at line 402 of file vpolylinetool.cc.
void VPolylineTool::mouseDragShiftPressed | ( | ) | [protected, virtual] |
Mouse drag with "Shift" key pressed at the same time.
Reimplemented from VTool.
Definition at line 408 of file vpolylinetool.cc.
void VPolylineTool::mouseDragShiftReleased | ( | ) | [protected, virtual] |
"Shift" key released while mouse drag.
Reimplemented from VTool.
Definition at line 426 of file vpolylinetool.cc.
void VPolylineTool::mouseMove | ( | ) | [protected, virtual] |
Mouse move.
No mouse button is pressed.
Reimplemented from VTool.
Definition at line 215 of file vpolylinetool.cc.
void VPolylineTool::rightMouseButtonRelease | ( | ) | [protected, virtual] |
Right mouse button release.
The mouse wasn't moved.
Reimplemented from VTool.
Definition at line 327 of file vpolylinetool.cc.
void VPolylineTool::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 483 of file vpolylinetool.cc.
virtual enumToolType VPolylineTool::toolType | ( | ) | [inline, virtual] |
virtual QString VPolylineTool::uiname | ( | ) | [inline, virtual] |
Member Data Documentation
QPtrList<KoPoint> VPolylineTool::m_bezierPoints [protected] |
bool VPolylineTool::m_close [protected] |
KoPoint VPolylineTool::m_lastVectorEnd [protected] |
KoPoint VPolylineTool::m_lastVectorStart [protected] |
The documentation for this class was generated from the following files: