karbon

#include <vpolylinetool.h>

Inheritance diagram for VPolylineTool:
VTool

Public Member Functions

 VPolylineTool (KarbonView *view)
 
virtual void setup (TDEActionCollection *collection)
 
virtual void activate ()
 
virtual void deactivate ()
 
virtual TQString uiname ()
 
virtual TQString contextHelp ()
 
virtual enumToolType toolType ()
 
- Public Member Functions inherited from VTool
 VTool (KarbonView *view, const char *name)
 
virtual ~VTool ()
 
virtual void registerTool (VTool *tool)
 
virtual bool showDialog () const
 
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 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 Member Functions inherited from VTool
bool isDragging () const
 
virtual void setCursor () const
 
virtual void rightMouseButtonPress ()
 
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_bezierPoints
 
KoPoint m_lastVectorStart
 
KoPoint m_lastVectorEnd
 
bool m_close
 
- Protected Attributes inherited from VTool
TDERadioAction * m_action
 

Additional Inherited Members

- Public Slots inherited from VTool

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.

Constructor & Destructor Documentation

◆ VPolylineTool()

VPolylineTool::VPolylineTool ( KarbonView *  view)

Definition at line 42 of file vpolylinetool.cpp.

◆ ~VPolylineTool()

VPolylineTool::~VPolylineTool ( )

Definition at line 50 of file vpolylinetool.cpp.

Member Function Documentation

◆ accept()

void VPolylineTool::accept ( )
protectedvirtual

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

◆ activate()

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

◆ cancel()

void VPolylineTool::cancel ( )
protectedvirtual

Cancels all tool operations.

This event is invoked when ESC is pressed.

Reimplemented from VTool.

Definition at line 443 of file vpolylinetool.cpp.

◆ cancelStep()

void VPolylineTool::cancelStep ( )
protectedvirtual

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

◆ commandExecuted

void VPolylineTool::commandExecuted ( )
protectedslot

Definition at line 499 of file vpolylinetool.cpp.

◆ contextHelp()

TQString VPolylineTool::contextHelp ( )
virtual

The context help of the tool.

Reimplemented from VTool.

Definition at line 56 of file vpolylinetool.cpp.

◆ createObject()

void VPolylineTool::createObject ( )
protected

Creates the polyline from the bezier points.

Definition at line 114 of file vpolylinetool.cpp.

◆ deactivate()

void VPolylineTool::deactivate ( )
virtual

Deactivates the tool.

Reimplemented from VTool.

Definition at line 141 of file vpolylinetool.cpp.

◆ draw()

void VPolylineTool::draw ( )
protectedvirtual

Helper method: draws the polyline.

Reimplemented from VTool.

Definition at line 152 of file vpolylinetool.cpp.

◆ drawBezierVector()

void VPolylineTool::drawBezierVector ( KoPoint &  start,
KoPoint &  end 
)
protected

Helper method: draws a bezier vector.

Definition at line 168 of file vpolylinetool.cpp.

◆ initializePath()

void VPolylineTool::initializePath ( VPath &  path)
protected

Initializes the specified path with the actual bezier points.

Definition at line 83 of file vpolylinetool.cpp.

◆ mouseButtonDblClick()

void VPolylineTool::mouseButtonDblClick ( )
protectedvirtual

Mouse button double click.

Reimplemented from VTool.

Definition at line 337 of file vpolylinetool.cpp.

◆ mouseButtonPress()

void VPolylineTool::mouseButtonPress ( )
protectedvirtual

Left mouse button press.

Reimplemented from VTool.

Definition at line 232 of file vpolylinetool.cpp.

◆ mouseButtonRelease()

void VPolylineTool::mouseButtonRelease ( )
protectedvirtual

Left mouse button release.

The mouse wasn't moved.

Reimplemented from VTool.

Definition at line 252 of file vpolylinetool.cpp.

◆ mouseDrag()

void VPolylineTool::mouseDrag ( )
protectedvirtual

Mouse drag.

Reimplemented from VTool.

Definition at line 343 of file vpolylinetool.cpp.

◆ mouseDragCtrlPressed()

void VPolylineTool::mouseDragCtrlPressed ( )
protectedvirtual

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

Reimplemented from VTool.

Definition at line 413 of file vpolylinetool.cpp.

◆ mouseDragCtrlReleased()

void VPolylineTool::mouseDragCtrlReleased ( )
protectedvirtual

"Ctrl" key released while mouse drag.

Reimplemented from VTool.

Definition at line 431 of file vpolylinetool.cpp.

◆ mouseDragRelease()

void VPolylineTool::mouseDragRelease ( )
protectedvirtual

Mouse button release.

The mouse was moved before.

Reimplemented from VTool.

Definition at line 402 of file vpolylinetool.cpp.

◆ mouseDragShiftPressed()

void VPolylineTool::mouseDragShiftPressed ( )
protectedvirtual

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

Reimplemented from VTool.

Definition at line 408 of file vpolylinetool.cpp.

◆ mouseDragShiftReleased()

void VPolylineTool::mouseDragShiftReleased ( )
protectedvirtual

"Shift" key released while mouse drag.

Reimplemented from VTool.

Definition at line 426 of file vpolylinetool.cpp.

◆ mouseMove()

void VPolylineTool::mouseMove ( )
protectedvirtual

Mouse move.

No mouse button is pressed.

Reimplemented from VTool.

Definition at line 215 of file vpolylinetool.cpp.

◆ rightMouseButtonRelease()

void VPolylineTool::rightMouseButtonRelease ( )
protectedvirtual

Right mouse button release.

The mouse wasn't moved.

Reimplemented from VTool.

Definition at line 327 of file vpolylinetool.cpp.

◆ setup()

void VPolylineTool::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 483 of file vpolylinetool.cpp.

◆ toolType()

virtual enumToolType VPolylineTool::toolType ( )
inlinevirtual

The tool type.

Reimplemented from VTool.

Definition at line 64 of file vpolylinetool.h.

◆ uiname()

virtual TQString VPolylineTool::uiname ( )
inlinevirtual

The name of the tool.

Reimplemented from VTool.

Definition at line 62 of file vpolylinetool.h.

Member Data Documentation

◆ m_bezierPoints

TQPtrList<KoPoint> VPolylineTool::m_bezierPoints
protected

The list of this polyline points.

Definition at line 106 of file vpolylinetool.h.

◆ m_close

bool VPolylineTool::m_close
protected

Indicates if the polyline is to close.

Definition at line 121 of file vpolylinetool.h.

◆ m_lastVectorEnd

KoPoint VPolylineTool::m_lastVectorEnd
protected

The end of the last drawn vector.

Definition at line 116 of file vpolylinetool.h.

◆ m_lastVectorStart

KoPoint VPolylineTool::m_lastVectorStart
protected

The start of the last drawn vector.

Definition at line 111 of file vpolylinetool.h.


The documentation for this class was generated from the following files: