ToolBarStateAssociation Class Reference
Association tool to create associations between widgets. More...
#include <toolbarstateassociation.h>
Inheritance diagram for ToolBarStateAssociation:

Public Slots | |
| virtual void | slotWidgetRemoved (UMLWidget *widget) |
| A widget was removed from the UMLView. | |
Public Member Functions | |
| ToolBarStateAssociation (UMLView *umlView) | |
| Creates a new ToolBarStateAssociation. | |
| virtual | ~ToolBarStateAssociation () |
| Destroys this ToolBarStateAssociation. | |
| virtual void | init () |
| Goes back to the initial state. | |
| virtual void | cleanBeforeChange () |
| Called when the current tool is changed to use another tool. | |
| virtual void | mouseMove (QMouseEvent *ome) |
| Called when a mouse event happened. | |
Protected Member Functions | |
| virtual void | mouseReleaseAssociation () |
| Called when the release event happened on an association. | |
| virtual void | mouseReleaseWidget () |
| Called when the release event happened on a widget. | |
| virtual void | mouseReleaseEmpty () |
| Called when the release event happened on an empty space. | |
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.
Definition at line 38 of file toolbarstateassociation.h.
Constructor & Destructor Documentation
|
|
Creates a new ToolBarStateAssociation.
Definition at line 36 of file toolbarstateassociation.cpp. |
|
|
Destroys this ToolBarStateAssociation. Deletes the association line. Definition at line 41 of file toolbarstateassociation.cpp. |
Member Function Documentation
|
|
Goes back to the initial state.
Reimplemented from ToolBarState. Definition at line 45 of file toolbarstateassociation.cpp. References ToolBarState::init(). |
|
|
Called when the current tool is changed to use another tool. Executes base method and cleans the association. Reimplemented from ToolBarState. Definition at line 51 of file toolbarstateassociation.cpp. References ToolBarState::cleanBeforeChange(). |
|
|
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 57 of file toolbarstateassociation.cpp. References ToolBarState::mouseMove(). |
|
|
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 widget, the association is cleaned. Reimplemented from ToolBarState. Definition at line 66 of file toolbarstateassociation.cpp. References ToolBarState::slotWidgetRemoved(). |
|
|
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 74 of file toolbarstateassociation.cpp. References AssociationWidget::createAssocClassLine(), WidgetBase::getBaseType(), and ToolBarState::getCurrentAssociation(). |
|
|
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 87 of file toolbarstateassociation.cpp. |
|
|
Called when the release event happened on an empty space. Cleans the association. Reimplemented from ToolBarState. Definition at line 108 of file toolbarstateassociation.cpp. |
The documentation for this class was generated from the following files:
