umbrello 26.03.70-f7b1fd3 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ToolBarStateArrow Class Reference

`#include <toolbarstatearrow.h>`

Inheritance diagram for ToolBarStateArrow:

## Public Member Functions

| ToolBarStateArrow (UMLScene *umlScene)
virtual | ~ToolBarStateArrow ()
virtual void | init ()
void | cleanup ()
Public Member Functions inherited from ToolBarState
virtual | ~ToolBarState ()
virtual void | init ()
virtual void | cleanBeforeChange ()
virtual void | mousePress (QGraphicsSceneMouseEvent *ome)
virtual void | mouseRelease (QGraphicsSceneMouseEvent *ome)
virtual void | mouseDoubleClick (QGraphicsSceneMouseEvent *ome)
virtual void | mouseMove (QGraphicsSceneMouseEvent *ome)

## Protected Member Functions

virtual void | mousePressAssociation ()
virtual void | mousePressWidget ()
virtual void | mousePressEmpty ()
virtual void | mouseReleaseAssociation ()
virtual void | mouseReleaseWidget ()
virtual void | mouseReleaseEmpty ()
virtual void | mouseDoubleClickAssociation ()
virtual void | mouseDoubleClickWidget ()
virtual void | mouseMoveAssociation ()
virtual void | mouseMoveWidget ()
virtual void | mouseMoveEmpty ()
virtual void | setCurrentWidget (UMLWidget *currentWidget)
virtual void | changeTool ()
Protected Member Functions inherited from ToolBarState
| ToolBarState (UMLScene *umlScene)
virtual void | setCurrentElement ()
virtual void | mousePressAssociation ()
virtual void | mousePressWidget ()
virtual void | mousePressEmpty ()
virtual void | mouseReleaseAssociation ()
virtual void | mouseReleaseWidget ()
virtual void | mouseReleaseEmpty ()
virtual void | mouseDoubleClickAssociation ()
virtual void | mouseDoubleClickWidget ()
virtual void | mouseDoubleClickEmpty ()
virtual void | mouseMoveAssociation ()
virtual void | mouseMoveWidget ()
virtual void | mouseMoveEmpty ()
virtual void | changeTool ()
virtual UMLWidget * | currentWidget () const
virtual void | setCurrentWidget (UMLWidget *widget)
virtual AssociationWidget * | currentAssociation () const
virtual void | setCurrentAssociation (AssociationWidget *association)
void | setMouseEvent (QGraphicsSceneMouseEvent *ome, const QEvent::Type &type)
AssociationWidget * | associationAt (const QPointF &pos)
MessageWidget * | messageAt (const QPointF &pos)
FloatingDashLineWidget * | floatingLineAt (const QPointF &pos)

## Protected Attributes

QList< QGraphicsLineItem * > | m_selectionRect
QPointF | m_startPosition
Protected Attributes inherited from ToolBarState
UMLScene * | m_pUMLScene
| The UMLScene. More...
QGraphicsSceneMouseEvent * | m_pMouseEvent
| The mouse event currently in use. More...

## Additional Inherited Members

Public Slots inherited from ToolBarState
virtual void | slotAssociationRemoved (AssociationWidget *association)
virtual void | slotWidgetRemoved (UMLWidget *widget)
Signals inherited from ToolBarState
void | finished ()

## Detailed Description

Arrow tool for select, move and resize widgets and associations. Arrow tool delegates the event handling in the widgets and associations. When no widget nor association is being used, the arrow tool acts as a selecting tool that selects all the elements in the rectangle created when dragging the mouse.

This is the default tool.

## Constructor & Destructor Documentation

## ◆ ToolBarStateArrow()

ToolBarStateArrow::ToolBarStateArrow | ( | UMLScene * | umlScene | ) |

explicit

Creates a new ToolBarStateArrow.

Parameters

  umlScene | The UMLScene to use.

## ◆ ~ToolBarStateArrow()

ToolBarStateArrow::~ToolBarStateArrow | ( |  | ) |

virtual

Destroys this ToolBarStateArrow.

## Member Function Documentation

## ◆ changeTool()

void ToolBarStateArrow::changeTool | ( |  | ) |

protected virtual

Overridden from base class to do nothing, as arrow is the default tool.

Reimplemented from ToolBarState.

## ◆ cleanup()

void ToolBarStateArrow::cleanup | ( |  | ) |

Clean up anything before deletion.

## ◆ init()

void ToolBarStateArrow::init | ( |  | ) |

virtual

Goes back to the initial state.

Reimplemented from ToolBarState.

## ◆ mouseDoubleClickAssociation()

void ToolBarStateArrow::mouseDoubleClickAssociation | ( |  | ) |

protected virtual

Called when the double click event happened on an association. Delivers the event to the association.

Reimplemented from ToolBarState.

## ◆ mouseDoubleClickWidget()

void ToolBarStateArrow::mouseDoubleClickWidget | ( |  | ) |

protected virtual

Called when the double click event happened on a widget. Delivers the event to the widget.

Reimplemented from ToolBarState.

## ◆ mouseMoveAssociation()

void ToolBarStateArrow::mouseMoveAssociation | ( |  | ) |

protected virtual

Called when the move event happened when an association is currently available. Delivers the event to the association.

Reimplemented from ToolBarState.

## ◆ mouseMoveEmpty()

void ToolBarStateArrow::mouseMoveEmpty | ( |  | ) |

protected virtual

Called when the move event happened when no association nor widget are currently available. Updates the selection rectangle to the new position and selectes all the widgets in the rectangle.

Todo:
  Fix selection

Reimplemented from ToolBarState.

## ◆ mouseMoveWidget()

void ToolBarStateArrow::mouseMoveWidget | ( |  | ) |

protected virtual

Called when the move event happened when a widget is currently available. Delivers the event to the widget.

Reimplemented from ToolBarState.

## ◆ mousePressAssociation()

void ToolBarStateArrow::mousePressAssociation | ( |  | ) |

protected virtual

Called when the press event happened on an association. Delivers the event to the association.

Reimplemented from ToolBarState.

## ◆ mousePressEmpty()

void ToolBarStateArrow::mousePressEmpty | ( |  | ) |

protected virtual

Called when the press event happened on an empty space. Calls base method and, if left button was pressed, prepares the selection rectangle.

Reimplemented from ToolBarState.

## ◆ mousePressWidget()

void ToolBarStateArrow::mousePressWidget | ( |  | ) |

protected virtual

Called when the press event happened on a widget. Delivers the event to the widget.

Reimplemented from ToolBarState.

## ◆ mouseReleaseAssociation()

void ToolBarStateArrow::mouseReleaseAssociation | ( |  | ) |

protected virtual

Called when the release event happened on an association. Delivers the event to the association.

Reimplemented from ToolBarState.

## ◆ mouseReleaseEmpty()

void ToolBarStateArrow::mouseReleaseEmpty | ( |  | ) |

protected virtual

Called when the release event happened on an empty space. If selection rectangle is active, it is cleared. Else, if the right button was released, it shows the pop up menu for the diagram.

Reimplemented from ToolBarState.

## ◆ mouseReleaseWidget()

void ToolBarStateArrow::mouseReleaseWidget | ( |  | ) |

protected virtual

Called when the release event happened on a widget. Delivers the event to the widget.

Reimplemented from ToolBarState.

## ◆ setCurrentWidget()

void ToolBarStateArrow::setCurrentWidget | ( | UMLWidget * | widget | ) |

protected virtual

Sets the widget currently in use. It ensures that the widget is only set if there is no other widget set already. It avoids things like moving a big widget over a little one, clicking right button to cancel the movement and the little widget getting the event, thus not canceling the movement in the big widget.

Reimplemented from ToolBarState.

## Member Data Documentation

## ◆ m_selectionRect

QList<QGraphicsLineItem*> ToolBarStateArrow::m_selectionRect

protected

The selection rectangle that contains the four lines of its borders.

## ◆ m_startPosition

QPointF ToolBarStateArrow::m_startPosition

protected

The start position of the selection rectangle.

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

- umbrello/toolbarstatearrow.h
- umbrello/toolbarstatearrow.cpp