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

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

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

Public Slots | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
ToolBarStateOneWidget Class Reference

`#include <toolbarstateonewidget.h>`

Inheritance diagram for ToolBarStateOneWidget:

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

## Public Member Functions
| ToolBarStateOneWidget (UMLScene *umlScene)
virtual | ~ToolBarStateOneWidget ()
virtual void | cleanBeforeChange ()
virtual void | mouseMove (QGraphicsSceneMouseEvent *ome)
Public Member Functions inherited from ToolBarStatePool
virtual | ~ToolBarStatePool ()
void | setButton (const WorkToolBar::ToolBar_Buttons &button)
WorkToolBar::ToolBar_Buttons | getButton () const
Public Member Functions inherited from ToolBarState
virtual | ~ToolBarState ()
virtual void | mousePress (QGraphicsSceneMouseEvent *ome)
virtual void | mouseRelease (QGraphicsSceneMouseEvent *ome)
virtual void | mouseDoubleClick (QGraphicsSceneMouseEvent *ome)

## Protected Member Functions
virtual void | setCurrentElement ()
virtual void | mouseReleaseWidget ()
virtual void | mouseReleaseEmpty ()
void | setWidget (UMLWidget *firstObject)
WidgetBase::WidgetType | widgetType ()
Protected Member Functions inherited from ToolBarStatePool
| ToolBarStatePool (UMLScene *umlScene)
Protected Member Functions inherited from ToolBarState
| ToolBarState (UMLScene *umlScene)
virtual void | mousePressAssociation ()
virtual void | mousePressWidget ()
virtual void | mousePressEmpty ()
virtual void | mouseReleaseAssociation ()
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
UMLWidget * | m_firstObject
| The first object in the message.
bool | m_isObjectWidgetLine
Protected Attributes inherited from ToolBarState
UMLScene * | m_pUMLScene
| The UMLScene.
QGraphicsSceneMouseEvent * | m_pMouseEvent
| The mouse event currently in use.

## Private Member Functions
virtual void | init ()

## Additional Inherited Members
Signals inherited from ToolBarState
void | finished ()

## Detailed Description

Sequence tool to create components linked with one object in sequence diagram like precondition. With sequence tool, one objects is selected clicking with left button on it

## Constructor & Destructor Documentation

## ◆ ToolBarStateOneWidget()

ToolBarStateOneWidget::ToolBarStateOneWidget | ( | UMLScene * | umlScene | ) |
| explicit

Creates a new ToolBarStateOneWidget.

Parameters

  umlScene | The UMLScene to use.

## ◆ ~ToolBarStateOneWidget()

ToolBarStateOneWidget::~ToolBarStateOneWidget | ( |  | ) |
| virtual

Destroys this ToolBarStateOneWidget.

## Member Function Documentation

## ◆ cleanBeforeChange()

void ToolBarStateOneWidget::cleanBeforeChange | ( |  | ) |
| virtual

Called when the current tool is changed to use another tool. Executes base method and cleans the message.

Reimplemented from ToolBarState.

## ◆ init()

void ToolBarStateOneWidget::init | ( |  | ) |
| private virtual

Goes back to the initial state.

Reimplemented from ToolBarState.

## ◆ mouseMove()

void ToolBarStateOneWidget::mouseMove | ( | QGraphicsSceneMouseEvent * | ome | ) |
| virtual

Called when a mouse event happened. It executes the base method and then updates the position of the message line, if any.

Reimplemented from ToolBarState.

## ◆ mouseReleaseEmpty()

void ToolBarStateOneWidget::mouseReleaseEmpty | ( |  | ) |
| protected virtual

Called when the release event happened on an empty space. Cleans the message. Empty spaces are not only actual empty spaces, but also associations.

Reimplemented from ToolBarState.

## ◆ mouseReleaseWidget()

void ToolBarStateOneWidget::mouseReleaseWidget | ( |  | ) |
| protected virtual

Called when the release event happened on a widget. If the button pressed isn't left button or the widget isn't an object widget, the message is cleaned. If the release event didn't happen on the line of an object and the first object wasn't selected, nothing is done. If the first object was already selected, a creation message is made. If the event happened on the line of an object, the first object or the second are set, depending on whether the first object was already set or not.

Reimplemented from ToolBarState.

## ◆ setCurrentElement()

void ToolBarStateOneWidget::setCurrentElement | ( |  | ) |
| protected virtual

Selects only widgets, but no associations. Overrides base class method. If the press event happened on the line of an object, the object is set as current widget. If the press event happened on a widget, the widget is set as current widget.

Reimplemented from ToolBarState.

## ◆ setWidget()

void ToolBarStateOneWidget::setWidget | ( | UMLWidget * | firstObject | ) |
| protected

Sets the first object of the message using the specified object. The temporary visual message is created and mouse tracking enabled, so mouse events will be delivered.

Parameters

  firstObject | The first object of the message.

## ◆ slotWidgetRemoved

void ToolBarStateOneWidget::slotWidgetRemoved | ( | UMLWidget * | widget | ) |
| virtual slot

A widget was removed from the UMLView. If the widget removed was the current widget, the current widget is set to 0. Also, if it was the first object, the message is cleaned.

## ◆ widgetType()

WidgetBase::WidgetType ToolBarStateOneWidget::widgetType | ( |  | ) |
| protected

Returns the widget type of this tool.

Returns
  The widget type of this tool.

## Member Data Documentation

## ◆ m_firstObject

UMLWidget* ToolBarStateOneWidget::m_firstObject
| protected

The first object in the message.

## ◆ m_isObjectWidgetLine

bool ToolBarStateOneWidget::m_isObjectWidgetLine
| protected

If there is a current widget, it is true if the press event happened on the line of an object, or false if it happened on a normal UMLWidget.

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

- umbrello/umlwidgets/toolbarstateonewidget.h
- umbrello/umlwidgets/toolbarstateonewidget.cpp