ToolBarStateArrow Class Reference
Arrow tool for select, move and resize widgets and associations. More...
#include <toolbarstatearrow.h>
Inheritance diagram for ToolBarStateArrow:

Public Member Functions | |
| ToolBarStateArrow (UMLView *umlView) | |
| Creates a new ToolBarStateArrow. | |
| virtual | ~ToolBarStateArrow () |
| Destroys this ToolBarStateArrow. | |
| virtual void | init () |
| Goes back to the inital state. | |
Protected Member Functions | |
| virtual void | mousePressAssociation () |
| Called when the press event happened on an association. | |
| virtual void | mousePressWidget () |
| Called when the press event happened on a widget. | |
| virtual void | mousePressEmpty () |
| Called when the press event happened on an empty space. | |
| 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. | |
| virtual void | mouseDoubleClickAssociation () |
| Called when the double click event happened on an association. | |
| virtual void | mouseDoubleClickWidget () |
| Called when the double click event happened on a widget. | |
| virtual void | mouseMoveAssociation () |
| Called when the move event happened when an association is currently available. | |
| virtual void | mouseMoveWidget () |
| Called when the move event happened when a widget is currently available. | |
| virtual void | mouseMoveEmpty () |
| Called when the move event happened when no association nor widget are currently available. | |
| virtual void | setCurrentWidget (UMLWidget *currentWidget) |
| Sets the widget currently in use. | |
| virtual void | changeTool () |
| Overriden from base class to do nothing, as arrow is the default tool. | |
Protected Attributes | |
| QPtrList< QCanvasLine > | m_selectionRect |
| The selection rectangle that contains the four lines of its borders. | |
| QPoint | m_startPosition |
| The start position of the selection rectangle. | |
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.
Definition at line 34 of file toolbarstatearrow.h.
Constructor & Destructor Documentation
|
|
Creates a new ToolBarStateArrow.
Definition at line 21 of file toolbarstatearrow.cpp. References init(), and m_selectionRect. |
|
|
Destroys this ToolBarStateArrow.
Definition at line 27 of file toolbarstatearrow.cpp. |
Member Function Documentation
|
|
Goes back to the inital state.
Reimplemented from ToolBarState. Definition at line 30 of file toolbarstatearrow.cpp. References ToolBarState::init(), and m_selectionRect. Referenced by ToolBarStateArrow(). |
|
|
Called when the press event happened on an association. Delivers the event to the association. Reimplemented from ToolBarState. Definition at line 36 of file toolbarstatearrow.cpp. References ToolBarState::getCurrentAssociation(), and AssociationWidget::mousePressEvent(). |
|
|
Called when the press event happened on a widget. Delivers the event to the widget. Reimplemented from ToolBarState. Definition at line 40 of file toolbarstatearrow.cpp. References ToolBarState::getCurrentWidget(), and UMLWidget::mousePressEvent(). |
|
|
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. Definition at line 44 of file toolbarstatearrow.cpp. References m_selectionRect, m_startPosition, ToolBarState::mousePressEmpty(), UMLWidget::setPen(), and UMLWidget::setZ(). |
|
|
Called when the release event happened on an association. Delivers the event to the association. Reimplemented from ToolBarState. Definition at line 68 of file toolbarstatearrow.cpp. References ToolBarState::getCurrentAssociation(), and AssociationWidget::mouseReleaseEvent(). |
|
|
Called when the release event happened on a widget. Delivers the event to the widget. Reimplemented from ToolBarState. Definition at line 72 of file toolbarstatearrow.cpp. References ToolBarState::getCurrentWidget(), and UMLWidget::mouseReleaseEvent(). |
|
|
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. Definition at line 76 of file toolbarstatearrow.cpp. References m_selectionRect, and UMLView::setMenu(). |
|
|
Called when the double click event happened on an association. Delivers the event to the association. Reimplemented from ToolBarState. Definition at line 84 of file toolbarstatearrow.cpp. References ToolBarState::getCurrentAssociation(), and AssociationWidget::mouseDoubleClickEvent(). |
|
|
Called when the double click event happened on a widget. Delivers the event to the widget. Reimplemented from ToolBarState. Definition at line 88 of file toolbarstatearrow.cpp. References ToolBarState::getCurrentWidget(), and UMLWidget::mouseDoubleClickEvent(). |
|
|
Called when the move event happened when an association is currently available. Delivers the event to the association. Reimplemented from ToolBarState. Definition at line 92 of file toolbarstatearrow.cpp. References ToolBarState::getCurrentAssociation(), and AssociationWidget::mouseMoveEvent(). |
|
|
Called when the move event happened when a widget is currently available. Delivers the event to the widget. Reimplemented from ToolBarState. Definition at line 96 of file toolbarstatearrow.cpp. References ToolBarState::getCurrentWidget(), and UMLWidget::mouseMoveEvent(). |
|
|
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. Reimplemented from ToolBarState. Definition at line 100 of file toolbarstatearrow.cpp. References m_selectionRect, m_startPosition, and UMLView::selectWidgets(). |
|
|
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 cancelling the movement in the big widget. Reimplemented from ToolBarState. Definition at line 126 of file toolbarstatearrow.cpp. References ToolBarState::getCurrentWidget(), and ToolBarState::setCurrentWidget(). |
|
|
Overriden from base class to do nothing, as arrow is the default tool.
Reimplemented from ToolBarState. Definition at line 123 of file toolbarstatearrow.cpp. |
Member Data Documentation
|
|
The selection rectangle that contains the four lines of its borders.
Definition at line 149 of file toolbarstatearrow.h. Referenced by init(), mouseMoveEmpty(), mousePressEmpty(), mouseReleaseEmpty(), and ToolBarStateArrow(). |
|
|
The start position of the selection rectangle.
Definition at line 154 of file toolbarstatearrow.h. Referenced by mouseMoveEmpty(), and mousePressEmpty(). |
The documentation for this class was generated from the following files:
