umbrello: umbrello/umlwidgets/associationwidget.h Source File

umbrello 2.32.0 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

associationwidget.h
Go to the documentation of this file.
1 /***************************************************************************
2 * This program is free software; you can redistribute it and/or modify *
3 * it under the terms of the GNU General Public License as published by *
4 * the Free Software Foundation; either version 2 of the License, or *
5 * (at your option) any later version. *
6 * *
7 * copyright (C) 2002-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef ASSOCIATIONWIDGET_H
12 #define ASSOCIATIONWIDGET_H
13
14 #include "associationwidgetlist.h"
15 #include "associationwidgetrole.h"
16 #include "linkwidget.h"
17 #include "messagewidgetlist.h"
18 #include "umlwidgetlist.h"
19 #include "widgetbase.h"
20
21 class AssociationLine;
22 class ClassifierWidget;
23 class UMLScene;
24 class UMLAssociation;
25 class UMLAttribute;
26 class UMLClassifierListItem;
27 class UMLOperation;
28
51 class AssociationWidget : public WidgetBase, public LinkWidget
52 {
53 Q_OBJECT
54 public:
55 static AssociationWidget* create(UMLScene *scene);
56 static AssociationWidget* create
57 (UMLScene *scene, UMLWidget* WidgetA,
58 Uml::AssociationType::Enum assocType, UMLWidget* WidgetB,
59 UMLObject *umlobject = 0);
60
61 virtual ~AssociationWidget();
62
63 virtual void setUMLObject(UMLObject *obj);
64
65 //---------- LinkWidget Interface methods implementation from now on.
66
67 virtual void lwSetFont(QFont font);
68 virtual UMLClassifier *operationOwner();
69
70 virtual UMLOperation *operation();
71 virtual void setOperation(UMLOperation *op);
72
73 virtual QString customOpText();
74 virtual void setCustomOpText(const QString &opText);
75
76 virtual void resetTextPositions();
77
78 virtual void setMessageText(FloatingTextWidget *ft);
79 virtual void setText(FloatingTextWidget *ft, const QString &newText);
80
81 virtual bool showPropertiesDialog();
82
83 virtual QString lwOperationText();
84 virtual UMLClassifier *lwClassifier();
85 virtual void setOperationText(const QString &op);
86
87 virtual void constrainTextPos(qreal &textX, qreal &textY,
88 qreal textWidth, qreal textHeight,
89 Uml::TextRole::Enum tr);
90
91 virtual void calculateNameTextSegment();
92
93 //---------- End LinkWidget Interface methods implementation.
94
95 UMLAssociation* association() const;
96 UMLAttribute* attribute() const;
97
98 // AssociationWidget& operator=(const AssociationWidget& other);
99 bool operator==(const AssociationWidget& other) const;
100 bool operator!=(AssociationWidget& other) const;
101
102 FloatingTextWidget* textWidgetByRole(Uml::TextRole::Enum tr) const;
103
104 FloatingTextWidget* nameWidget() const;
105 QString name() const;
106 void setName(const QString &strRole);
107 void setStereotype(const QString &stereo);
108
109 FloatingTextWidget* roleWidget(Uml::RoleType::Enum role) const;
110 QString roleName(Uml::RoleType::Enum role) const;
111 void setRoleName(const QString &strRole, Uml::RoleType::Enum role);
112
113 QString roleDocumentation(Uml::RoleType::Enum role) const;
114 void setRoleDocumentation(const QString& doc, Uml::RoleType::Enum role);
115
116 FloatingTextWidget* multiplicityWidget(Uml::RoleType::Enum role) const;
117 QString multiplicity(Uml::RoleType::Enum role) const;
118 void setMultiplicity(const QString& text, Uml::RoleType::Enum role);
119
120 Uml::Visibility::Enum visibility(Uml::RoleType::Enum role) const;
121 void setVisibility(Uml::Visibility::Enum value, Uml::RoleType::Enum role);
122
123 FloatingTextWidget* changeabilityWidget(Uml::RoleType::Enum role) const;
124 Uml::Changeability::Enum changeability(Uml::RoleType::Enum role) const;
125 void setChangeability(Uml::Changeability::Enum value, Uml::RoleType::Enum role);
126
127 Uml::ID::Type widgetIDForRole(Uml::RoleType::Enum role) const;
128 Uml::ID::Type widgetLocalIDForRole(Uml::RoleType::Enum role) const;
129 UMLWidget* widgetForRole(Uml::RoleType::Enum role) const;
130 void setWidgetForRole(UMLWidget* widget, Uml::RoleType::Enum role);
131
132 bool containsAsEndpoint(UMLWidget* widget);
133
134 Uml::AssociationType::Enum associationType() const;
135 void setAssociationType(Uml::AssociationType::Enum type);
136
137 bool isCollaboration() const;
138 bool isSelf() const;
139
140 QString toString() const;
141
142 bool isActivated() const;
143 void setActivated(bool active);
144
145 AssociationLine* associationLine() const;
146
147 virtual bool activate(IDChangeLog *changeLog = 0);
148 virtual QRectF boundingRect() const;
149 virtual QPainterPath shape() const;
150
151 void widgetMoved(UMLWidget* widget, qreal x, qreal y);
152
153 void saveIdealTextPositions();
154
155 UMLWidget* onWidget(const QPointF &p);
156 bool onAssociation(const QPointF& point);
157 bool onAssocClassLine(const QPointF& point);
158
159 void createAssocClassLine();
160 void createAssocClassLine(ClassifierWidget* classifierWidget,
161 int linePathSegmentIndex);
162
163 void selectAssocClassLine(bool sel = true);
164 void removeAssocClassLine();
165 void computeAssocClassLine();
166
167 void setXEntireAssoc(qreal x);
168 void setYEntireAssoc(qreal y);
169
170 void moveMidPointsBy(qreal x, qreal y);
171 void moveEntireAssoc(qreal x, qreal y);
172
173 QFont font() const;
174
175 virtual void setTextColor(const QColor &color);
176 virtual void setLineColor(const QColor &color);
177 virtual void setLineWidth(uint width);
178
179 void calculateEndingPoints();
180
181 void clipSize();
182
183 bool loadFromXMI1(QDomElement& qElement, const UMLWidgetList& widgets,
184 const MessageWidgetList* messages);
185 virtual bool loadFromXMI1(QDomElement& qElement);
186 virtual void saveToXMI1(QXmlStreamWriter& writer);
187
188 void cleanup();
189
190 bool isPointAddable();
191 bool isPointRemovable();
192 bool isAutoLayouted();
193 bool isLayoutChangeable();
194
195 virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
196 virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
197 virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
198 virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
199
200 virtual void setSelected(bool _select);
201
202 public Q_SLOTS: //:TODO: all virtual?
203 virtual void slotMenuSelection(QAction* action);
204 void slotClassifierListItemRemoved(UMLClassifierListItem* obj);
205 void slotAttributeChanged();
206
207 void syncToModel();
208
209 protected:
210 virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
211
212 virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
213 virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
214 virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *event);
215
216 private:
217 QPointF calculateTextPosition(Uml::TextRole::Enum role);
218 void setTextPosition(Uml::TextRole::Enum role);
219 void setTextPositionRelatively(Uml::TextRole::Enum role, const QPointF &oldPosition);
220 void setFloatingText(Uml::TextRole::Enum role, const QString& text, FloatingTextWidget* &ft);
221
222 AssociationWidget(UMLScene *scene);
223
224 void setUMLAssociation(UMLAssociation * assoc);
225
226 void mergeAssociationDataIntoUMLRepresentation();
227
228 static Uml::Region::Enum findPointRegion(const QRectF& rect, const QPointF& pos);
229 static qreal findInterceptOnEdge(const QRectF &rect, Uml::Region::Enum region, const QPointF &point);
230 static QLineF::IntersectType intersect(const QRectF &rect, const QLineF &line,
231 QPointF* intersectionPoint);
232
233 void moveEvent(QGraphicsSceneMouseEvent *me);
234
235 Uml::TextRole::Enum calculateNameType(Uml::TextRole::Enum defaultRoleType);
236
237 static QPointF swapXY(const QPointF &p);
238
239 // not used at the moment
240 // static QPointF calculatePointAtDistance(const QPointF &P1, const QPointF &P2, float Distance);
241 // static QPointF calculatePointAtDistanceOnPerpendicular(const QPointF &P1, const QPointF &P2, float Distance);
242 // static float perpendicularProjection(const QPointF& P1, const QPointF& P2, const QPointF& P3, QPointF& ResultingPoint);
243
244 static QPointF midPoint(const QPointF& p0, const QPointF& p1);
245
246 void createPointsSelfAssociation();
247 void updatePointsSelfAssociation();
248 void createPointsException();
249 void updatePointsException();
250
251 void updateRegionLineCount(int index, int totalCount,
252 Uml::Region::Enum region, Uml::RoleType::Enum role);
253
254 void updateAssociations(int totalCount, Uml::Region::Enum region, Uml::RoleType::Enum role);
255
256 int getRegionCount(Uml::Region::Enum region, Uml::RoleType::Enum role);
257
258 void doUpdates(const QPointF &otherP, Uml::RoleType::Enum role);
259
260 void setChangeWidget(const QString &strChangeWidget, Uml::RoleType::Enum role);
261
262 bool checkAddPoint(const QPointF &scenePos);
263 bool checkRemovePoint(const QPointF &scenePos);
264 bool checkAutoLayoutSpline();
265
266 bool linePathStartsAt(const UMLWidget* widget);
267
268 void insertIntoLists(qreal position, const AssociationWidget* assoc);
269
270 qreal m_positions[100];
271 int m_positions_len;
272 AssociationWidgetList m_ordered;
273
274 bool m_activated;
275
283 int m_unNameLineSegment;
284
285 QPointF m_oldNamePoint;
286 QPointF m_oldMultiAPoint;
287 QPointF m_oldMultiBPoint;
288 QPointF m_oldChangeAPoint;
289 QPointF m_oldChangeBPoint;
290 QPointF m_oldRoleAPoint;
291 QPointF m_oldRoleBPoint;
292
293 int m_nLinePathSegmentIndex;
294 QGraphicsLineItem *m_pAssocClassLine;
295 QGraphicsRectItem *m_pAssocClassLineSel0;
296 QGraphicsRectItem *m_pAssocClassLineSel1;
297
298 AssociationLine *m_associationLine;
299 ClassifierWidget *m_associationClass;
300 Uml::AssociationType::Enum m_associationType;
301 AssociationWidgetRole m_role[2];
302 FloatingTextWidget* m_nameWidget;
303 QPointF m_eventScenePos;
304
305 };
306
307 #endif
associationwidgetlist.h
AssociationWidgetList
QList< QPointer< AssociationWidget > > AssociationWidgetList
Definition: associationwidgetlist.h:19
associationwidgetrole.h
AssociationLine
Definition: associationline.h:106
AssociationWidgetRole
Definition: associationwidgetrole.h:32
AssociationWidget
This class represents an association inside a diagram. Bugs and comments to umbrello-devel@kde....
Definition: associationwidget.h:52
AssociationWidget::linePathStartsAt
bool linePathStartsAt(const UMLWidget *widget)
Definition: associationwidget.cpp:1190
AssociationWidget::widgetLocalIDForRole
Uml::ID::Type widgetLocalIDForRole(Uml::RoleType::Enum role) const
Definition: associationwidget.cpp:1473
AssociationWidget::m_oldChangeAPoint
QPointF m_oldChangeAPoint
Position of role A changeability floatingtext saved by saveIdealTextPositions()
Definition: associationwidget.h:288
AssociationWidget::setXEntireAssoc
void setXEntireAssoc(qreal x)
Definition: associationwidget.cpp:3800
AssociationWidget::boundingRect
virtual QRectF boundingRect() const
Definition: associationwidget.cpp:3859
AssociationWidget::calculateTextPosition
QPointF calculateTextPosition(Uml::TextRole::Enum role)
Definition: associationwidget.cpp:2465
AssociationWidget::syncToModel
void syncToModel()
Definition: associationwidget.cpp:1770
AssociationWidget::hoverLeaveEvent
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
Definition: associationwidget.cpp:3955
AssociationWidget::setWidgetForRole
void setWidgetForRole(UMLWidget *widget, Uml::RoleType::Enum role)
Definition: associationwidget.cpp:792
AssociationWidget::cleanup
void cleanup()
Definition: associationwidget.cpp:1244
AssociationWidget::doUpdates
void doUpdates(const QPointF &otherP, Uml::RoleType::Enum role)
Definition: associationwidget.cpp:1711
AssociationWidget::createPointsSelfAssociation
void createPointsSelfAssociation()
Definition: associationwidget.cpp:1948
AssociationWidget::slotMenuSelection
virtual void slotMenuSelection(QAction *action)
Definition: associationwidget.cpp:2927
AssociationWidget::setTextPosition
void setTextPosition(Uml::TextRole::Enum role)
Definition: associationwidget.cpp:2719
AssociationWidget::setActivated
void setActivated(bool active)
Definition: associationwidget.cpp:1762
AssociationWidget::setOperationText
virtual void setOperationText(const QString &op)
Definition: associationwidget.cpp:464
AssociationWidget::slotAttributeChanged
void slotAttributeChanged()
Definition: associationwidget.cpp:3893
AssociationWidget::moveEntireAssoc
void moveEntireAssoc(qreal x, qreal y)
Definition: associationwidget.cpp:3840
AssociationWidget::setLineColor
virtual void setLineColor(const QColor &color)
Definition: associationwidget.cpp:3162
AssociationWidget::moveMidPointsBy
void moveMidPointsBy(qreal x, qreal y)
Definition: associationwidget.cpp:3824
AssociationWidget::setOperation
virtual void setOperation(UMLOperation *op)
Definition: associationwidget.cpp:311
AssociationWidget::setYEntireAssoc
void setYEntireAssoc(qreal y)
Definition: associationwidget.cpp:3812
AssociationWidget::m_eventScenePos
QPointF m_eventScenePos
holds scene pos of contextMenuEvent()
Definition: associationwidget.h:303
AssociationWidget::loadFromXMI1
bool loadFromXMI1(QDomElement &qElement, const UMLWidgetList &widgets, const MessageWidgetList *messages)
Definition: associationwidget.cpp:4031
AssociationWidget::isCollaboration
bool isCollaboration() const
Definition: associationwidget.cpp:1384
AssociationWidget::mergeAssociationDataIntoUMLRepresentation
void mergeAssociationDataIntoUMLRepresentation()
Definition: associationwidget.cpp:1804
AssociationWidget::m_nameWidget
FloatingTextWidget * m_nameWidget
displays the name of this association
Definition: associationwidget.h:302
AssociationWidget::create
static AssociationWidget * create(UMLScene *scene)
Definition: associationwidget.cpp:103
AssociationWidget::m_role
AssociationWidgetRole m_role[2]
Definition: associationwidget.h:301
AssociationWidget::isAutoLayouted
bool isAutoLayouted()
Definition: associationwidget.cpp:1313
AssociationWidget::getRegionCount
int getRegionCount(Uml::Region::Enum region, Uml::RoleType::Enum role)
Definition: associationwidget.cpp:3306
AssociationWidget::visibility
Uml::Visibility::Enum visibility(Uml::RoleType::Enum role) const
Definition: associationwidget.cpp:1082
AssociationWidget::setMultiplicity
void setMultiplicity(const QString &text, Uml::RoleType::Enum role)
Definition: associationwidget.cpp:1069
AssociationWidget::checkAddPoint
bool checkAddPoint(const QPointF &scenePos)
Definition: associationwidget.cpp:3178
AssociationWidget::name
QString name() const
Definition: associationwidget.cpp:874
AssociationWidget::operation
virtual UMLOperation * operation()
Definition: associationwidget.cpp:302
AssociationWidget::computeAssocClassLine
void computeAssocClassLine()
Definition: associationwidget.cpp:2840
AssociationWidget::m_oldRoleAPoint
QPointF m_oldRoleAPoint
Position of role A name floatingtext saved by saveIdealTextPositions()
Definition: associationwidget.h:290
AssociationWidget::isPointAddable
bool isPointAddable()
Return state if the association line point in the near of the last context menu event position is add...
Definition: associationwidget.cpp:1290
AssociationWidget::customOpText
virtual QString customOpText()
Definition: associationwidget.cpp:326
AssociationWidget::showPropertiesDialog
virtual bool showPropertiesDialog()
Definition: associationwidget.cpp:423
AssociationWidget::onWidget
UMLWidget * onWidget(const QPointF &p)
Definition: associationwidget.cpp:3729
AssociationWidget::changeabilityWidget
FloatingTextWidget * changeabilityWidget(Uml::RoleType::Enum role) const
Definition: associationwidget.cpp:835
AssociationWidget::m_associationLine
AssociationLine * m_associationLine
the definition points for the association line
Definition: associationwidget.h:298
AssociationWidget::saveToXMI1
virtual void saveToXMI1(QXmlStreamWriter &writer)
Definition: associationwidget.cpp:3971
AssociationWidget::createPointsException
void createPointsException()
Definition: associationwidget.cpp:2002
AssociationWidget::createAssocClassLine
void createAssocClassLine()
Definition: associationwidget.cpp:2795
AssociationWidget::m_positions_len
int m_positions_len
auxiliary variable for updateAssociations()
Definition: associationwidget.h:271
AssociationWidget::setSelected
virtual void setSelected(bool _select)
Definition: associationwidget.cpp:3692
AssociationWidget::constrainTextPos
virtual void constrainTextPos(qreal &textX, qreal &textY, qreal textWidth, qreal textHeight, Uml::TextRole::Enum tr)
Definition: associationwidget.cpp:2574
AssociationWidget::updatePointsSelfAssociation
void updatePointsSelfAssociation()
Definition: associationwidget.cpp:1975
AssociationWidget::association
UMLAssociation * association() const
Definition: associationwidget.cpp:524
AssociationWidget::m_oldMultiBPoint
QPointF m_oldMultiBPoint
Position of role B multiplicity floatingtext saved by saveIdealTextPositions()
Definition: associationwidget.h:287
AssociationWidget::attribute
UMLAttribute * attribute() const
Definition: associationwidget.cpp:537
AssociationWidget::associationLine
AssociationLine * associationLine() const
Definition: associationwidget.cpp:662
AssociationWidget::resetTextPositions
virtual void resetTextPositions()
Definition: associationwidget.cpp:344
AssociationWidget::calculateEndingPoints
void calculateEndingPoints()
Definition: associationwidget.cpp:1615
AssociationWidget::m_pAssocClassLine
QGraphicsLineItem * m_pAssocClassLine
used for connecting assoc. class
Definition: associationwidget.h:294
AssociationWidget::updateRegionLineCount
void updateRegionLineCount(int index, int totalCount, Uml::Region::Enum region, Uml::RoleType::Enum role)
Definition: associationwidget.cpp:3543
AssociationWidget::font
QFont font() const
Definition: associationwidget.cpp:3110
AssociationWidget::nameWidget
FloatingTextWidget * nameWidget() const
Definition: associationwidget.cpp:817
AssociationWidget::roleName
QString roleName(Uml::RoleType::Enum role) const
Definition: associationwidget.cpp:949
AssociationWidget::isPointRemovable
bool isPointRemovable()
Return state if the association line point in the near of the last context menu event position is rem...
Definition: associationwidget.cpp:1305
AssociationWidget::setUMLAssociation
void setUMLAssociation(UMLAssociation *assoc)
Definition: associationwidget.cpp:1335
AssociationWidget::setAssociationType
void setAssociationType(Uml::AssociationType::Enum type)
Definition: associationwidget.cpp:1418
AssociationWidget::m_pAssocClassLineSel0
QGraphicsRectItem * m_pAssocClassLineSel0
selection decoration for the start point of the assoc. class line
Definition: associationwidget.h:295
AssociationWidget::clipSize
void clipSize()
Definition: associationwidget.cpp:3904
AssociationWidget::m_activated
bool m_activated
flag which is true if the activate method has been called for this class instance
Definition: associationwidget.h:274
AssociationWidget::mouseDoubleClickEvent
virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
Definition: associationwidget.cpp:1523
AssociationWidget::m_associationType
Uml::AssociationType::Enum m_associationType
is only used if m_pObject is not set
Definition: associationwidget.h:300
AssociationWidget::findPointRegion
static Uml::Region::Enum findPointRegion(const QRectF &rect, const QPointF &pos)
Definition: associationwidget.cpp:2107
AssociationWidget::setMessageText
virtual void setMessageText(FloatingTextWidget *ft)
Definition: associationwidget.cpp:375
AssociationWidget::swapXY
static QPointF swapXY(const QPointF &p)
Definition: associationwidget.cpp:2164
AssociationWidget::updateAssociations
void updateAssociations(int totalCount, Uml::Region::Enum region, Uml::RoleType::Enum role)
Definition: associationwidget.cpp:3467
AssociationWidget::roleDocumentation
QString roleDocumentation(Uml::RoleType::Enum role) const
Definition: associationwidget.cpp:1002
AssociationWidget::intersect
static QLineF::IntersectType intersect(const QRectF &rect, const QLineF &line, QPointF *intersectionPoint)
Definition: associationwidget.cpp:3343
AssociationWidget::widgetForRole
UMLWidget * widgetForRole(Uml::RoleType::Enum role) const
Definition: associationwidget.cpp:1236
AssociationWidget::setRoleName
void setRoleName(const QString &strRole, Uml::RoleType::Enum role)
Definition: associationwidget.cpp:962
AssociationWidget::containsAsEndpoint
bool containsAsEndpoint(UMLWidget *widget)
Definition: associationwidget.cpp:1376
AssociationWidget::setTextPositionRelatively
void setTextPositionRelatively(Uml::TextRole::Enum role, const QPointF &oldPosition)
Definition: associationwidget.cpp:2743
AssociationWidget::operator!=
bool operator!=(AssociationWidget &other) const
Definition: associationwidget.cpp:654
AssociationWidget::setRoleDocumentation
void setRoleDocumentation(const QString &doc, Uml::RoleType::Enum role)
Definition: associationwidget.cpp:991
AssociationWidget::checkAutoLayoutSpline
bool checkAutoLayoutSpline()
Definition: associationwidget.cpp:3262
AssociationWidget::onAssociation
bool onAssociation(const QPointF &point)
Definition: associationwidget.cpp:3778
AssociationWidget::mousePressEvent
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event)
Definition: associationwidget.cpp:2889
AssociationWidget::operationOwner
virtual UMLClassifier * operationOwner()
Definition: associationwidget.cpp:284
AssociationWidget::setText
virtual void setText(FloatingTextWidget *ft, const QString &newText)
Definition: associationwidget.cpp:394
AssociationWidget::toString
QString toString() const
Definition: associationwidget.cpp:1490
AssociationWidget::midPoint
static QPointF midPoint(const QPointF &p0, const QPointF &p1)
Definition: associationwidget.cpp:2550
AssociationWidget::lwSetFont
virtual void lwSetFont(QFont font)
Definition: associationwidget.cpp:270
AssociationWidget::multiplicityWidget
FloatingTextWidget * multiplicityWidget(Uml::RoleType::Enum role) const
Definition: associationwidget.cpp:807
AssociationWidget::findInterceptOnEdge
static qreal findInterceptOnEdge(const QRectF &rect, Uml::Region::Enum region, const QPointF &point)
Definition: associationwidget.cpp:3371
AssociationWidget::m_positions
qreal m_positions[100]
auxiliary variable for updateAssociations()
Definition: associationwidget.h:270
AssociationWidget::onAssocClassLine
bool onAssocClassLine(const QPointF &point)
Definition: associationwidget.cpp:3751
AssociationWidget::removeAssocClassLine
void removeAssocClassLine()
Definition: associationwidget.cpp:2778
AssociationWidget::associationType
Uml::AssociationType::Enum associationType() const
Definition: associationwidget.cpp:1405
AssociationWidget::lwClassifier
virtual UMLClassifier * lwClassifier()
Definition: associationwidget.cpp:451
AssociationWidget::saveIdealTextPositions
void saveIdealTextPositions()
Definition: associationwidget.cpp:1857
AssociationWidget::hoverEnterEvent
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event)
Definition: associationwidget.cpp:3947
AssociationWidget::selectAssocClassLine
void selectAssocClassLine(bool sel=true)
Definition: associationwidget.cpp:2878
AssociationWidget::setStereotype
void setStereotype(const QString &stereo)
Definition: associationwidget.cpp:921
AssociationWidget::operator==
bool operator==(const AssociationWidget &other) const
Definition: associationwidget.cpp:605
AssociationWidget::setLineWidth
virtual void setLineWidth(uint width)
Definition: associationwidget.cpp:3170
AssociationWidget::m_oldChangeBPoint
QPointF m_oldChangeBPoint
Position of role B changeability floatingtext saved by saveIdealTextPositions()
Definition: associationwidget.h:289
AssociationWidget::AssociationWidget
AssociationWidget(UMLScene *scene)
Definition: associationwidget.cpp:72
AssociationWidget::setVisibility
void setVisibility(Uml::Visibility::Enum value, Uml::RoleType::Enum role)
Definition: associationwidget.cpp:1096
AssociationWidget::isActivated
bool isActivated() const
Definition: associationwidget.cpp:1754
AssociationWidget::slotClassifierListItemRemoved
void slotClassifierListItemRemoved(UMLClassifierListItem *obj)
Definition: associationwidget.cpp:3879
AssociationWidget::setUMLObject
virtual void setUMLObject(UMLObject *obj)
Definition: associationwidget.cpp:220
AssociationWidget::m_oldNamePoint
QPointF m_oldNamePoint
Position of name floatingtext saved by saveIdealTextPositions()
Definition: associationwidget.h:285
AssociationWidget::roleWidget
FloatingTextWidget * roleWidget(Uml::RoleType::Enum role) const
Definition: associationwidget.cpp:827
AssociationWidget::changeability
Uml::Changeability::Enum changeability(Uml::RoleType::Enum role) const
Definition: associationwidget.cpp:1125
AssociationWidget::m_ordered
AssociationWidgetList m_ordered
auxiliary variable for updateAssociations()
Definition: associationwidget.h:272
AssociationWidget::setName
void setName(const QString &strRole)
Definition: associationwidget.cpp:885
AssociationWidget::m_unNameLineSegment
int m_unNameLineSegment
Definition: associationwidget.h:283
AssociationWidget::isLayoutChangeable
bool isLayoutChangeable()
Definition: associationwidget.cpp:1327
AssociationWidget::m_associationClass
ClassifierWidget * m_associationClass
used if we have an assoc. class
Definition: associationwidget.h:299
AssociationWidget::shape
virtual QPainterPath shape() const
Definition: associationwidget.cpp:3867
AssociationWidget::setChangeWidget
void setChangeWidget(const QString &strChangeWidget, Uml::RoleType::Enum role)
Definition: associationwidget.cpp:1152
AssociationWidget::calculateNameTextSegment
virtual void calculateNameTextSegment()
Definition: associationwidget.cpp:484
AssociationWidget::setFloatingText
void setFloatingText(Uml::TextRole::Enum role, const QString &text, FloatingTextWidget *&ft)
Definition: associationwidget.cpp:1023
AssociationWidget::hoverMoveEvent
virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *event)
Definition: associationwidget.cpp:3963
AssociationWidget::moveEvent
void moveEvent(QGraphicsSceneMouseEvent *me)
Definition: associationwidget.cpp:1535
AssociationWidget::widgetMoved
void widgetMoved(UMLWidget *widget, qreal x, qreal y)
Definition: associationwidget.cpp:1871
AssociationWidget::mouseReleaseEvent
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
Definition: associationwidget.cpp:2919
AssociationWidget::isSelf
bool isSelf() const
Definition: associationwidget.cpp:1395
AssociationWidget::widgetIDForRole
Uml::ID::Type widgetIDForRole(Uml::RoleType::Enum role) const
Definition: associationwidget.cpp:1454
AssociationWidget::m_nLinePathSegmentIndex
int m_nLinePathSegmentIndex
anchor for m_pAssocClassLine
Definition: associationwidget.h:293
AssociationWidget::m_pAssocClassLineSel1
QGraphicsRectItem * m_pAssocClassLineSel1
selection decoration for the end point of the assoc. class line
Definition: associationwidget.h:296
AssociationWidget::textWidgetByRole
FloatingTextWidget * textWidgetByRole(Uml::TextRole::Enum tr) const
Definition: associationwidget.cpp:845
AssociationWidget::m_oldRoleBPoint
QPointF m_oldRoleBPoint
Position of role B name floatingtext saved by saveIdealTextPositions()
Definition: associationwidget.h:291
AssociationWidget::lwOperationText
virtual QString lwOperationText()
Definition: associationwidget.cpp:440
AssociationWidget::checkRemovePoint
bool checkRemovePoint(const QPointF &scenePos)
Definition: associationwidget.cpp:3229
AssociationWidget::setChangeability
void setChangeability(Uml::Changeability::Enum value, Uml::RoleType::Enum role)
Definition: associationwidget.cpp:1136
AssociationWidget::m_oldMultiAPoint
QPointF m_oldMultiAPoint
Position of role A multiplicity floatingtext saved by saveIdealTextPositions()
Definition: associationwidget.h:286
AssociationWidget::multiplicity
QString multiplicity(Uml::RoleType::Enum role) const
Definition: associationwidget.cpp:1058
AssociationWidget::calculateNameType
Uml::TextRole::Enum calculateNameType(Uml::TextRole::Enum defaultRoleType)
Definition: associationwidget.cpp:1211
AssociationWidget::contextMenuEvent
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
Definition: associationwidget.cpp:3919
AssociationWidget::mouseMoveEvent
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event)
Definition: associationwidget.cpp:3271
AssociationWidget::~AssociationWidget
virtual ~AssociationWidget()
Definition: associationwidget.cpp:209
AssociationWidget::setTextColor
virtual void setTextColor(const QColor &color)
Definition: associationwidget.cpp:3138
AssociationWidget::insertIntoLists
void insertIntoLists(qreal position, const AssociationWidget *assoc)
Definition: associationwidget.cpp:3443
AssociationWidget::updatePointsException
void updatePointsException()
Definition: associationwidget.cpp:2026
AssociationWidget::setCustomOpText
virtual void setCustomOpText(const QString &opText)
Definition: associationwidget.cpp:335
AssociationWidget::activate
virtual bool activate(IDChangeLog *changeLog=0)
Definition: associationwidget.cpp:672
ClassifierWidget
Common implementation for class widget and interface widget.
Definition: classifierwidget.h:33
FloatingTextWidget
Displays a line of text or an operation.
Definition: floatingtextwidget.h:37
IDChangeLog
Definition: idchangelog.h:27
LinkWidget
Interface to FloatingTextWidget for AssociationWidget and MessageWidget.
Definition: linkwidget.h:37
UMLAssociation
Sets up association information.
Definition: association.h:34
UMLAttribute
Sets up attribute information.
Definition: attribute.h:28
UMLClassifierListItem
A base class for classifier list items (e.g. attributes)
Definition: classifierlistitem.h:30
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:40
UMLObject
The base class for UML objects.
Definition: umlobject.h:75
UMLOperation
Definition: operation.h:25
UMLScene
Definition: umlscene.h:70
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:41
WidgetBase
Common base class for UMLWidget and AssociationWidget.
Definition: widgetbase.h:106
WidgetBase::rect
QRectF rect() const
Definition: widgetbase.cpp:840
x
int x
Definition: cxx11-lambda-functions-and-expressions.h:4
linkwidget.h
messagewidgetlist.h
MessageWidgetList
QList< QPointer< MessageWidget > > MessageWidgetList
Definition: messagewidgetlist.h:18
Model_Utils::newText
QString newText(UMLObject::ObjectType type)
Definition: model_utils.cpp:625
Uml::AssociationType::Enum
Enum
Definition: basictypes.h:106
Uml::Changeability::Enum
Enum
Definition: basictypes.h:216
Uml::ID::Type
std::string Type
Definition: basictypes.h:385
Uml::Region::Enum
Enum
Definition: basictypes.h:344
Uml::RoleType::Enum
Enum
Definition: basictypes.h:250
Uml::TextRole::Enum
Enum
Definition: basictypes.h:190
Uml::Visibility::Enum
Enum
Definition: basictypes.h:59
umlwidgetlist.h
UMLWidgetList
QList< QPointer< UMLWidget > > UMLWidgetList
Definition: umlwidgetlist.h:17
widgetbase.h