kivio

SelectTool Class Reference

Inheritance diagram for SelectTool:

Kivio::MouseTool Kivio::Plugin List of all members.

Detailed Description

Definition at line 54 of file tool_select.h.


Public Slots

void setActivated (bool a)

Signals

void operationDone ()

Public Member Functions

 SelectTool (KivioView *parent)
 ~SelectTool ()
virtual bool processEvent (QEvent *e)
void select (const QRect &)

Protected Types

enum  {
  stmNone, stmDrawRubber, stmDragging, stmCustomDragging,
  stmResizing
}

Protected Slots

void editText (QPtrList< KivioStencil > *stencils)
void showProperties ()
void editStencilText ()

Protected Member Functions

void mousePress (const QPoint &)
void mouseMove (QMouseEvent *)
void mouseRelease (const QPoint &)
void leftDoubleClick (const QPoint &)
bool startResizing (const QPoint &)
bool startDragging (const QPoint &, bool)
bool startCustomDragging (const QPoint &, bool)
bool startRubberBanding (const QPoint &)
void continueDragging (const QPoint &, bool ignoreGridGuides=false)
void continueCustomDragging (const QPoint &)
void continueResizing (const QPoint &, bool ignoreGridGuides=false)
void continueRubberBanding (const QPoint &)
void endResizing (const QPoint &)
void endDragging (const QPoint &)
void endCustomDragging (const QPoint &)
void endRubberBanding (const QPoint &)
void showPopupMenu (const QPoint &)
void changeMouseCursor (const QPoint &)
int isOverResizeHandle (KivioStencil *pStencil, const double x, const double y)
void keyPress (QKeyEvent *e)

Protected Attributes

QPoint m_startPoint
QPoint m_releasePoint
KoPoint m_lastPoint
KoPoint m_origPoint

Member Function Documentation

bool SelectTool::processEvent ( QEvent *  e  )  [virtual]

Event delegation.

Parameters:
e The event to be identified and processed

Implements Kivio::MouseTool.

Definition at line 87 of file tool_select.cpp.

void SelectTool::select ( const QRect &   ) 

Selects all stencils inside a given rect.

Definition at line 165 of file tool_select.cpp.

void SelectTool::leftDoubleClick ( const QPoint &  pos  )  [protected]

Handles what happens when a left-button double click occurs.

If there are no stencils selected, this function returns. Otherwise it launches the text tool on the selected stencils and switches back to this tool when it's done.

Definition at line 1141 of file tool_select.cpp.

bool SelectTool::startResizing ( const QPoint &   )  [protected]

Tests if we can start resizing a stencil.

Definition at line 380 of file tool_select.cpp.

bool SelectTool::startDragging ( const QPoint &  ,
bool   
) [protected]

Tests if we can start dragging a stencil.

Definition at line 259 of file tool_select.cpp.

bool SelectTool::startRubberBanding ( const QPoint &   )  [protected]

Tests if we should start rubber banding (always returns true).

Definition at line 242 of file tool_select.cpp.

void SelectTool::continueDragging ( const QPoint &  pos,
bool  ignoreGridGuides = false 
) [protected]

Continues the dragging process of a stencil (moving).

How does this work? Initially we create a list of all the original geometry of all the selected stencils. We use that to calculate delta movements and snap them to the grid.

Definition at line 497 of file tool_select.cpp.

void SelectTool::showPopupMenu ( const QPoint &   )  [protected]

Shows the popupmenu at a given point.

Definition at line 1108 of file tool_select.cpp.

void SelectTool::changeMouseCursor ( const QPoint &   )  [protected]

Change the mouse cursor based on what it is over.

Definition at line 817 of file tool_select.cpp.

int SelectTool::isOverResizeHandle ( KivioStencil pStencil,
const double  x,
const double  y 
) [protected]

Tests if a point is over a stencils.

Definition at line 894 of file tool_select.cpp.


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