karbon

VPencilTool Class Reference

#include <vpenciltool.h>

Inheritance diagram for VPencilTool:

VTool

List of all members.


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

enum  { RAW, STRAIGHT, CURVE }

Public Member Functions

 VPencilTool (KarbonView *view)
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::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::deactivate (  )  [virtual]

Deactivates the tool.

Reimplemented from VTool.

Definition at line 181 of file vpenciltool.cc.

void VPencilTool::setup ( KActionCollection *   )  [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.

virtual QString VPencilTool::uiname (  )  [inline, virtual]

The name of the tool.

Reimplemented from VTool.

Definition at line 91 of file vpenciltool.h.

QString VPencilTool::contextHelp (  )  [virtual]

The context help of the tool.

Reimplemented from VTool.

Definition at line 159 of file vpenciltool.cc.

virtual enumToolType VPencilTool::toolType (  )  [inline, virtual]

The tool type.

Reimplemented from VTool.

Definition at line 93 of file vpenciltool.h.

bool VPencilTool::showDialog (  )  const [virtual]

Shows the tools option dialog.

Reimplemented from VTool.

Definition at line 393 of file vpenciltool.cc.

void VPencilTool::draw (  )  [protected, virtual]

Helper method: draws the polyline.

Reimplemented from VTool.

Definition at line 273 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::mouseButtonPress (  )  [protected, virtual]

Left mouse button press.

Reimplemented from VTool.

Definition at line 305 of file vpenciltool.cc.

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::mouseButtonDblClick (  )  [protected, virtual]

Mouse button double click.

Reimplemented from VTool.

Definition at line 322 of file vpenciltool.cc.

void VPencilTool::mouseDrag (  )  [protected, virtual]

Mouse drag.

Reimplemented from VTool.

Definition at line 328 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::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::mouseDragShiftReleased (  )  [protected, virtual]

"Shift" key released while mouse drag.

Reimplemented from VTool.

Definition at line 358 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::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.

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.


Member Data Documentation

QPtrList<KoPoint> VPencilTool::m_Points [protected]

The list of this polyline points.

Definition at line 127 of file vpenciltool.h.

KoPoint VPencilTool::m_lastVectorStart [protected]

The start of the last drawn vector.

Definition at line 132 of file vpenciltool.h.

KoPoint VPencilTool::m_lastVectorEnd [protected]

The end of the last drawn vector.

Definition at line 137 of file vpenciltool.h.

bool VPencilTool::m_close [protected]

Indicates if the Line is to close.

Definition at line 142 of file vpenciltool.h.

short VPencilTool::m_mode [protected]

The mode of the pencile.

Definition at line 148 of file vpenciltool.h.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys