umbrello/umbrello
#include <toolbarstateassociation.h>
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 | |
ToolBarStateAssociation (UMLScene *umlScene) | |
virtual | ~ToolBarStateAssociation () |
virtual void | cleanBeforeChange () |
virtual void | init () |
virtual void | mouseMove (QGraphicsSceneMouseEvent *ome) |
Public Member Functions inherited from ToolBarStatePool | |
virtual | ~ToolBarStatePool () |
WorkToolBar::ToolBar_Buttons | getButton () const |
void | setButton (const WorkToolBar::ToolBar_Buttons &button) |
Public Member Functions inherited from ToolBarState | |
virtual | ~ToolBarState () |
virtual void | mouseDoubleClick (QGraphicsSceneMouseEvent *ome) |
virtual void | mousePress (QGraphicsSceneMouseEvent *ome) |
virtual void | mouseRelease (QGraphicsSceneMouseEvent *ome) |
Protected Member Functions | |
virtual void | mouseReleaseAssociation () |
virtual void | mouseReleaseEmpty () |
virtual void | mouseReleaseWidget () |
Protected Member Functions inherited from ToolBarStatePool | |
ToolBarStatePool (UMLScene *umlScene) | |
Protected Member Functions inherited from ToolBarState | |
ToolBarState (UMLScene *umlScene) | |
AssociationWidget * | associationAt (const QPointF &pos) |
virtual void | changeTool () |
virtual AssociationWidget * | currentAssociation () const |
virtual UMLWidget * | currentWidget () const |
FloatingDashLineWidget * | floatingLineAt (const QPointF &pos) |
MessageWidget * | messageAt (const QPointF &pos) |
virtual void | mouseDoubleClickAssociation () |
virtual void | mouseDoubleClickEmpty () |
virtual void | mouseDoubleClickWidget () |
virtual void | mouseMoveAssociation () |
virtual void | mouseMoveEmpty () |
virtual void | mouseMoveWidget () |
virtual void | mousePressAssociation () |
virtual void | mousePressEmpty () |
virtual void | mousePressWidget () |
virtual void | setCurrentAssociation (AssociationWidget *association) |
virtual void | setCurrentElement () |
virtual void | setCurrentWidget (UMLWidget *widget) |
void | setMouseEvent (QGraphicsSceneMouseEvent *ome, const QEvent::Type &type) |
Additional Inherited Members | |
Protected Attributes inherited from ToolBarState | |
QGraphicsSceneMouseEvent * | m_pMouseEvent |
UMLScene * | m_pUMLScene |
Detailed Description
Association tool to create associations between widgets.
With association tool, two widgets are selected clicking with left button on them and an association of the needed type (depending on the association button selected) is created between the widgets. When the first widget is selected, a temporal visual association that follows the cursor movement is created until the second widget is selected or the association cancelled.
Also, association tool can create association class: a classifier widget which is linked to an association. To do this, the classifier must be selected first and then the association must be selected. The association can't be selected first.
An association can be cancelled using right button, which also returns to default tool, or with middle button, which only cancels the association without changing the tool being used.
- Todo:
- refactor with common code in ToolBarStateMessages?
Definition at line 38 of file toolbarstateassociation.h.
Constructor & Destructor Documentation
|
explicit |
Creates a new ToolBarStateAssociation.
- Parameters
-
umlScene The UMLScene to use.
Definition at line 39 of file toolbarstateassociation.cpp.
|
virtual |
Destroys this ToolBarStateAssociation.
Deletes the association line.
Definition at line 50 of file toolbarstateassociation.cpp.
Member Function Documentation
|
virtual |
Called when the current tool is changed to use another tool.
Executes base method and cleans the association.
Reimplemented from ToolBarState.
Definition at line 68 of file toolbarstateassociation.cpp.
|
virtual |
Goes back to the initial state.
Reimplemented from ToolBarState.
Definition at line 58 of file toolbarstateassociation.cpp.
|
virtual |
Called when a mouse event happened.
It executes the base method and then updates the position of the association line, if any.
Reimplemented from ToolBarState.
Definition at line 79 of file toolbarstateassociation.cpp.
|
protectedvirtual |
Called when the release event happened on an association.
If the button pressed isn't left button, the association being created is cleaned. If it is left button, and the first widget is set and is a classifier widget, it creates an association class. Otherwise, the association being created is cleaned.
Reimplemented from ToolBarState.
Definition at line 111 of file toolbarstateassociation.cpp.
|
protectedvirtual |
Called when the release event happened on an empty space.
Cleans the association.
Reimplemented from ToolBarState.
Definition at line 158 of file toolbarstateassociation.cpp.
|
protectedvirtual |
Called when the release event happened on a widget.
If the button pressed isn't left button, the association is cleaned. If it is left button, sets the first widget or the second, depending on whether the first widget is already set or not.
Reimplemented from ToolBarState.
Definition at line 132 of file toolbarstateassociation.cpp.
|
virtualslot |
A widget was removed from the UMLScene.
If the widget removed was the current widget, the current widget is set to 0. Also, if it was the first widget, the association is cleaned.
Definition at line 95 of file toolbarstateassociation.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:06:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.