karbon

#include <vpenciltool.h>

Inheritance diagram for VPencilTool:
VTool

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()

void VPencilTool::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()

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.cpp.

◆ cancel()

void VPencilTool::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()

void VPencilTool::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()

TQString VPencilTool::contextHelp ( )
virtual

The context help of the tool.

Reimplemented from VTool.

Definition at line 159 of file vpenciltool.cpp.

◆ deactivate()

void VPencilTool::deactivate ( )
virtual

Deactivates the tool.

Reimplemented from VTool.

Definition at line 181 of file vpenciltool.cpp.

◆ draw()

void VPencilTool::draw ( )
protectedvirtual

Helper method: draws the polyline.

Reimplemented from VTool.

Definition at line 273 of file vpenciltool.cpp.

◆ mouseButtonDblClick()

void VPencilTool::mouseButtonDblClick ( )
protectedvirtual

Mouse button double click.

Reimplemented from VTool.

Definition at line 322 of file vpenciltool.cpp.

◆ mouseButtonPress()

void VPencilTool::mouseButtonPress ( )
protectedvirtual

Left mouse button press.

Reimplemented from VTool.

Definition at line 305 of file vpenciltool.cpp.

◆ mouseButtonRelease()

void VPencilTool::mouseButtonRelease ( )
protectedvirtual

Left mouse button release.

The mouse wasn't moved.

Reimplemented from VTool.

Definition at line 313 of file vpenciltool.cpp.

◆ mouseDrag()

void VPencilTool::mouseDrag ( )
protectedvirtual

Mouse drag.

Reimplemented from VTool.

Definition at line 328 of file vpenciltool.cpp.

◆ mouseDragCtrlPressed()

void VPencilTool::mouseDragCtrlPressed ( )
protectedvirtual

Mouse drag with "Ctrl" key pressed at the same time.

Reimplemented from VTool.

Definition at line 352 of file vpenciltool.cpp.

◆ mouseDragCtrlReleased()

void VPencilTool::mouseDragCtrlReleased ( )
protectedvirtual

"Ctrl" key released while mouse drag.

Reimplemented from VTool.

Definition at line 363 of file vpenciltool.cpp.

◆ mouseDragRelease()

void VPencilTool::mouseDragRelease ( )
protectedvirtual

Mouse button release.

The mouse was moved before.

Reimplemented from VTool.

Definition at line 341 of file vpenciltool.cpp.

◆ mouseDragShiftPressed()

void VPencilTool::mouseDragShiftPressed ( )
protectedvirtual

Mouse drag with "Shift" key pressed at the same time.

Reimplemented from VTool.

Definition at line 347 of file vpenciltool.cpp.

◆ mouseDragShiftReleased()

void VPencilTool::mouseDragShiftReleased ( )
protectedvirtual

"Shift" key released while mouse drag.

Reimplemented from VTool.

Definition at line 358 of file vpenciltool.cpp.

◆ mouseMove()

void VPencilTool::mouseMove ( )
protectedvirtual

Mouse move.

No mouse button is pressed.

Reimplemented from VTool.

Definition at line 300 of file vpenciltool.cpp.

◆ setup()

void VPencilTool::setup ( TDEActionCollection * )
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()

bool VPencilTool::showDialog ( ) const
virtual

Shows the tools option dialog.

Reimplemented from VTool.

Definition at line 393 of file vpenciltool.cpp.

◆ toolType()

virtual enumToolType VPencilTool::toolType ( )
inlinevirtual

The tool type.

Reimplemented from VTool.

Definition at line 94 of file vpenciltool.h.

◆ uiname()

virtual TQString VPencilTool::uiname ( )
inlinevirtual

The name of the tool.

Reimplemented from VTool.

Definition at line 92 of file vpenciltool.h.

Member Data Documentation

◆ m_close

bool VPencilTool::m_close
protected

Indicates if the Line is to close.

Definition at line 143 of file vpenciltool.h.

◆ m_combineAngle

float VPencilTool::m_combineAngle
protected

Definition at line 153 of file vpenciltool.h.

◆ m_lastVectorEnd

KoPoint VPencilTool::m_lastVectorEnd
protected

The end of the last drawn vector.

Definition at line 138 of file vpenciltool.h.

◆ m_lastVectorStart

KoPoint VPencilTool::m_lastVectorStart
protected

The start of the last drawn vector.

Definition at line 133 of file vpenciltool.h.

◆ m_mode

short VPencilTool::m_mode
protected

The mode of the pencile.

Definition at line 149 of file vpenciltool.h.

◆ m_optimize

bool VPencilTool::m_optimize
protected

Definition at line 151 of file vpenciltool.h.

◆ m_optionWidget

VPencilOptionsWidget* VPencilTool::m_optionWidget
protected

Definition at line 155 of file vpenciltool.h.

◆ m_Points

TQPtrList<KoPoint> VPencilTool::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: