umbrello/umbrello
associationwidget.cpp
Go to the documentation of this file.
437 QPointer<AssocPropDlg> dlg = new AssocPropDlg(static_cast<QWidget*>(m_scene->activeView()), this);
926 m_nameWidget = new FloatingTextWidget(m_scene, calculateNameType(Uml::TextRole::Name), strName);
1135 void AssociationWidget::setChangeability(Uml::Changeability::Enum value, Uml::RoleType::Enum role)
1140 if (m_umlObject && m_umlObject->baseType() == UMLObject::ot_Association) // update our model object
1151 void AssociationWidget::setChangeWidget(const QString &strChangeWidget, Uml::RoleType::Enum role)
1273 updateAssociations(m_role[RoleType::A].m_nTotalCount - 1, m_role[RoleType::A].m_WidgetRegion, RoleType::A);
1275 updateAssociations(m_role[RoleType::B].m_nTotalCount - 1, m_role[RoleType::B].m_WidgetRegion, RoleType::B);
1350 if (!m_selected || associationType() == Uml::AssociationType::Exception || m_associationLine->count() <= 2)
1562 //first see if either the first or last segments moved, else no need to recalculate their point positions
1730 int regionCount = getRegionCount(region, role) + 2; //+2 = (1 for this one and one to halve it)
1918 if (m_role[RoleType::A].multiplicityWidget && !m_role[RoleType::A].multiplicityWidget->isSelected()) {
1921 if (m_role[RoleType::B].multiplicityWidget && !m_role[RoleType::B].multiplicityWidget->isSelected()) {
1924 if (m_role[RoleType::A].changeabilityWidget && !m_role[RoleType::A].changeabilityWidget->isSelected()) {
1927 if (m_role[RoleType::B].changeabilityWidget && !m_role[RoleType::B].changeabilityWidget->isSelected()) {
2166 QPointF AssociationWidget::calculatePointAtDistance(const QPointF &P1, const QPointF &P2, float Distance)
2286 QPointF AssociationWidget::calculatePointAtDistanceOnPerpendicular(const QPointF &P1, const QPointF &P2, float Distance)
2404 float AssociationWidget::perpendicularProjection(const QPointF& P1, const QPointF& P2, const QPointF& P3,
2464 } else if (role == TextRole::MultiB || role == TextRole::ChangeB || role == TextRole::RoleBName) {
2710 if(m_role[RoleType::A].multiplicityWidget && m_role[RoleType::A].multiplicityWidget->getStartMove())
2712 else if(m_role[RoleType::B].multiplicityWidget && m_role[RoleType::B].multiplicityWidget->getStartMove())
2714 else if(m_role[RoleType::A].changeabilityWidget && m_role[RoleType::A].changeabilityWidget->getStartMove())
2716 else if(m_role[RoleType::B].changeabilityWidget && m_role[RoleType::B].changeabilityWidget->getStartMove())
2739 void AssociationWidget::setTextPositionRelatively(Uml::TextRole::Enum role, const QPointF &oldPosition)
2742 if(m_role[RoleType::A].multiplicityWidget && m_role[RoleType::A].multiplicityWidget->getStartMove())
2744 else if(m_role[RoleType::B].multiplicityWidget && m_role[RoleType::B].multiplicityWidget->getStartMove())
2746 else if(m_role[RoleType::A].changeabilityWidget && m_role[RoleType::A].changeabilityWidget->getStartMove())
2748 else if(m_role[RoleType::B].changeabilityWidget && m_role[RoleType::B].changeabilityWidget->getStartMove())
2863 QLineF::IntersectType type = intersect(m_associationClass->mapRectToScene(m_associationClass->boundingRect()),
3712 UMLApp::app()->document()->writeToStatusBar(_select ? i18n("Press Ctrl with left mouse click to delete a point") : "");
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
Definition: associationline.h:111
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 setTextRole(Uml::TextRole::Enum role)
Sets the role type of this FloatingTextWidget.
Definition: floatingtextwidget.cpp:355
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
int closestSegmentIndex(const QPointF &point, qreal delta=Delta) const
Return index of closest segment.
Definition: associationline.cpp:211
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
int selectedCount(bool filterText=false) const
Return the amount of widgets selected.
Definition: umlscene.cpp:1831
void setStartedCut()
Called by the view or any of its children when they start a cut operation.
Definition: umlscene.cpp:3382
void resizeSceneToItems()
Sets the size of the scene to just fit on all the items.
Definition: umlscene.cpp:3700
bool setWidgets(UMLWidget *widgetA, Uml::AssociationType::Enum assocType, UMLWidget *widgetB)
Sets the associated widgets.
Definition: associationwidget.cpp:1247
void removeAssoc(AssociationWidget *pAssoc)
Removes a AssociationWidget from a diagram Physically deletes the AssociationWidget passed in...
Definition: umlscene.cpp:2252
Definition: basictypes.h:284
qreal snappedX(qreal x)
Returns the input coordinate with possible grid-snap applied.
Definition: umlscene.cpp:3605
UMLObject * umlObject() const
Returns the UMLObject set to represent.
Definition: widgetbase.cpp:113
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
UMLAssociation * findAssociation(Uml::AssociationType::Enum assocType, const UMLObject *roleAObj, const UMLObject *roleBObj, bool *swap=0)
Finds an association.
Definition: umldoc.cpp:1102
Definition: basictypes.h:163
virtual void setOperation(UMLOperation *op)
Implements operation from LinkWidget.
Definition: associationwidget.cpp:324
void removeAssocInViewAndDoc(AssociationWidget *assoc)
Removes an AssociationWidget from the association list and removes the corresponding UMLAssociation f...
Definition: umlscene.cpp:2269
void setAssociationType(Uml::AssociationType::Enum assocType)
Sets the assocType of the UMLAssociation.
Definition: association.cpp:589
void setYEntireAssoc(qreal y)
Set all association points to y coordinate.
Definition: associationwidget.cpp:3791
static QString toString(MenuType menu)
Convert enum MenuType to string.
Definition: listpopupmenu.cpp:1986
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
Reset active indices and also push undo command.
Definition: associationline.cpp:1038
Definition: basictypes.h:209
bool operator==(const AssociationWidget &other) const
Overrides the equality test operator.
Definition: associationwidget.cpp:630
Uml::Visibility::Enum visibility() const
Returns the visibility of the object.
Definition: umlobject.cpp:435
UMLDoc * umlDoc() const
This is shortcut method for UMLApp::app()->document().
Definition: widgetbase.cpp:103
virtual void setSeqNumAndOp(const QString &seqNum, const QString &op)
Overrides operation from LinkWidget.
Definition: associationwidget.cpp:487
bool loadFromXMI(QDomElement &qElement)
Loads AssociationLine information saved in qElement XMI element.
Definition: associationline.cpp:295
void slotEditCut()
Put the marked text/object into the clipboard and remove it from the document.
Definition: uml.cpp:1441
Definition: basictypes.h:152
Definition: listpopupmenu.h:162
Definition: basictypes.h:280
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 setVisibility(Uml::Visibility::Enum s)
Reimplementation of method from UMLObject is required as an extra signal, attributeChanged(), is emitted.
Definition: attribute.cpp:86
void setRoleDoc(const QString &doc, Uml::RoleType::Enum role)
Sets the documentation on the given role in the association.
Definition: association.cpp:659
void showDocumentation(UMLObject *object, bool overwrite=false)
Called when a widget wishes to display its documentation in the doc window.
Definition: docwindow.cpp:87
Definition: associationline.h:113
Uml::TextRole::Enum textRole() const
Return the role of the text widget.
Definition: floatingtextwidget.cpp:364
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
Definition: listpopupmenu.h:163
static bool allowMultiplicity(Uml::AssociationType::Enum assocType, WidgetBase::WidgetType widgetType)
Returns whether to allow a multiplicity text for the given association and widget type...
Definition: assocrules.cpp:316
Definition: basictypes.h:210
UMLScene * umlScene() const
Deliver a pointer to the connected UMLView (needed esp.
Definition: widgetbase.cpp:93
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
virtual void setUMLObject(UMLObject *obj)
Sets the UMLObject to represent.
Definition: widgetbase.cpp:123
Definition: basictypes.h:176
void computeAssocClassLine()
Compute the end points of m_pAssocClassLine in case this association has an attached association clas...
Definition: associationwidget.cpp:2844
void setName(const QString &name)
Reimplementation of method from UMLObject is required as an extra signal, attributeChanged(), is emitted.
Definition: attribute.cpp:75
Definition: basictypes.h:113
void updateDocumentation(bool clear=false, bool startup=false)
Call when you wish move changes in the doc window back into the members documentation.
Definition: docwindow.cpp:205
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
virtual void saveToXMI(QDomDocument &qDoc, QDomElement &qElement)
A virtual method to save the properties of this widget into a QDomElement i.e xml.
Definition: widgetbase.cpp:467
Definition: basictypes.h:153
QString multiplicity(Uml::RoleType::Enum role) const
Return the given role's multiplicity text.
Definition: associationwidget.cpp:1062
Definition: basictypes.h:283
void setLink(LinkWidget *l)
Set the LinkWidget that this FloatingTextWidget is related to.
Definition: floatingtextwidget.cpp:335
Definition: listpopupmenu.h:184
Definition: basictypes.h:80
Definition: listpopupmenu.h:193
virtual bool loadFromXMI(QDomElement &qElement)
A virtual method to load the properties of this widget from a QDomElement into this widget...
Definition: widgetbase.cpp:507
Definition: umlobject.h:59
QString toStringI18n(Enum item)
Converts a AssociationType to its string representation.
Definition: basictypes.cpp:323
bool isSelected() const
Returns the state of whether the widget is selected.
Definition: umlwidget.h:87
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
int closestPointIndex(const QPointF &point, qreal delta=Delta) const
Return index of point closer a given delta.
Definition: associationline.cpp:185
FloatingTextWidget * roleWidget(Uml::RoleType::Enum role) const
Return the given role's FloatingTextWidget object.
Definition: associationwidget.cpp:854
virtual void saveToXMI(QDomDocument &qDoc, QDomElement &qElement)
Reimplemented from UMLWidget::saveToXMI to save the widget data into XMI 'floatingtext' element...
Definition: floatingtextwidget.cpp:635
UMLDoc * document() const
Returns a pointer to the current document connected to the KMainWindow instance.
Definition: uml.cpp:872
QRectF boundingRect() const
The points are used for the bounding rect.
Definition: associationline.cpp:715
Definition: associationline.h:112
void setChangeability(Uml::Changeability::Enum value, Uml::RoleType::Enum role)
Sets the changeability of the given role of the UMLAssociation.
Definition: association.cpp:628
QString name() const
Gets the name from the corresponding UMLObject if this widget has an underlying UMLObject; if it does...
Definition: widgetbase.cpp:197
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
static ListPopupMenu * menuFromAction(QAction *action)
Convenience method to extract the ListPopupMenu pointer stored in QAction objects belonging to ListPo...
Definition: listpopupmenu.cpp:1245
void hoverMoveEvent(QGraphicsSceneHoverEvent *event)
Calculates the "to be highlighted" point and segment indicies and updates if necessary.
Definition: associationline.cpp:1074
Definition: basictypes.h:285
void removeAssocClassLine()
Remove dashed connecting line for association class.
Definition: associationwidget.cpp:2782
void setMultiplicity(const QString &multi, Uml::RoleType::Enum role)
Sets the multiplicity of the given role of the UMLAssociation.
Definition: association.cpp:638
QString documentation() const
Used by some child classes to get documentation.
Definition: widgetbase.cpp:157
void syncToModel()
Synchronize this widget from the UMLAssociation.
Definition: associationwidget.cpp:1762
Definition: basictypes.h:102
Definition: basictypes.h:279
Definition: listpopupmenu.h:155
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
Enum fromInt(int item)
Convert a integer item into TextRole representation.
Definition: basictypes.cpp:590
void setObject(UMLObject *obj, Uml::RoleType::Enum role)
Sets the UMLObject playing the given role in the association.
Definition: association.cpp:608
void calculateInitialEndPoints()
This method simply ensures presence of two points and adds the needed points for self associations...
Definition: associationline.cpp:413
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
Uml::ID::Type localID() const
Returns the local ID for this object.
Definition: objectwidget.cpp:100
Definition: basictypes.h:79
static QString toString(ObjectType ot)
Helper function for debug output.
Definition: umlobject.cpp:1094
A convenience class that encapsulates geometry management, handles mouse and hover events...
Definition: associationline.h:105
Definition: listpopupmenu.h:205
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
Enum fromInt(int item)
Convert a integer item into Changeability representation.
Definition: basictypes.cpp:639
virtual QPainterPath shape() const
Returns the shape of all segments of the association.
Definition: associationwidget.cpp:3842
QString toString(Enum item)
Convert AssociationType item into QString representation.
Definition: basictypes.cpp:269
Definition: basictypes.h:162
Definition: listpopupmenu.h:158
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
Definition: basictypes.h:154
void moveEntireAssoc(qreal x, qreal y)
Moves the entire association by the given offset.
Definition: associationwidget.cpp:3822
virtual void slotMenuSelection(QAction *trigger)
This is usually called synchronously after menu.exec() and trigger's parent is always the ListPopupMe...
Definition: widgetbase.cpp:724
int generateCollaborationId()
Used for creating unique name of collaboration messages.
Definition: umlscene.cpp:440
Uml::AssociationType::Enum getAssocType() const
Returns the AssociationType::Enum of the UMLAssociation.
Definition: association.cpp:103
UMLWidget * widgetAt(const QPointF &p)
Tests the given point against all widgets and returns the widget for which the point is within its bo...
Definition: umlscene.cpp:968
void setDocumentation(const QString &doc)
Used by some child classes to set documentation.
Definition: widgetbase.cpp:182
Uml::Changeability::Enum changeability(Uml::RoleType::Enum role) const
Returns the changeability.
Definition: association.cpp:518
virtual void setCustomOpText(const QString &opText)
Overrides operation from LinkWidget.
Definition: associationwidget.cpp:346
AssociationWidgetList & associationList()
Returns a reference to the association list.
Definition: umlscene.cpp:416
void mouseMoveEvent(QGraphicsSceneMouseEvent *event)
Moves the point or line if active.
Definition: associationline.cpp:1020
Definition: basictypes.h:160
void removePoint(int index)
Removes the point at index passed in.
Definition: associationline.cpp:125
bool setEndPoints(const QPointF &start, const QPointF &end)
Sets the start and end points.
Definition: associationline.cpp:258
virtual void setTextColor(const QColor &color)
Set all 'owned' child widgets to this text color.
Definition: associationwidget.cpp:3132
Definition: listpopupmenu.h:161
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
UMLSceneItemList collisions(const QPointF &p, int delta=3)
Definition: umlscene.cpp:1551
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
void saveToXMI(QDomDocument &qDoc, QDomElement &qElement)
Saves association line information into XMI element named "linepath".
Definition: associationline.cpp:348
void setLayout(LayoutType layout)
Set the layout type of the association line.
Definition: associationline.cpp:770
UMLWidget * findWidget(Uml::ID::Type id)
Finds a widget with the given ID.
Definition: umlscene.cpp:1069
Definition: basictypes.h:286
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
QString toString(Enum item, bool mnemonic)
Convert Visibility item into QString representation.
Definition: basictypes.cpp:99
void setModified(bool modified=true)
Sets the modified flag for the document after a modifying action on the view connected to the documen...
Definition: umldoc.cpp:2607
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
Enum fromInt(int item)
Convert a integer item into ProgrammingLanguage representation.
Definition: basictypes.cpp:429
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
Definition: umlobject.h:72
WidgetBase * ownerWidget() const
Utility method to fetch owner of the menu.
Definition: listpopupmenu.cpp:1923
Definition: basictypes.h:81
Definition: basictypes.h:158
bool getIgnoreSnapToGrid() const
Return the value of m_ignoreSnapToGrid.
Definition: umlwidget.cpp:1442
Definition: basictypes.h:277
void selectionSetFont(const QFont &font)
Set the font for all the currently selected items.
Definition: umlscene.cpp:1328
void selectionSetLineColor(const QColor &color)
Set the line color for all the currently selected items.
Definition: umlscene.cpp:1338
Definition: basictypes.h:57
Definition: basictypes.h:157
void setClassAssociationWidget(AssociationWidget *assocwidget)
Set the AssociationWidget when this ClassWidget acts as an association class.
Definition: classifierwidget.cpp:537
Definition: umlobject.h:58
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
bool hasUMLRepresentation(Enum item)
Returns true if the given AssociationType has a representation as a UMLAssociation.
Definition: basictypes.cpp:440
void cleanup()
Removes all the points and signals a geometry update.
Definition: associationline.cpp:145
UMLObject * findObjectById(Uml::ID::Type id)
Used to find a reference to a UMLObject by its ID.
Definition: umldoc.cpp:766
void insertPoint(int index, const QPointF &point)
Inserts the passed in point at the index passed in and recalculates the bounding rect.
Definition: associationline.cpp:114
Definition: umlobject.h:57
Definition: basictypes.h:281
Uml::ID::Type m_nId
This ID is only used when the widget does not have a corresponding UMLObject (i.e.
Definition: widgetbase.h:165
void reconstructSymbols()
This method creates, deletes symbols and collaboration lines based on m_associationWidget->associatio...
Definition: associationline.cpp:452
FloatingTextWidget * changeabilityWidget(Uml::RoleType::Enum role) const
Return the given role's changeability FloatingTextWidget widget.
Definition: associationwidget.cpp:862
QString toString(Enum item)
Convert ModelType item into QString representation.
Definition: basictypes.cpp:39
QPointF point(int index) const
Returns the point at the point index.
Definition: associationline.cpp:67
virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
Adds a break point (if left mouse button).
Definition: associationwidget.cpp:1526
UMLView * activeView() const
Returns the active view associated with this scene.
Definition: umlscene.cpp:193
Definition: basictypes.h:278
Definition: listpopupmenu.h:156
Definition: listpopupmenu.h:190
QString toString(Enum item)
Convert Changeability::Enum value into QString representation.
Definition: basictypes.cpp:605
Definition: basictypes.h:116
void mousePressEvent(QGraphicsSceneMouseEvent *event)
Determines the active point or segment, the latter being given more priority.
Definition: associationline.cpp:996
QString roleName(Uml::RoleType::Enum role) const
Return the given role's FloatingTextWidget widget text.
Definition: associationwidget.cpp:953
void hoverEnterEvent(QGraphicsSceneHoverEvent *event)
Calculates the "to be highlighted" point and segment indicies and updates if necessary.
Definition: associationline.cpp:1050
QList< AssociationWidget * > AssociationWidgetList
Definition: associationwidgetlist.h:18
UMLWidget * findWidget(Uml::ID::Type id, const UMLWidgetList &widgets, const MessageWidgetList *messages)
Find the widget identified by the given ID in the given widget or message list.
Definition: widget_utils.cpp:41
A popup menu that depending on what type is set to will display a different menu. ...
Definition: listpopupmenu.h:40
bool isCollaboration() const
Returns true if this AssociationWidget represents a collaboration message.
Definition: associationwidget.cpp:1408
bool addWidget(UMLWidget *pWidget, bool isPasteOperation=false)
Adds a widget to the view from the given data.
Definition: umlscene.cpp:1890
bool isSelected() const
Returns the state of whether the widget is selected.
Definition: associationwidget.cpp:3665
void setVisibility(Uml::Visibility::Enum value, Uml::RoleType::Enum role)
Sets the visibility of the given role of the UMLAssociation.
Definition: association.cpp:618
static bool isTextValid(const QString &text)
For a text to be valid it must be non-empty, i.e.
Definition: floatingtextwidget.cpp:465
QGraphicsRectItem * decoratePoint(const QPointF &p, QGraphicsItem *parent)
Creates the decoration point.
Definition: widget_utils.cpp:69
QString toString() const
Returns a QString Object representing this AssociationWidget.
Definition: associationwidget.cpp:1494
Uml::Visibility::Enum visibility(Uml::RoleType::Enum role) const
Returns the Visibility of the given role.
Definition: association.cpp:527
QString getRoleDoc(Uml::RoleType::Enum role) const
Returns the documentation assigned to the given role.
Definition: association.cpp:554
Definition: widgetbase.h:54
qreal snappedY(qreal y)
Returns the input coordinate with possible grid-snap applied.
Definition: umlscene.cpp:3623
QString getRoleName(Uml::RoleType::Enum role) const
Returns the name assigned to the role A.
Definition: association.cpp:545
bool setPoint(int index, const QPointF &point)
Sets the point value at given index to point.
Definition: associationline.cpp:79
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
Definition: associationline.h:114
Definition: widgetbase.h:52
void cleanup()
CleansUp all the association's data in the related widgets.
Definition: associationwidget.cpp:1269
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
Reset active indicies and updates.
Definition: associationline.cpp:1096
static bool allowRole(Uml::AssociationType::Enum assocType)
Returns whether to allow a role text for the given association type.
Definition: assocrules.cpp:304
Definition: basictypes.h:282
virtual bool activate()
Activates the AssociationWidget after a load.
Definition: associationwidget.cpp:701
Uml::ID::Type getObjectId(Uml::RoleType::Enum role) const
Returns the ID of the UMLObject assigned to the given role.
Definition: association.cpp:488
static MenuType typeFromAction(QAction *action)
Convenience method to extract the ListPopupMenu type from an action.
Definition: listpopupmenu.cpp:1122
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 setRoleName(const QString &roleName, Uml::RoleType::Enum role)
Sets the name of the given role of the UMLAssociation.
Definition: association.cpp:649
QString getMultiplicity(Uml::RoleType::Enum role) const
Returns the multiplicity assigned to the given role.
Definition: association.cpp:536
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
LayoutType layout() const
Return the layout type of the association line.
Definition: associationline.cpp:761
Common implementation for class widget and interface widget.
Definition: classifierwidget.h:31
MessageWidgetList & messageList()
Returns a reference to the message list.
Definition: umlscene.cpp:432
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
Displays the right mouse buttom menu if right button is pressed.
Definition: associationwidget.cpp:2923
QString toString(Enum item)
Return string corresponding to the given TextRole.
Definition: basictypes.cpp:516
Definition: basictypes.h:161
void slotAttributeChanged()
Connected to UMLObject::modified() in case this AssociationWidget is linked to a classifer's attribut...
Definition: associationwidget.cpp:3868
bool getStartMove() const
Returns whether we triggered the update of position movement.
Definition: umlwidget.h:112
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
bool activate(IDChangeLog *ChangeLog=0)
Activate the FloatingTextWidget after the saved data has been loaded.
Definition: floatingtextwidget.cpp:322
Definition: umlobject.h:68
void setVisibility(Uml::Visibility::Enum value, Uml::RoleType::Enum role)
Sets the visibility on the given role of the association.
Definition: associationwidget.cpp:1100
This class contains the non-graphical information required for a UML Entity.
Definition: entity.h:34
void setText(const QString &t)
Set the main body of text to display.
Definition: floatingtextwidget.cpp:103
FloatingTextWidget * multiplicityWidget(Uml::RoleType::Enum role) const
Return the multiplicity FloatingTextWidget widget of the given role.
Definition: associationwidget.cpp:834
Enum fromInt(int item)
Convert a integer item into RoleType representation.
Definition: basictypes.cpp:739
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.