umbrello/umbrello
associationwidget.h
Go to the documentation of this file.
226 static qreal findInterceptOnEdge(const QRectF &rect, Uml::Region::Enum region, const QPointF &point);
237 // static QPointF calculatePointAtDistance(const QPointF &P1, const QPointF &P2, float Distance);
238 // static QPointF calculatePointAtDistanceOnPerpendicular(const QPointF &P1, const QPointF &P2, float Distance);
239 // 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:110
Uml::Changeability::Enum changeability(Uml::RoleType::Enum role) const
Gets the changeability on the given end of the Association.
Definition: associationwidget.cpp:1143
virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *event)
Reimplemented event handler for hover move events.
Definition: associationwidget.cpp:4019
virtual void setSelected(bool _select)
Sets the state of whether the widget is selected.
Definition: associationwidget.cpp:3698
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:985
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:1092
UMLWidget * onWidget(const QPointF &p)
Reimplement method from WidgetBase in order to check owned floating texts.
Definition: associationwidget.cpp:3749
virtual void setMessageText(FloatingTextWidget *ft)
Overrides operation from LinkWidget.
Definition: associationwidget.cpp:387
qreal x() const
qreal y() const
void setAssociationType(Uml::AssociationType::Enum type)
Sets the association's type.
Definition: associationwidget.cpp:1461
void calculateEndingPoints()
Calculates and sets the first and last point in the Association's AssociationLine.
Definition: associationwidget.cpp:1658
virtual void lwSetFont(QFont font)
Set all 'owned' child widgets to this font.
Definition: associationwidget.cpp:268
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:1266
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event)
Moves the break point being dragged.
Definition: associationwidget.cpp:3277
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event)
Reimplemented event handler for hover enter events.
Definition: associationwidget.cpp:4003
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:323
void setYEntireAssoc(qreal y)
Set all association points to y coordinate.
Definition: associationwidget.cpp:3833
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:637
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:879
void setXEntireAssoc(qreal x)
Set all association points to x coordinate.
Definition: associationwidget.cpp:3821
virtual void setOperationText(const QString &op)
Overrides operation from LinkWidget.
Definition: associationwidget.cpp:495
void moveMidPointsBy(qreal x, qreal y)
Moves all the mid points (all expcept start /end) by the given amount.
Definition: associationwidget.cpp:3845
virtual UMLClassifier * lwClassifier()
Overrides operation from LinkWidget.
Definition: associationwidget.cpp:482
QString roleDocumentation(Uml::RoleType::Enum role) const
Returns the given role's documentation.
Definition: associationwidget.cpp:1025
bool isSelf() const
Returns true if this AssociationWidget represents a self message.
Definition: associationwidget.cpp:1438
void computeAssocClassLine()
Compute the end points of m_pAssocClassLine in case this association has an attached association clas...
Definition: associationwidget.cpp:2895
void selectAssocClassLine(bool sel=true)
Renders the association class connecting line selected.
Definition: associationwidget.cpp:2933
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:338
QString multiplicity(Uml::RoleType::Enum role) const
Return the given role's multiplicity text.
Definition: associationwidget.cpp:1081
virtual void calculateNameTextSegment()
Calculates the m_unNameLineSegment value according to the new NameText topleft corner PT...
Definition: associationwidget.cpp:515
bool onAssociation(const QPointF &point)
Returns true if the given point is on the association line.
Definition: associationwidget.cpp:3799
FloatingTextWidget * roleWidget(Uml::RoleType::Enum role) const
Return the given role's FloatingTextWidget object.
Definition: associationwidget.cpp:861
QGraphicsScene * scene() const
QString tr(const char *sourceText, const char *disambiguation, int n)
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:2613
void removeAssocClassLine()
Remove dashed connecting line for association class.
Definition: associationwidget.cpp:2833
void syncToModel()
Synchronize this widget from the UMLAssociation.
Definition: associationwidget.cpp:1813
virtual int type() const
This class represents an association inside a diagram.
Definition: associationwidget.h:50
virtual UMLOperation * operation()
Implements operation from LinkWidget.
Definition: associationwidget.cpp:314
virtual bool event(QEvent *e)
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:3893
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
Reimplemented event handler for hover leave events.
Definition: associationwidget.cpp:4011
UMLAttribute * attribute() const
Returns the UMLAttribute representation of this object.
Definition: associationwidget.cpp:568
bool containsAsEndpoint(UMLWidget *widget)
Returns true if the Widget is either at the starting or ending side of the association.
Definition: associationwidget.cpp:1419
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event)
Sets the association to be selected.
Definition: associationwidget.cpp:2944
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:4099
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
Event handler for context menu events, called from the line segments.
Definition: associationwidget.cpp:3948
QPointF pos() const
A convenience class that encapsulates geometry management, handles mouse and hover events...
Definition: associationline.h:105
Uml::ID::Type widgetLocalIDForRole(Uml::RoleType::Enum role) const
Gets the local ID of the given role widget.
Definition: associationwidget.cpp:1515
void setName(const QString &strRole)
Sets the text in the FloatingTextWidget widget representing the Name of this association.
Definition: associationwidget.cpp:919
AssociationLine * associationLine() const
Returns a pointer to the association widget's line path.
Definition: associationwidget.cpp:698
UMLAssociation * association() const
Returns the UMLAssociation representation of this object.
Definition: associationwidget.cpp:555
virtual QPainterPath shape() const
Returns the shape of all segments of the association.
Definition: associationwidget.cpp:3881
void setActivated(bool active)
Set the m_activated flag of a widget but does not perform the Activate method.
Definition: associationwidget.cpp:1805
Uml::ID::Type widgetIDForRole(Uml::RoleType::Enum role) const
Gets the ID of the given role widget.
Definition: associationwidget.cpp:1496
void moveEntireAssoc(qreal x, qreal y)
Moves the entire association by the given offset.
Definition: associationwidget.cpp:3861
virtual void setCustomOpText(const QString &opText)
Overrides operation from LinkWidget.
Definition: associationwidget.cpp:347
virtual void setTextColor(const QColor &color)
Set all 'owned' child widgets to this text color.
Definition: associationwidget.cpp:3173
bool isPointRemovable()
Return state if the assocation line point in the near of the last context menu event position is remo...
Definition: associationwidget.cpp:1367
virtual void setUMLObject(UMLObject *obj)
Overriding the method from WidgetBase because we need to do something extra in case this AssociationW...
Definition: associationwidget.cpp:226
QFont font() const
Return the first font found being used by any child widget.
Definition: associationwidget.cpp:3145
QRectF rect() const
return drawing rectangle of widget in local coordinates
Definition: widgetbase.cpp:611
virtual QString lwOperationText()
Overrides operation from LinkWidget.
Definition: associationwidget.cpp:471
void setRoleDocumentation(const QString &doc, Uml::RoleType::Enum role)
Set the documentation on the given role.
Definition: associationwidget.cpp:1014
Uml::Visibility::Enum visibility(Uml::RoleType::Enum role) const
Gets the visibility on the given role of the association.
Definition: associationwidget.cpp:1105
void setChangeability(Uml::Changeability::Enum value, Uml::RoleType::Enum role)
Sets the changeability on the given end of the Association.
Definition: associationwidget.cpp:1154
virtual UMLClassifier * operationOwner()
Overrides operation from LinkWidget.
Definition: associationwidget.cpp:296
bool isPointAddable()
Return state if the assocation line point in the near of the last context menu event position is adda...
Definition: associationwidget.cpp:1352
virtual void saveToXMI(QDomDocument &qDoc, QDomElement &qElement)
Saves this widget to the "assocwidget" XMI element.
Definition: associationwidget.cpp:4027
virtual void slotMenuSelection(QAction *action)
Handles the selection from the popup menu.
Definition: associationwidget.cpp:2982
FloatingTextWidget * changeabilityWidget(Uml::RoleType::Enum role) const
Return the given role's changeability FloatingTextWidget widget.
Definition: associationwidget.cpp:869
void setStereotype(const QString &stereo)
Definition: associationwidget.cpp:955
virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
Adds a break point (if left mouse button).
Definition: associationwidget.cpp:1566
QString roleName(Uml::RoleType::Enum role) const
Return the given role's FloatingTextWidget widget text.
Definition: associationwidget.cpp:972
bool isCollaboration() const
Returns true if this AssociationWidget represents a collaboration message.
Definition: associationwidget.cpp:1427
QString toString() const
Returns a QString Object representing this AssociationWidget.
Definition: associationwidget.cpp:1534
bool onAssocClassLine(const QPointF &point)
Returns true if the given point is on the connecting line to the association class.
Definition: associationwidget.cpp:3772
bool operator!=(AssociationWidget &other) const
Overrides the != operator.
Definition: associationwidget.cpp:690
virtual QRectF boundingRect() const
Returns the bounding rectangle of all segments of the association.
Definition: associationwidget.cpp:3873
void cleanup()
CleansUp all the association's data in the related widgets.
Definition: associationwidget.cpp:1288
virtual bool activate()
Activates the AssociationWidget after a load.
Definition: associationwidget.cpp:708
void setWidgetForRole(UMLWidget *widget, Uml::RoleType::Enum role)
Set the widget of the given role.
Definition: associationwidget.cpp:826
void createAssocClassLine()
Creates the association class connecting line.
Definition: associationwidget.cpp:2850
void widgetMoved(UMLWidget *widget, qreal x, qreal y)
Adjusts the ending point of the association that connects to Widget.
Definition: associationwidget.cpp:1914
UMLWidget * widgetForRole(Uml::RoleType::Enum role) const
Gets the given role widget.
Definition: associationwidget.cpp:1254
virtual void resetTextPositions()
Calls setTextPosition on all the labels.
Definition: associationwidget.cpp:356
Common implementation for class widget and interface widget.
Definition: classifierwidget.h:32
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
Displays the right mouse buttom menu if right button is pressed.
Definition: associationwidget.cpp:2974
void slotAttributeChanged()
Connected to UMLObject::modified() in case this AssociationWidget is linked to a classifer's attribut...
Definition: associationwidget.cpp:3907
void saveIdealTextPositions()
Auxiliary method for widgetMoved(): Saves all ideally computed floatingtext positions before doing an...
Definition: associationwidget.cpp:1900
QPointF scenePos() const
FloatingTextWidget * nameWidget() const
Read property of FloatingTextWidget* m_nameWidget.
Definition: associationwidget.cpp:851
Uml::AssociationType::Enum associationType() const
Gets the association's type.
Definition: associationwidget.cpp:1448
void setVisibility(Uml::Visibility::Enum value, Uml::RoleType::Enum role)
Sets the visibility on the given role of the association.
Definition: associationwidget.cpp:1119
FloatingTextWidget * multiplicityWidget(Uml::RoleType::Enum role) const
Return the multiplicity FloatingTextWidget widget of the given role.
Definition: associationwidget.cpp:841
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:25 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:25 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.