MessageWidgetController Class Reference
Controller for MessageWidget. More...
#include <messagewidgetcontroller.h>
Inheritance diagram for MessageWidgetController:

Public Member Functions | |
| MessageWidgetController (MessageWidget *messageWidget) | |
| Constructor for MessageWidgetController. | |
| ~MessageWidgetController () | |
| Destructor for MessageWidgetController. | |
Protected Member Functions | |
| virtual void | saveWidgetValues (QMouseEvent *me) |
| Overriden from UMLWidgetController. | |
| virtual QCursor | getResizeCursor () |
| Overriden from UMLWidgetController. | |
| virtual void | resizeWidget (int newW, int newH) |
| Overriden from UMLWidgetController. | |
| virtual void | moveWidgetBy (int diffX, int diffY) |
| Overriden from UMLWidgetController. | |
| virtual void | constrainMovementForAllWidgets (int &diffX, int &diffY) |
| Overriden from UMLWidgetController. | |
| virtual void | doMouseDoubleClick (QMouseEvent *me) |
| Overriden from UMLWidgetController. | |
Detailed Description
Controller for MessageWidget.When moving a MessageWidget, it is only moved along Y axis. X axis movement is always ignored. So, if the MessageWidget is being moved as part of a selection and that selection is moved in X and/or Y axis, the MessageWidget will only move in Y axis. Another constrain is applied in Y axis, so the message doesn't pass over the related object widgets. Due to this constrain, the vertical position the message would have if it wasn't constrained is calculated, so when the widget lowers the position where it was constrained it begins to move again. Also, when constraining the move of the selection because the receiver of mouse move events is a MessageWidget, all the widgets are moved only in Y axis. Another constrain is applied in Y axis, so the message doesn't pass over the related object widgets. The unconstrained position isn't need here, because the message widget is the receiver of the events, so when the cursor goes lower than where it was constrained it begins to lower automatically.
Creation messages take care of moving the object created when they're moved.
Only vertical resize is allowed for MessageWidget. Cursor is set to reflect this.
Double click shows the dialog to select the operation of the message.
- Author:
- Umbrello UML Modeller Authors <uml-devel@lists.sourceforge.net>
Definition at line 47 of file messagewidgetcontroller.h.
Constructor & Destructor Documentation
|
|
Constructor for MessageWidgetController.
Definition at line 25 of file messagewidgetcontroller.cpp. |
|
|
Destructor for MessageWidgetController.
Definition at line 31 of file messagewidgetcontroller.cpp. |
Member Function Documentation
|
|
Overriden from UMLWidgetController. Saves the values of the widget needed for move/resize. Calls parent method and then saves the value of m_unconstrainedPositionY
Reimplemented from UMLWidgetController. Definition at line 34 of file messagewidgetcontroller.cpp. References UMLWidget::getY(), and UMLWidgetController::saveWidgetValues(). |
|
|
Overriden from UMLWidgetController. Returns the cursor to be shown when resizing the widget. The cursor shown is KCursor::sizeVerCursor().
Reimplemented from UMLWidgetController. Definition at line 40 of file messagewidgetcontroller.cpp. |
|
||||||||||||
|
Overriden from UMLWidgetController. Resizes the height of the message widget and emits the message moved signal. Message widgets can only be resized vertically, so width isn't modified.
Reimplemented from UMLWidgetController. Definition at line 44 of file messagewidgetcontroller.cpp. References UMLWidget::setSize(), and MessageWidget::sigMessageMoved(). |
|
||||||||||||
|
Overriden from UMLWidgetController. Moves the widget to a new position using the difference between the current position and the new position. X position is ignored, and widget is only moved along Y axis. If message goes upper than the object, it's kept at this position until it should be lowered again (the unconstrained Y position is saved to know when it's the time to lower it again). If the message is a creation message, the object created is also moved to the new vertical position.
Reimplemented from UMLWidgetController. Definition at line 49 of file messagewidgetcontroller.cpp. References UMLWidget::getHeight(), UMLWidget::getY(), MessageWidget::m_pOw, MessageWidget::m_sequenceMessageType, MessageWidget::moveEvent(), and UMLWidget::setY(). |
|
||||||||||||
|
Overriden from UMLWidgetController. Modifies the value of the diffX and diffY variables used to move the widgets. All the widgets are constrained to be moved only in Y axis (diffX is set to 0).
Reimplemented from UMLWidgetController. Definition at line 71 of file messagewidgetcontroller.cpp. References UMLWidget::getY(). |
|
|
Overriden from UMLWidgetController. Executes the action for double click in the widget. Shows the dialog to select the operation of the message.
Reimplemented from UMLWidgetController. Definition at line 76 of file messagewidgetcontroller.cpp. References MessageWidget::m_pFText, and FloatingTextWidget::slotMenuSelection(). |
The documentation for this class was generated from the following files:
