AssociationWidget Class Reference
This class represents an association inside a diagram. This class represents an association inside a diagram. Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org. More...
#include <associationwidget.h>
Inheritance diagram for AssociationWidget:

Public Types | |
| enum | Region { Error = 0, West, North, East, South, NorthWest, NorthEast, SouthEast, SouthWest, Center } |
| Enumeration used for stating where a line is on a widget. More... | |
Public Slots | |
| void | slotMenuSelection (int sel) |
| Handles the selection from the popup menu. | |
| void | slotRemovePopupMenu () |
| This slot is entered when an event has occurred on the views display, most likely a mouse event. | |
| void | slotClearAllSelected () |
| Handles any signals that tells everyone not to be selected. | |
| void | slotAttributeRemoved (UMLClassifierListItem *obj) |
| Connected to UMLClassifier::attributeRemoved() in case this AssociationWidget is linked to a classifer's attribute type. | |
| void | syncToModel () |
| Synchronize this widget from the UMLAssociation. | |
Public Member Functions | |
| AssociationWidget (UMLView *view) | |
| Constructor. | |
| AssociationWidget (UMLView *view, UMLWidget *WidgetA, Uml::Association_Type Type, UMLWidget *WidgetB, UMLAssociation *umlassoc=NULL) | |
| Constructor. | |
| virtual | ~AssociationWidget () |
| Deconstructor. | |
| AssociationWidget & | operator= (AssociationWidget &Other) |
| Overrides the assignment operator. | |
| bool | operator== (AssociationWidget &Other) |
| Overrides the equality test operator. | |
| bool | operator!= (AssociationWidget &Other) |
| Overrides the != operator. | |
| bool | activate () |
| Activates the AssociationWidget after a load. | |
| void | setWidget (UMLWidget *widget, Uml::Role_Type role) |
| Set the widget of the given role. | |
| FloatingTextWidget * | getMultiWidget (Uml::Role_Type role) |
| Return the multiplicity FloatingTextWidget widget of the given role. | |
| QString | getMulti (Uml::Role_Type role) const |
| Return the given role's multiplicity text. | |
| FloatingTextWidget * | getNameWidget () |
| Read property of FloatingTextWidget* m_pName. | |
| QString | getName () const |
| Returns the m_pName's text. | |
| FloatingTextWidget * | getRoleWidget (Uml::Role_Type role) |
| Return the given role's FloatingTextWidget object. | |
| FloatingTextWidget * | getTextWidgetByRole (Uml::Text_Role tr) |
| Return the FloatingTextWidget object indicated by the given Text_Role. | |
| QString | getRoleName (Uml::Role_Type role) const |
| Return the given role's FloatingTextWidget widget text. | |
| QString | getRoleDoc (Uml::Role_Type role) const |
| Returns the given role's documentation. | |
| void | setName (const QString &strRole) |
| Sets the text in the FloatingTextWidget widget representing the Name of this association. | |
| void | setMulti (const QString &strMulti, Uml::Role_Type role) |
| Sets the text in the FloatingTextWidget representing the multiplicity at the given side of the association. | |
| Uml::Visibility | getVisibility (Uml::Role_Type role) const |
| Gets the visibility on the given role of the association. | |
| void | setVisibility (Uml::Visibility visibility, Uml::Role_Type role) |
| Sets the visibility on the given role of the association. | |
| Uml::Changeability_Type | getChangeability (Uml::Role_Type role) const |
| Gets the changeability on the the given end of the Association. | |
| void | setChangeability (Uml::Changeability_Type value, Uml::Role_Type role) |
| Sets the changeability on the the given end of the Association. | |
| Uml::IDType | getWidgetID (Uml::Role_Type role) const |
| Gets the ID of the given role widget. | |
| UMLWidget * | getWidget (Uml::Role_Type role) |
| Gets the given role widget. | |
| bool | setWidgets (UMLWidget *widgetA, Uml::Association_Type assocType, UMLWidget *widgetB) |
| Sets the associated widgets. | |
| bool | checkAssoc (UMLWidget *widgetA, UMLWidget *widgetB) |
| Returns true if this association associates widgetA to widgetB, otherwise it returns false. | |
| bool | contains (UMLWidget *widget) |
| Returns true if the Widget is either at the starting or ending side of the association. | |
| bool | isCollaboration () |
| Returns true if this AssociationWidget represents a collaboration message. | |
| Uml::Association_Type | getAssocType () const |
| Gets the association's type. | |
| void | setAssocType (Uml::Association_Type type) |
| Sets the association's type. | |
| QString | toString () |
| Returns a QString object representing this AssociationWidget. | |
| bool | isActivated () |
| Read property of bool m_bActivated. | |
| void | setActivated (bool active) |
| Set the m_bActivated flag of a widget but does not perform the activate method. | |
| void | setSelected (bool _select=true) |
| Sets the state of whether the widget is selected. | |
| bool | getSelected () const |
| Returns the state of whether the widget is selected. | |
| LinePath * | getLinePath () |
| Returns a pointer to the association widget's line path. | |
| void | widgetMoved (UMLWidget *widget, int x, int y) |
| Adjusts the ending point of the association that connects to Widget. | |
| void | saveIdealTextPositions () |
| Auxiliary method for widgetMoved(): Saves all ideally computed floatingtext positions before doing any kind of change. | |
| void | calculateNameTextSegment () |
| Calculates the m_unNameLineSegment value according to the new NameText topleft corner PT. | |
| void | mouseDoubleClickEvent (QMouseEvent *me) |
| Adds a break point (if left mouse button). | |
| void | mousePressEvent (QMouseEvent *me) |
| Sets the association to be selected. | |
| void | mouseReleaseEvent (QMouseEvent *me) |
| Displays the right mouse buttom menu if right button is pressed. | |
| void | mouseMoveEvent (QMouseEvent *me) |
| Moves the break point being dragged. | |
| bool | onAssociation (const QPoint &point) |
| Returns true if the given point is on the Association. | |
| bool | onAssocClassLine (const QPoint &point) |
| Returns true if the given point is on the connecting line to the association class. | |
| void | createAssocClassLine () |
| Creates the association class connecting line. | |
| void | createAssocClassLine (ClassifierWidget *classifierWidget, int linePathSegmentIndex) |
| Creates the association class connecting line using the specified ClassifierWidget. | |
| void | selectAssocClassLine (bool sel=true) |
| Renders the association class connecting line selected. | |
| void | moveMidPointsBy (int x, int y) |
| Moves all the mid points (all expcept start /end ) by the given amount. | |
| void | moveEntireAssoc (int x, int y) |
| Moves the entire association by the given offset. | |
| QRect | getAssocLineRectangle () |
| Returns the bounding rectangle of all segments of the association. | |
| QFont | getFont () const |
| Return the first font found being used by any child widget. | |
| void | setLineColor (const QColor &colour) |
| Overrides the method from WidgetBase. | |
| void | setLineWidth (uint width) |
| Overrides the method from WidgetBase. | |
| void | lwSetFont (QFont font) |
| Set all 'owned' child widgets to this font. | |
| FloatingTextWidget * | getChangeWidget (Uml::Role_Type role) |
| Return the given role's changeability FloatingTextWidget widget. | |
| void | setRoleName (const QString &strRole, Uml::Role_Type role) |
| Sets the text to the FloatingTextWidget that display the Role text of this association. | |
| void | setRoleDoc (const QString &doc, Uml::Role_Type role) |
| Set the documentation on the given role. | |
| UMLClassifier * | getOperationOwner () |
| Overrides operation from LinkWidget. | |
| UMLOperation * | getOperation () |
| Implements operation from LinkWidget. | |
| void | setOperation (UMLOperation *op) |
| Implements operation from LinkWidget. | |
| QString | getCustomOpText () |
| Overrides operation from LinkWidget. | |
| void | setCustomOpText (const QString &opText) |
| Overrides operation from LinkWidget. | |
| void | setMessageText (FloatingTextWidget *ft) |
| Overrides operation from LinkWidget. | |
| UMLAssociation * | getAssociation () const |
| Returns the UMLAssociation representation of this object. | |
| UMLAttribute * | getAttribute () const |
| Returns the UMLAttribute representation of this object. | |
| void | setText (FloatingTextWidget *ft, const QString &text) |
| Sets the text of the FloatingTextWidget identified by the ft's Text_Role. | |
| void | resetTextPositions () |
| Calls setTextPosition() on all the labels. | |
| void | constrainTextPos (int &textX, int &textY, int textWidth, int textHeight, Uml::Text_Role tr) |
| Constrains the FloatingTextWidget X and Y values supplied. | |
| bool | showDialog () |
| Shows the association properties dialog and updates the corresponding texts if its execution is successful. | |
| void | setIndex (int index, Uml::Role_Type role) |
| Sets the Association line index for the given role. | |
| int | getIndex (Uml::Role_Type role) const |
| Returns the Association line index for the given role. | |
| void | setTotalCount (int count, Uml::Role_Type role) |
| Sets the total count on the Association region. | |
| int | getTotalCount (Uml::Role_Type role) const |
| Returns the total count on the Association region. | |
| void | setTotalCount (int count) |
| Sets the total count on the Association region for widgetB. | |
| void | setSeqNumAndOp (const QString &seqNum, const QString &op) |
| Overrides operation from LinkWidget. | |
| UMLClassifier * | getSeqNumAndOp (QString &seqNum, QString &op) |
| Overrides operation from LinkWidget. | |
| void | calculateEndingPoints () |
| Calculates and sets the first and last point in the association's LinePath. | |
| void | removeAssocClassLine () |
| Remove dashed connecting line for association class. | |
| void | computeAssocClassLine () |
| Compute the end points of m_pAssocClassLine in case this association has an attached association class. | |
| void | setUMLObject (UMLObject *obj) |
| Overriding the method from WidgetBase because we need to do something extra in case this AssociationWidget represents an attribute of a classifier. | |
| void | saveToXMI (QDomDocument &qDoc, QDomElement &qElement) |
| Saves this widget to the <assocwidget> XMI element. | |
| bool | loadFromXMI (QDomElement &qElement) |
| Loads this widget from the <assocwidget> XMI element. | |
| bool | loadFromXMI (QDomElement &qElement, const UMLWidgetList &widgets, const MessageWidgetList *pMessages=NULL) |
| Same as above, but uses the supplied widgetList for resolving the role A and role B widgets. | |
| void | cleanup () |
| Cleans up all the association's data in the related widgets. | |
Detailed Description
This class represents an association inside a diagram. This class represents an association inside a diagram. Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org.Associations exist not only between UML objects. For example, when a Note is attached to a UML object, the Note itself is not a UML object. This class supports both kinds of associations. An association where one or both roles are not a UML object is called a "pure widget association".
An AssociationWidget where both roles are UML objects has a corresponding UMLAssociation. The UMLAssociation can be retrieved using the getAssociation method. A pure widget association does not have a corresponding UMLAssociation. The getAssociation method returns NULL in this case.
- Author:
- Gustavo Madrigal
Definition at line 55 of file associationwidget.h.
Member Enumeration Documentation
|
|
Enumeration used for stating where a line is on a widget.
Definition at line 61 of file associationwidget.h. |
Constructor & Destructor Documentation
|
|
Constructor.
Definition at line 53 of file associationwidget.cpp. References WidgetBase::init(). |
|
||||||||||||||||||||||||
|
Constructor.
Definition at line 60 of file associationwidget.cpp. References calculateEndingPoints(), UMLDoc::findAssociation(), UMLView::generateCollaborationId(), WidgetBase::init(), isCollaboration(), setActivated(), setAssocType(), setName(), and setWidget(). |
|
|
Deconstructor.
Definition at line 123 of file associationwidget.cpp. |
Member Function Documentation
|
|
Overrides the assignment operator.
Definition at line 126 of file associationwidget.cpp. References UMLWidget::m_bActivated. |
|
|
Overrides the equality test operator.
Definition at line 180 of file associationwidget.cpp. References getAssocType(), WidgetBase::getBaseType(), ObjectWidget::getLocalID(), getName(), getWidget(), and getWidgetID(). |
|
|
Overrides the != operator.
Definition at line 224 of file associationwidget.cpp. |
|
|
Activates the AssociationWidget after a load.
Definition at line 545 of file associationwidget.cpp. References FloatingTextWidget::activate(), LinePath::activate(), calculateEndingPoints(), calculateNameTextSegment(), createAssocClassLine(), UMLDoc::findObjectById(), UMLView::findWidget(), getAssocType(), UMLAssociation::getAssocType(), UMLObject::getBaseType(), FloatingTextWidget::getText(), UMLView::getType(), getVisibility(), getWidgetID(), setAssocType(), LinePath::setAssocType(), FloatingTextWidget::setLink(), FloatingTextWidget::setRole(), setUMLObject(), and setWidget(). Referenced by UMLView::activate(). |
|
||||||||||||
|
Set the widget of the given role.
Definition at line 3261 of file associationwidget.cpp. References getAssociation(), UMLObject::getBaseType(), and UMLAssociation::setObject(). Referenced by activate(), AssociationWidget(), UMLView::createAutoAssociations(), loadFromXMI(), and setWidgets(). |
|
|
Return the multiplicity FloatingTextWidget widget of the given role.
Definition at line 243 of file associationwidget.cpp. Referenced by UMLView::copyAsImage(). |
|
|
Return the given role's multiplicity text.
Definition at line 247 of file associationwidget.cpp. References FloatingTextWidget::getText(). Referenced by getSeqNumAndOp(), setMessageText(), and showDialog(). |
|
|
Read property of FloatingTextWidget* m_pName.
Definition at line 254 of file associationwidget.cpp. |
|
|
Returns the m_pName's text.
Definition at line 259 of file associationwidget.cpp. References FloatingTextWidget::getText(). Referenced by UMLView::addWidget(), getCustomOpText(), getSeqNumAndOp(), operator==(), setMessageText(), showDialog(), and toString(). |
|
|
Return the given role's FloatingTextWidget object.
Definition at line 265 of file associationwidget.cpp. Referenced by UMLView::copyAsImage(). |
|
|
Return the FloatingTextWidget object indicated by the given Text_Role.
Definition at line 273 of file associationwidget.cpp. |
|
|
Return the given role's FloatingTextWidget widget text.
Definition at line 296 of file associationwidget.cpp. References FloatingTextWidget::getText(). Referenced by UMLView::findAssocWidget(), and showDialog(). |
|
|
Returns the given role's documentation.
Definition at line 302 of file associationwidget.cpp. References UMLObject::getBaseType(), and UMLAssociation::getRoleDoc(). Referenced by showDialog(). |
|
|
Sets the text in the FloatingTextWidget widget representing the Name of this association.
Definition at line 309 of file associationwidget.cpp. References UMLView::addWidget(), getAssociation(), UMLView::removeWidget(), UMLWidget::setActivated(), FloatingTextWidget::setLink(), UMLObject::setName(), and FloatingTextWidget::setText(). Referenced by AssociationWidget(), FloatingTextWidget::handleRename(), loadFromXMI(), setCustomOpText(), setSeqNumAndOp(), setText(), showDialog(), slotMenuSelection(), syncToModel(), and AssocGenPage::updateObject(). |
|
||||||||||||
|
Sets the text in the FloatingTextWidget representing the multiplicity at the given side of the association.
Definition at line 371 of file associationwidget.cpp. References getAssociation(), UMLObject::getBaseType(), and UMLAssociation::setMulti(). Referenced by FloatingTextWidget::handleRename(), loadFromXMI(), setSeqNumAndOp(), setText(), showDialog(), slotMenuSelection(), syncToModel(), and AssocRolePage::updateObject(). |
|
|
Gets the visibility on the given role of the association.
Definition at line 426 of file associationwidget.cpp. References getAssociation(), getAttribute(), UMLObject::getVisibility(), and UMLAssociation::getVisibility(). Referenced by activate(), setRoleName(), setVisibility(), and showDialog(). |
|
||||||||||||
|
Sets the visibility on the given role of the association.
Definition at line 436 of file associationwidget.cpp. References getAssociation(), getAttribute(), UMLObject::getBaseType(), getVisibility(), UMLObject::setVisibility(), UMLAssociation::setVisibility(), and UMLAttribute::toString(). Referenced by loadFromXMI(), showDialog(), syncToModel(), and AssocRolePage::updateObject(). |
|
|
Gets the changeability on the the given end of the Association.
Definition at line 456 of file associationwidget.cpp. References UMLObject::getBaseType(), and UMLAssociation::getChangeability(). Referenced by setChangeability(), and showDialog(). |
|
||||||||||||
|
Sets the changeability on the the given end of the Association.
Definition at line 464 of file associationwidget.cpp. References UMLAssociation::ChangeabilityToString(), getAssociation(), UMLObject::getBaseType(), getChangeability(), and UMLAssociation::setChangeability(). Referenced by FloatingTextWidget::handleRename(), loadFromXMI(), showDialog(), syncToModel(), and AssocRolePage::updateObject(). |
|
|
Gets the ID of the given role widget.
Definition at line 875 of file associationwidget.cpp. References UMLObject::getBaseType(), UMLObject::getID(), and UMLAssociation::getObjectId(). Referenced by activate(), UMLView::findAssocWidget(), operator==(), and saveToXMI(). |
|
|
Gets the given role widget.
Definition at line 677 of file associationwidget.cpp. Referenced by AssocRules::allowAssociation(), getOperationOwner(), getSeqNumAndOp(), UMLView::getWidgetAssocs(), mouseReleaseEvent(), operator==(), UMLView::selectAssociations(), setAssocType(), and UMLView::updateContainment(). |
|
||||||||||||||||
|
Sets the associated widgets.
Definition at line 681 of file associationwidget.cpp. References calculateEndingPoints(), setAssocType(), and setWidget(). |
|
||||||||||||
|
Returns true if this association associates widgetA to widgetB, otherwise it returns false.
Definition at line 701 of file associationwidget.cpp. |
|
|
Returns true if the Widget is either at the starting or ending side of the association.
Definition at line 828 of file associationwidget.cpp. Referenced by UMLView::removeAssociations(). |
|
|
Returns true if this AssociationWidget represents a collaboration message.
Definition at line 832 of file associationwidget.cpp. References getAssocType(). Referenced by AssociationWidget(), getOperationOwner(), mouseReleaseEvent(), setMessageText(), and slotMenuSelection(). |
|
|
Gets the association's type.
Definition at line 837 of file associationwidget.cpp. References UMLAssociation::getAssocType(), and UMLObject::getBaseType(). Referenced by activate(), AssocRules::allowAssociation(), UMLView::findAssocWidget(), isCollaboration(), mouseReleaseEvent(), operator==(), setRoleName(), slotMenuSelection(), toString(), and UMLView::updateContainment(). |
|
|
Sets the association's type.
Definition at line 845 of file associationwidget.cpp. References AssocRules::allowMultiplicity(), AssocRules::allowRole(), getAssociation(), WidgetBase::getBaseType(), UMLObject::getBaseType(), getWidget(), LinePath::setAssocType(), UMLAssociation::setAssocType(), and setRoleDoc(). Referenced by activate(), AssociationWidget(), UMLView::createAutoAssociations(), loadFromXMI(), setWidgets(), and AssocGenPage::updateObject(). |
|
|
Returns a QString object representing this AssociationWidget.
Definition at line 891 of file associationwidget.cpp. References getAssocType(), getName(), and UMLAssociation::m_pRole. |
|
|
Read property of bool m_bActivated.
Definition at line 1181 of file associationwidget.cpp. |
|
|
Set the m_bActivated flag of a widget but does not perform the activate method.
Definition at line 1186 of file associationwidget.cpp. Referenced by AssociationWidget(), UMLView::createAutoAssociations(), and UMLView::updateContainment(). |
|
|
Sets the state of whether the widget is selected.
Definition at line 2972 of file associationwidget.cpp. References selectAssocClassLine(), and LinePath::setSelected(). Referenced by UMLView::getDiagram(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), UMLView::selectAssociations(), and slotClearAllSelected(). |
|
|
Returns the state of whether the widget is selected.
Definition at line 301 of file associationwidget.h. Referenced by UMLWidget::adjustUnselectedAssocs(), UMLView::copyAsImage(), and UMLWidgetController::mouseMoveEvent(). |
|
|
Returns a pointer to the association widget's line path.
Definition at line 308 of file associationwidget.h. |
|
||||||||||||||||
|
Adjusts the ending point of the association that connects to Widget.
Definition at line 1274 of file associationwidget.cpp. References calculateEndingPoints(), LinePath::count(), WidgetBase::getBaseType(), LinePath::getPoint(), UMLWidget::getSelected(), UMLDoc::loading(), and LinePath::setPoint(). Referenced by UMLWidget::adjustAssocs(), and UMLWidget::adjustUnselectedAssocs(). |
|
|
Auxiliary method for widgetMoved(): Saves all ideally computed floatingtext positions before doing any kind of change. This is necessary because a single invocation of calculateEndingPoints() modifies the LinePath ending points on ALL AssociationWidgets. This means that if we don't save the old ideal positions then they are irretrievably lost as soon as calculateEndingPoints() is invoked. Definition at line 1263 of file associationwidget.cpp. Referenced by UMLWidget::adjustAssocs(), and UMLWidget::adjustUnselectedAssocs(). |
|
|
Calculates the m_unNameLineSegment value according to the new NameText topleft corner PT. It iterates through all LinePath's segments and for each one calculates the sum of PT's distance to the start point + PT's distance to the end point. The segment with the smallest sum will be the RoleTextSegment (if this segment moves then the RoleText will move with it). It sets m_unNameLineSegment to the start point of the chosen segment. Overrides operation from LinkWidget (i.e. this method is also required by FloatingTextWidget.) Reimplemented from LinkWidget. Definition at line 1961 of file associationwidget.cpp. References LinePath::count(), and LinePath::getPoint(). Referenced by activate(), mouseDoubleClickEvent(), and moveEntireAssoc(). |
|
|
Adds a break point (if left mouse button).
Definition at line 917 of file associationwidget.cpp. References calculateNameTextSegment(), computeAssocClassLine(), LinePath::count(), LinePath::getPoint(), LinePath::insertPoint(), LinePath::isPoint(), LinePath::onLinePath(), LinePath::removePoint(), UMLDoc::setModified(), LinePath::setSelected(), and LinePath::update(). Referenced by ToolBarStateArrow::mouseDoubleClickAssociation(). |
|
|
Sets the association to be selected.
Definition at line 2168 of file associationwidget.cpp. References onAssocClassLine(), selectAssocClassLine(), and setSelected(). Referenced by ToolBarStateArrow::mousePressAssociation(). |
|
|
Displays the right mouse buttom menu if right button is pressed.
Definition at line 2188 of file associationwidget.cpp. References AssocRules::allowMultiplicity(), AssocRules::allowRole(), LinePath::count(), getAssocType(), WidgetBase::getBaseType(), LinePath::getPoint(), getWidget(), isCollaboration(), onAssocClassLine(), LinePath::removePoint(), setSelected(), and slotMenuSelection(). Referenced by ToolBarStateArrow::mouseReleaseAssociation(). |
|
|
Moves the break point being dragged.
Definition at line 2497 of file associationwidget.cpp. References WidgetBase::getBaseType(), UMLWidget::getHeight(), LinePath::getPoint(), UMLView::getWidgetAt(), UMLWidget::getWidth(), UMLWidget::getX(), UMLWidget::getY(), LinePath::insertPoint(), LinePath::onLinePath(), UMLView::resizeCanvasToItems(), setSelected(), UMLWidget::setX(), UMLWidget::setY(), UMLView::snappedX(), and UMLView::snappedY(). Referenced by ToolBarStateArrow::mouseMoveAssociation(). |
|
|
Returns true if the given point is on the Association.
Definition at line 3021 of file associationwidget.cpp. References onAssocClassLine(), and LinePath::onLinePath(). Referenced by ToolBarState::getAssociationAt(). |
|
|
Returns true if the given point is on the connecting line to the association class. Returns false if there is no association class attached, or if the given point is not on the connecting line. Definition at line 3009 of file associationwidget.cpp. Referenced by mousePressEvent(), mouseReleaseEvent(), and onAssociation(). |
|
|
Creates the association class connecting line.
Definition at line 2097 of file associationwidget.cpp. References computeAssocClassLine(), WidgetBase::getLineColor(), WidgetBase::getLineWidth(), and UMLWidget::setPen(). Referenced by activate(), createAssocClassLine(), and ToolBarStateAssociation::mouseReleaseAssociation(). |
|
||||||||||||
|
Creates the association class connecting line using the specified ClassifierWidget.
Definition at line 2106 of file associationwidget.cpp. References createAssocClassLine(), and ClassifierWidget::setClassAssocWidget(). |
|
|
Renders the association class connecting line selected.
Definition at line 2142 of file associationwidget.cpp. Referenced by mousePressEvent(), removeAssocClassLine(), and setSelected(). |
|
||||||||||||
|
Moves all the mid points (all expcept start /end ) by the given amount.
Definition at line 3040 of file associationwidget.cpp. References LinePath::count(), LinePath::getPoint(), and LinePath::setPoint(). Referenced by moveEntireAssoc(). |
|
||||||||||||
|
Moves the entire association by the given offset.
Definition at line 3054 of file associationwidget.cpp. References calculateEndingPoints(), calculateNameTextSegment(), moveMidPointsBy(), and resetTextPositions(). Referenced by UMLView::activate(), and UMLWidgetController::mouseMoveEvent(). |
|
|
Returns the bounding rectangle of all segments of the association.
Definition at line 3062 of file associationwidget.cpp. References LinePath::count(), LinePath::getPen(), and LinePath::getPoint(). Referenced by UMLView::getDiagramRect(). |
|
|
Return the first font found being used by any child widget. (They could be different fonts, so this is a slightly misleading method.) Definition at line 2442 of file associationwidget.cpp. Referenced by slotMenuSelection(). |
|
|
Overrides the method from WidgetBase.
Reimplemented from WidgetBase. Definition at line 2465 of file associationwidget.cpp. References LinePath::setLineColor(), and WidgetBase::setLineColor(). |
|
|
Overrides the method from WidgetBase.
Reimplemented from WidgetBase. Definition at line 2470 of file associationwidget.cpp. References LinePath::setLineWidth(), and WidgetBase::setLineWidth(). |
|
|
Set all 'owned' child widgets to this font.
Implements LinkWidget. Definition at line 2419 of file associationwidget.cpp. References UMLWidget::setFont(). Referenced by slotMenuSelection(). |
|
|
Return the given role's changeability FloatingTextWidget widget.
Definition at line 269 of file associationwidget.cpp. Referenced by UMLView::copyAsImage(). |
|
||||||||||||
|
Sets the text to the FloatingTextWidget that display the Role text of this association. For this function to work properly, the associated widget should already be set. Definition at line 380 of file associationwidget.cpp. References getAssociation(), getAssocType(), UMLObject::getBaseType(), getVisibility(), UMLAssociation::m_pRole, and UMLAssociation::setRoleName(). Referenced by FloatingTextWidget::handleRename(), loadFromXMI(), setText(), showDialog(), slotMenuSelection(), syncToModel(), and AssocRolePage::updateObject(). |
|
||||||||||||
|
Set the documentation on the given role.
Definition at line 405 of file associationwidget.cpp. References getAssociation(), UMLObject::getBaseType(), and UMLAssociation::setRoleDoc(). Referenced by loadFromXMI(), setAssocType(), showDialog(), and AssocRolePage::updateObject(). |
|
|
Overrides operation from LinkWidget. Required by FloatingTextWidget. Reimplemented from LinkWidget. Definition at line 3226 of file associationwidget.cpp. References WidgetBase::getUMLObject(), getWidget(), and isCollaboration(). |
|
|
Implements operation from LinkWidget. Motivated by FloatingTextWidget. Implements LinkWidget. Definition at line 3214 of file associationwidget.cpp. |
|
|
Implements operation from LinkWidget. Motivated by FloatingTextWidget. Implements LinkWidget. Definition at line 3218 of file associationwidget.cpp. References setMessageText(). |
|
|
Overrides operation from LinkWidget. Required by FloatingTextWidget. Implements LinkWidget. Definition at line 3257 of file associationwidget.cpp. References getName(). |
|
|
Overrides operation from LinkWidget. Required by FloatingTextWidget. Implements LinkWidget. Definition at line 3253 of file associationwidget.cpp. References setName(). |
|
|
Overrides operation from LinkWidget. Required by FloatingTextWidget.
Implements LinkWidget. Definition at line 412 of file associationwidget.cpp. References getMulti(), getName(), LinkWidget::getOperationText(), and isCollaboration(). Referenced by setOperation(). |
|
|
Returns the UMLAssociation representation of this object.
Definition at line 228 of file associationwidget.cpp. References UMLObject::getBaseType(). Referenced by getVisibility(), loadFromXMI(), saveToXMI(), setAssocType(), setChangeability(), setMulti(), setName(), setRoleDoc(), setRoleName(), setVisibility(), setWidget(), and syncToModel(). |
|
|
Returns the UMLAttribute representation of this object.
Definition at line 234 of file associationwidget.cpp. References UMLObject::getBaseType(). Referenced by getVisibility(), setVisibility(), and syncToModel(). |
|
||||||||||||
|
Sets the text of the FloatingTextWidget identified by the ft's Text_Role. Overrides operation from LinkWidget. Required by FloatingTextWidget. Implements LinkWidget. Definition at line 522 of file associationwidget.cpp. References setMulti(), setName(), and setRoleName(). Referenced by DocWindow::newDocumentation(), and DocWindow::showDocumentation(). |
|
|
Calls setTextPosition() on all the labels. Overrides operation from LinkWidget. Reimplemented from LinkWidget. Definition at line 3174 of file associationwidget.cpp. Referenced by moveEntireAssoc(), and slotMenuSelection(). |
|
||||||||||||||||||||||||
|
Constrains the FloatingTextWidget X and Y values supplied. Implements the abstract operation from LinkWidget.
Implements LinkWidget. Definition at line 1822 of file associationwidget.cpp. References LinePath::count(), and LinePath::getPoint(). |
|
|
Shows the association properties dialog and updates the corresponding texts if its execution is successful. Returns true for success. Reimplemented from LinkWidget. Definition at line 2252 of file associationwidget.cpp. References getChangeability(), WidgetBase::getDoc(), getMulti(), getName(), getRoleDoc(), getRoleName(), getVisibility(), setChangeability(), WidgetBase::setDoc(), setMulti(), setName(), setRoleDoc(), setRoleName(), and setVisibility(). Referenced by slotMenuSelection(). |
|
||||||||||||
|
Sets the Association line index for the given role.
Definition at line 3198 of file associationwidget.cpp. |
|
|
Returns the Association line index for the given role.
Definition at line 3202 of file associationwidget.cpp. |
|
||||||||||||
|
Sets the total count on the Association region.
Definition at line 3206 of file associationwidget.cpp. |
|
|
Returns the total count on the Association region.
Definition at line 3210 of file associationwidget.cpp. |
|
|
Sets the total count on the Association region for widgetB.
|
|
||||||||||||
|
Overrides operation from LinkWidget. Required by FloatingTextWidget.
Implements LinkWidget. Definition at line 3239 of file associationwidget.cpp. References setMulti(), and setName(). |
|
||||||||||||
|
Overrides operation from LinkWidget. Required by FloatingTextWidget.
Implements LinkWidget. Definition at line 3245 of file associationwidget.cpp. References getMulti(), getName(), WidgetBase::getUMLObject(), and getWidget(). |
|
|
Calculates and sets the first and last point in the association's LinePath. Each point is a middle point of its respective UMLWidget's bounding rectangle. This method picks which sides to use for the association. Definition at line 1050 of file associationwidget.cpp. References computeAssocClassLine(), LinePath::count(), UMLWidget::getHeight(), LinePath::getPoint(), UMLWidget::getWidth(), UMLWidget::getX(), UMLWidget::getY(), LinePath::insertPoint(), and LinePath::setStartEndPoints(). Referenced by activate(), AssociationWidget(), UMLView::createAutoAssociations(), moveEntireAssoc(), setWidgets(), UMLView::updateContainment(), and widgetMoved(). |
|
|
Remove dashed connecting line for association class.
Definition at line 2085 of file associationwidget.cpp. References selectAssocClassLine(), and ClassifierWidget::setClassAssocWidget(). Referenced by cleanup(), slotMenuSelection(), and ClassifierWidget::~ClassifierWidget(). |
|
|
Compute the end points of m_pAssocClassLine in case this association has an attached association class.
Definition at line 2120 of file associationwidget.cpp. References LinePath::getPoint(). Referenced by ClassifierWidget::adjustAssocs(), calculateEndingPoints(), createAssocClassLine(), and mouseDoubleClickEvent(). |
|
|
Overriding the method from WidgetBase because we need to do something extra in case this AssociationWidget represents an attribute of a classifier.
Reimplemented from WidgetBase. Definition at line 3103 of file associationwidget.cpp. References WidgetBase::setUMLObject(), and slotAttributeRemoved(). Referenced by activate(), UMLView::createAutoAssociations(), and loadFromXMI(). |
|
||||||||||||
|
Saves this widget to the <assocwidget> XMI element.
Reimplemented from WidgetBase. Definition at line 3270 of file associationwidget.cpp. References getAssociation(), WidgetBase::getID(), UMLObject::getID(), getWidgetID(), and LinePath::saveToXMI(). Referenced by UMLDrag::setUMLDataClip4(). |
|
|
Loads this widget from the <assocwidget> XMI element.
Reimplemented from WidgetBase. Definition at line 3576 of file associationwidget.cpp. References UMLView::getMessageList(), and UMLView::getWidgetList(). Referenced by UMLDrag::decodeClip4(). |
|
||||||||||||||||
|
Same as above, but uses the supplied widgetList for resolving the role A and role B widgets. (The other loadFromXMI() queries the UMLView for these widgets.) Required for clipboard operations. Definition at line 3327 of file associationwidget.cpp. References UMLDoc::createUMLAssociation(), UMLDoc::findObjectById(), Widget_Utils::findWidget(), getAssociation(), UMLAssociation::getAssocType(), UMLObject::getBaseType(), LinePath::getPoint(), FloatingTextWidget::getText(), WidgetBase::getUMLObject(), FloatingTextWidget::isTextValid(), FloatingTextWidget::loadFromXMI(), LinePath::loadFromXMI(), UMLAssociation::nrof_parent_widgets, UMLWidget::setActivated(), setAssocType(), setChangeability(), ClassifierWidget::setClassAssocWidget(), WidgetBase::setDoc(), FloatingTextWidget::setLink(), setMulti(), setName(), setRoleDoc(), setRoleName(), setUMLObject(), setVisibility(), and setWidget(). |
|
|
Cleans up all the association's data in the related widgets.
Definition at line 706 of file associationwidget.cpp. References LinePath::cleanup(), UMLObject::getBaseType(), UMLWidget::removeAssoc(), removeAssocClassLine(), and UMLView::removeWidget(). |
|
|
Handles the selection from the popup menu.
Definition at line 2280 of file associationwidget.cpp. References getAssocType(), getFont(), FloatingTextWidget::getText(), isCollaboration(), lwSetFont(), removeAssocClassLine(), UMLView::removeAssocInViewAndDoc(), UMLView::removeWidget(), resetTextPositions(), UMLView::selectionSetLineColor(), UMLDoc::setModified(), setMulti(), setName(), setRoleName(), UMLView::setStartedCut(), showDialog(), UMLApp::slotEditCopy(), UMLApp::slotEditCut(), UMLApp::slotEditPaste(), and FloatingTextWidget::slotMenuSelection(). Referenced by mouseReleaseEvent(), and slotRemovePopupMenu(). |
|
|
This slot is entered when an event has occurred on the views display, most likely a mouse event. Before it sends out that mouse event all children should make sure that they don't have a menu active or there could be more than one popup menu displayed. Definition at line 3027 of file associationwidget.cpp. References slotMenuSelection(). |
|
|
Handles any signals that tells everyone not to be selected.
Definition at line 3036 of file associationwidget.cpp. References setSelected(). |
|
|
Connected to UMLClassifier::attributeRemoved() in case this AssociationWidget is linked to a classifer's attribute type.
Definition at line 3119 of file associationwidget.cpp. References UMLView::removeAssoc(). Referenced by setUMLObject(). |
|
|
Synchronize this widget from the UMLAssociation.
Definition at line 1190 of file associationwidget.cpp. References getAssociation(), getAttribute(), UMLAssociation::getChangeability(), UMLAssociation::getMulti(), UMLObject::getName(), UMLAssociation::getRoleName(), UMLAssociation::getVisibility(), UMLObject::getVisibility(), setChangeability(), setMulti(), setName(), setRoleName(), and setVisibility(). Referenced by UMLView::createAutoAssociations(). |
The documentation for this class was generated from the following files:
