umbrello/umbrello
associationwidget.h
Go to the documentation of this file.
225 static qreal findInterceptOnEdge(const QRectF &rect, Uml::Region::Enum region, const QPointF &point);
236 // static QPointF calculatePointAtDistance(const QPointF &P1, const QPointF &P2, float Distance);
237 // static QPointF calculatePointAtDistanceOnPerpendicular(const QPointF &P1, const QPointF &P2, float Distance);
238 // static float perpendicularProjection(const QPointF& P1, const QPointF& P2, const QPointF& P3, QPointF& ResultingPoint);
static AssociationWidget * create(UMLScene *scene)
This constructor is really only for loading from XMI, otherwise it should not be allowed as it create...
Definition: associationwidget.cpp:111
Uml::Changeability::Enum changeability(Uml::RoleType::Enum role) const
Gets the changeability on the given end of the Association.
Definition: associationwidget.cpp:1124
virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *event)
Reimplemented event handler for hover move events.
Definition: associationwidget.cpp:3980
void setRoleName(const QString &strRole, Uml::RoleType::Enum role)
Sets the text to the FloatingTextWidget that display the Role text of this association.
Definition: associationwidget.cpp:966
void setMultiplicity(const QString &text, Uml::RoleType::Enum role)
Sets the text in the FloatingTextWidget representing the multiplicity at the given side of the associ...
Definition: associationwidget.cpp:1073
virtual void setMessageText(FloatingTextWidget *ft)
Overrides operation from LinkWidget.
Definition: associationwidget.cpp:386
void setAssociationType(Uml::AssociationType::Enum type)
Sets the association's type.
Definition: associationwidget.cpp:1440
void calculateEndingPoints()
Calculates and sets the first and last point in the Association's AssociationLine.
Definition: associationwidget.cpp:1618
virtual void lwSetFont(QFont font)
Set all 'owned' child widgets to this font.
Definition: associationwidget.cpp:269
This class defines the non-graphical information required for a UML Classifier (ie a class or interfa...
Definition: classifier.h:39
bool setWidgets(UMLWidget *widgetA, Uml::AssociationType::Enum assocType, UMLWidget *widgetB)
Sets the associated widgets.
Definition: associationwidget.cpp:1247
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event)
Moves the break point being dragged.
Definition: associationwidget.cpp:3236
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event)
Reimplemented event handler for hover enter events.
Definition: associationwidget.cpp:3964
Classifiers (classes, interfaces) have lists of operations, attributes, templates and others...
Definition: classifierlistitem.h:29
virtual void setOperation(UMLOperation *op)
Implements operation from LinkWidget.
Definition: associationwidget.cpp:324
void setYEntireAssoc(qreal y)
Set all association points to y coordinate.
Definition: associationwidget.cpp:3791
This is an interface realized by AssociationWidget and MessageWidget.
Definition: linkwidget.h:35
bool operator==(const AssociationWidget &other) const
Overrides the equality test operator.
Definition: associationwidget.cpp:630
virtual void setSeqNumAndOp(const QString &seqNum, const QString &op)
Overrides operation from LinkWidget.
Definition: associationwidget.cpp:487
virtual void showPropertiesDialog()
Shows the association properties dialog and updates the corresponding texts if its execution is succe...
Definition: associationwidget.cpp:435
FloatingTextWidget * textWidgetByRole(Uml::TextRole::Enum tr) const
Return the FloatingTextWidget object indicated by the given TextRole::Enum.
Definition: associationwidget.cpp:872
void setXEntireAssoc(qreal x)
Set all association points to x coordinate.
Definition: associationwidget.cpp:3778
virtual UMLClassifier * seqNumAndOp(QString &seqNum, QString &op)
Overrides operation from LinkWidget.
Definition: associationwidget.cpp:471
void moveMidPointsBy(qreal x, qreal y)
Moves all the mid points (all expcept start /end) by the given amount.
Definition: associationwidget.cpp:3804
void setSelected(bool _select=true)
Sets the state of whether the widget is selected.
Definition: associationwidget.cpp:3675
QString roleDocumentation(Uml::RoleType::Enum role) const
Returns the given role's documentation.
Definition: associationwidget.cpp:1006
bool isSelf() const
Returns true if this AssociationWidget represents a self message.
Definition: associationwidget.cpp:1417
void computeAssocClassLine()
Compute the end points of m_pAssocClassLine in case this association has an attached association clas...
Definition: associationwidget.cpp:2844
void selectAssocClassLine(bool sel=true)
Renders the association class connecting line selected.
Definition: associationwidget.cpp:2882
virtual void setText(FloatingTextWidget *ft, const QString &newText)
Sets the text of the given FloatingTextWidget.
Definition: associationwidget.cpp:406
virtual QString customOpText()
Overrides operation from LinkWidget.
Definition: associationwidget.cpp:337
QString multiplicity(Uml::RoleType::Enum role) const
Return the given role's multiplicity text.
Definition: associationwidget.cpp:1062
virtual void calculateNameTextSegment()
Calculates the m_unNameLineSegment value according to the new NameText topleft corner PT...
Definition: associationwidget.cpp:508
bool onAssociation(const QPointF &point)
Returns true if the given point is on the association line.
Definition: associationwidget.cpp:3748
FloatingTextWidget * roleWidget(Uml::RoleType::Enum role) const
Return the given role's FloatingTextWidget object.
Definition: associationwidget.cpp:854
virtual void constrainTextPos(qreal &textX, qreal &textY, qreal textWidth, qreal textHeight, Uml::TextRole::Enum tr)
Constrains the FloatingTextWidget X and Y values supplied.
Definition: associationwidget.cpp:2562
void removeAssocClassLine()
Remove dashed connecting line for association class.
Definition: associationwidget.cpp:2782
void syncToModel()
Synchronize this widget from the UMLAssociation.
Definition: associationwidget.cpp:1762
This class represents an association inside a diagram.
Definition: associationwidget.h:50
virtual UMLOperation * operation()
Implements operation from LinkWidget.
Definition: associationwidget.cpp:315
This class contains the non-graphic representation of an association.
Definition: association.h:32
void slotClassifierListItemRemoved(UMLClassifierListItem *obj)
Connected to UMLClassifier::attributeRemoved() or UMLEntity::constraintRemoved() in case this Associa...
Definition: associationwidget.cpp:3854
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
Reimplemented event handler for hover leave events.
Definition: associationwidget.cpp:3972
UMLAttribute * attribute() const
Returns the UMLAttribute representation of this object.
Definition: associationwidget.cpp:561
bool containsAsEndpoint(UMLWidget *widget)
Returns true if the Widget is either at the starting or ending side of the association.
Definition: associationwidget.cpp:1400
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event)
Sets the association to be selected.
Definition: associationwidget.cpp:2893
bool loadFromXMI(QDomElement &qElement, const UMLWidgetList &widgets, const MessageWidgetList *messages)
Uses the supplied widgetList for resolving the role A and role B widgets.
Definition: associationwidget.cpp:4059
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
Event handler for context menu events, called from the line segments.
Definition: associationwidget.cpp:3909
A convenience class that encapsulates geometry management, handles mouse and hover events...
Definition: associationline.h:105
void setName(const QString &strRole)
Sets the text in the FloatingTextWidget widget representing the Name of this association.
Definition: associationwidget.cpp:912
AssociationLine * associationLine() const
Returns a pointer to the association widget's line path.
Definition: associationwidget.cpp:691
UMLAssociation * association() const
Returns the UMLAssociation representation of this object.
Definition: associationwidget.cpp:548
virtual QPainterPath shape() const
Returns the shape of all segments of the association.
Definition: associationwidget.cpp:3842
void setActivated(bool active)
Set the m_activated flag of a widget but does not perform the Activate method.
Definition: associationwidget.cpp:1754
Uml::ID::Type widgetIDForRole(Uml::RoleType::Enum role) const
Gets the ID of the given role widget.
Definition: associationwidget.cpp:1475
void moveEntireAssoc(qreal x, qreal y)
Moves the entire association by the given offset.
Definition: associationwidget.cpp:3822
virtual void setCustomOpText(const QString &opText)
Overrides operation from LinkWidget.
Definition: associationwidget.cpp:346
virtual void setTextColor(const QColor &color)
Set all 'owned' child widgets to this text color.
Definition: associationwidget.cpp:3132
bool isPointRemovable()
Return state if the assocation line point in the near of the last context menu event position is remo...
Definition: associationwidget.cpp:1348
virtual void setUMLObject(UMLObject *obj)
Overriding the method from WidgetBase because we need to do something extra in case this AssociationW...
Definition: associationwidget.cpp:227
QFont font() const
Return the first font found being used by any child widget.
Definition: associationwidget.cpp:3104
QRectF rect() const
return drawing rectangle of widget in local coordinates
Definition: widgetbase.cpp:600
void setRoleDocumentation(const QString &doc, Uml::RoleType::Enum role)
Set the documentation on the given role.
Definition: associationwidget.cpp:995
Uml::Visibility::Enum visibility(Uml::RoleType::Enum role) const
Gets the visibility on the given role of the association.
Definition: associationwidget.cpp:1086
void setChangeability(Uml::Changeability::Enum value, Uml::RoleType::Enum role)
Sets the changeability on the given end of the Association.
Definition: associationwidget.cpp:1135
virtual UMLClassifier * operationOwner()
Overrides operation from LinkWidget.
Definition: associationwidget.cpp:297
bool isPointAddable()
Return state if the assocation line point in the near of the last context menu event position is adda...
Definition: associationwidget.cpp:1333
virtual void saveToXMI(QDomDocument &qDoc, QDomElement &qElement)
Saves this widget to the "assocwidget" XMI element.
Definition: associationwidget.cpp:3988
virtual void slotMenuSelection(QAction *action)
Handles the selection from the popup menu.
Definition: associationwidget.cpp:2931
FloatingTextWidget * changeabilityWidget(Uml::RoleType::Enum role) const
Return the given role's changeability FloatingTextWidget widget.
Definition: associationwidget.cpp:862
virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
Adds a break point (if left mouse button).
Definition: associationwidget.cpp:1526
QString roleName(Uml::RoleType::Enum role) const
Return the given role's FloatingTextWidget widget text.
Definition: associationwidget.cpp:953
QList< AssociationWidget * > AssociationWidgetList
Definition: associationwidgetlist.h:18
bool isCollaboration() const
Returns true if this AssociationWidget represents a collaboration message.
Definition: associationwidget.cpp:1408
bool isSelected() const
Returns the state of whether the widget is selected.
Definition: associationwidget.cpp:3665
QString toString() const
Returns a QString Object representing this AssociationWidget.
Definition: associationwidget.cpp:1494
bool onAssocClassLine(const QPointF &point)
Returns true if the given point is on the connecting line to the association class.
Definition: associationwidget.cpp:3721
bool operator!=(AssociationWidget &other) const
Overrides the != operator.
Definition: associationwidget.cpp:683
virtual QRectF boundingRect() const
Returns the bounding rectangle of all segments of the association.
Definition: associationwidget.cpp:3834
void cleanup()
CleansUp all the association's data in the related widgets.
Definition: associationwidget.cpp:1269
virtual bool activate()
Activates the AssociationWidget after a load.
Definition: associationwidget.cpp:701
void setWidgetForRole(UMLWidget *widget, Uml::RoleType::Enum role)
Set the widget of the given role.
Definition: associationwidget.cpp:819
void createAssocClassLine()
Creates the association class connecting line.
Definition: associationwidget.cpp:2799
void widgetMoved(UMLWidget *widget, qreal x, qreal y)
Adjusts the ending point of the association that connects to Widget.
Definition: associationwidget.cpp:1863
UMLWidget * widgetForRole(Uml::RoleType::Enum role) const
Gets the given role widget.
Definition: associationwidget.cpp:1235
virtual void resetTextPositions()
Calls setTextPosition on all the labels.
Definition: associationwidget.cpp:355
void slotClearAllSelected()
Handles any signals that tells everyone not to be selected.
Definition: associationwidget.cpp:3770
Common implementation for class widget and interface widget.
Definition: classifierwidget.h:31
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
Displays the right mouse buttom menu if right button is pressed.
Definition: associationwidget.cpp:2923
void slotAttributeChanged()
Connected to UMLObject::modified() in case this AssociationWidget is linked to a classifer's attribut...
Definition: associationwidget.cpp:3868
void saveIdealTextPositions()
Auxiliary method for widgetMoved(): Saves all ideally computed floatingtext positions before doing an...
Definition: associationwidget.cpp:1849
FloatingTextWidget * nameWidget() const
Read property of FloatingTextWidget* m_nameWidget.
Definition: associationwidget.cpp:844
Uml::AssociationType::Enum associationType() const
Gets the association's type.
Definition: associationwidget.cpp:1427
void setVisibility(Uml::Visibility::Enum value, Uml::RoleType::Enum role)
Sets the visibility on the given role of the association.
Definition: associationwidget.cpp:1100
FloatingTextWidget * multiplicityWidget(Uml::RoleType::Enum role) const
Return the multiplicity FloatingTextWidget widget of the given role.
Definition: associationwidget.cpp:834
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:05:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:05:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.