umbrello 2.32.3 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 SPDX-License-Identifier: GPL-2.0-or-later
3 SPDX-FileCopyrightText: 2002-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
4*/
5
6#ifndef ASSOCIATIONWIDGET_H
7#define ASSOCIATIONWIDGET_H
8
9#include "associationwidgetlist.h"
10#include "associationwidgetrole.h"
11#include "linkwidget.h"
12#include "messagewidgetlist.h"
13#include "umlwidgetlist.h"
14#include "widgetbase.h"
15
16 class AssociationLine;
17 class ClassifierWidget;
18 class UMLScene;
19 class UMLAssociation;
20 class UMLAttribute;
21 class UMLClassifierListItem;
22 class UMLOperation;
23
46 class AssociationWidget : public WidgetBase, public LinkWidget
47{
48 Q_OBJECT
49 public:
50 static AssociationWidget* create(UMLScene *scene);
51 static AssociationWidget* create
52 (UMLScene *scene, UMLWidget* WidgetA,
53 Uml::AssociationType::Enum assocType, UMLWidget* WidgetB,
54 UMLObject *umlobject = 0);
55
56 virtual ~AssociationWidget();
57
58 virtual void setUMLObject(UMLObject *obj);
59
60 //---------- LinkWidget Interface methods implementation from now on.
61
62 virtual void lwSetFont(QFont font);
63 virtual UMLClassifier *operationOwner();
64
65 virtual UMLOperation *operation();
66 virtual void setOperation(UMLOperation *op);
67
68 virtual QString customOpText();
69 virtual void setCustomOpText(const QString &opText);
70
71 virtual void resetTextPositions();
72
73 virtual void setMessageText(FloatingTextWidget *ft);
74 virtual void setText(FloatingTextWidget *ft, const QString &newText);
75
76 virtual bool showPropertiesDialog();
77
78 virtual QString lwOperationText();
79 virtual UMLClassifier *lwClassifier();
80 virtual void setOperationText(const QString &op);
81
82 virtual void constrainTextPos(qreal &textX, qreal &textY,
83 qreal textWidth, qreal textHeight,
84 Uml::TextRole::Enum tr);
85
86 virtual void calculateNameTextSegment();
87
88 //---------- End LinkWidget Interface methods implementation.
89
90 UMLAssociation* association() const;
91 UMLAttribute* attribute() const;
92
93// AssociationWidget& operator=(const AssociationWidget& other);
94 bool operator==(const AssociationWidget& other) const;
95 bool operator!=(AssociationWidget& other) const;
96
97 FloatingTextWidget* textWidgetByRole(Uml::TextRole::Enum tr) const;
98
99 FloatingTextWidget* nameWidget() const;
100 QString name() const;
101 void setName(const QString &strRole);
102 void setStereotype(const QString &stereo);
103
104 FloatingTextWidget* roleWidget(Uml::RoleType::Enum role) const;
105 QString roleName(Uml::RoleType::Enum role) const;
106 void setRoleName(const QString &strRole, Uml::RoleType::Enum role);
107
108 QString roleDocumentation(Uml::RoleType::Enum role) const;
109 void setRoleDocumentation(const QString& doc, Uml::RoleType::Enum role);
110
111 FloatingTextWidget* multiplicityWidget(Uml::RoleType::Enum role) const;
112 QString multiplicity(Uml::RoleType::Enum role) const;
113 void setMultiplicity(const QString& text, Uml::RoleType::Enum role);
114
115 Uml::Visibility::Enum visibility(Uml::RoleType::Enum role) const;
116 void setVisibility(Uml::Visibility::Enum value, Uml::RoleType::Enum role);
117
118 FloatingTextWidget* changeabilityWidget(Uml::RoleType::Enum role) const;
119 Uml::Changeability::Enum changeability(Uml::RoleType::Enum role) const;
120 void setChangeability(Uml::Changeability::Enum value, Uml::RoleType::Enum role);
121
122 Uml::ID::Type widgetIDForRole(Uml::RoleType::Enum role) const;
123 Uml::ID::Type widgetLocalIDForRole(Uml::RoleType::Enum role) const;
124 UMLWidget* widgetForRole(Uml::RoleType::Enum role) const;
125 void setWidgetForRole(UMLWidget* widget, Uml::RoleType::Enum role);
126
127 bool containsAsEndpoint(UMLWidget* widget);
128
129 Uml::AssociationType::Enum associationType() const;
130 void setAssociationType(Uml::AssociationType::Enum type);
131
132 bool isCollaboration() const;
133 bool isSelf() const;
134
135 QString toString() const;
136
137 bool isActivated() const;
138 void setActivated(bool active);
139
140 AssociationLine* associationLine() const;
141
142 virtual bool activate(IDChangeLog *changeLog = 0);
143 virtual QRectF boundingRect() const;
144 virtual QPainterPath shape() const;
145
146 void widgetMoved(UMLWidget* widget, qreal x, qreal y);
147
148 void saveIdealTextPositions();
149
150 UMLWidget* onWidget(const QPointF &p);
151 bool onAssociation(const QPointF& point);
152 bool onAssocClassLine(const QPointF& point);
153
154 void createAssocClassLine();
155 void createAssocClassLine(ClassifierWidget* classifierWidget,
156 int linePathSegmentIndex);
157
158 void selectAssocClassLine(bool sel = true);
159 void removeAssocClassLine();
160 void computeAssocClassLine();
161
162 void setXEntireAssoc(qreal x);
163 void setYEntireAssoc(qreal y);
164
165 void moveMidPointsBy(qreal x, qreal y);
166 void moveEntireAssoc(qreal x, qreal y);
167
168 QFont font() const;
169
170 virtual void setTextColor(const QColor &color);
171 virtual void setLineColor(const QColor &color);
172 virtual void setLineWidth(uint width);
173
174 void calculateEndingPoints();
175
176 void clipSize();
177
178 bool loadFromXMI1(QDomElement& qElement, const UMLWidgetList& widgets,
179 const MessageWidgetList* messages);
180 virtual bool loadFromXMI1(QDomElement& qElement);
181 virtual void saveToXMI1(QXmlStreamWriter& writer);
182
183 void cleanup();
184
185 bool isPointAddable();
186 bool isPointRemovable();
187 bool isAutoLayouted();
188 bool isLayoutChangeable();
189
190 virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
191 virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
192 virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
193 virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
194
195 virtual void setSelected(bool _select);
196
197 public Q_SLOTS: //:TODO: all virtual?
198 virtual void slotMenuSelection(QAction* action);
199 void slotClassifierListItemRemoved(UMLClassifierListItem* obj);
200 void slotAttributeChanged();
201
202 void syncToModel();
203
204 protected:
205 virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
206
207 virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
208 virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
209 virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *event);
210
211 private:
212 QPointF calculateTextPosition(Uml::TextRole::Enum role);
213 void setTextPosition(Uml::TextRole::Enum role);
214 void setTextPositionRelatively(Uml::TextRole::Enum role, const QPointF &oldPosition);
215 void setFloatingText(Uml::TextRole::Enum role, const QString& text, FloatingTextWidget* &ft);
216
217 AssociationWidget(UMLScene *scene);
218
219 void setUMLAssociation(UMLAssociation * assoc);
220
221 void mergeAssociationDataIntoUMLRepresentation();
222
223 static Uml::Region::Enum findPointRegion(const QRectF& rect, const QPointF& pos);
224 static qreal findInterceptOnEdge(const QRectF &rect, Uml::Region::Enum region, const QPointF &point);
225 static QLineF::IntersectType intersect(const QRectF &rect, const QLineF &line,
226 QPointF* intersectionPoint);
227
228 void moveEvent(QGraphicsSceneMouseEvent *me);
229
230 Uml::TextRole::Enum calculateNameType(Uml::TextRole::Enum defaultRoleType);
231
232 static QPointF swapXY(const QPointF &p);
233
234 // not used at the moment
235 // static QPointF calculatePointAtDistance(const QPointF &P1, const QPointF &P2, float Distance);
236 // static QPointF calculatePointAtDistanceOnPerpendicular(const QPointF &P1, const QPointF &P2, float Distance);
237 // static float perpendicularProjection(const QPointF& P1, const QPointF& P2, const QPointF& P3, QPointF& ResultingPoint);
238
239 static QPointF midPoint(const QPointF& p0, const QPointF& p1);
240
241 void createPointsSelfAssociation();
242 void updatePointsSelfAssociation();
243 void createPointsException();
244 void updatePointsException();
245
246 void updateRegionLineCount(int index, int totalCount,
247 Uml::Region::Enum region, Uml::RoleType::Enum role);
248
249 void updateAssociations(int totalCount, Uml::Region::Enum region, Uml::RoleType::Enum role);
250
251 int getRegionCount(Uml::Region::Enum region, Uml::RoleType::Enum role);
252
253 void doUpdates(const QPointF &otherP, Uml::RoleType::Enum role);
254
255 void setChangeWidget(const QString &strChangeWidget, Uml::RoleType::Enum role);
256
257 bool checkAddPoint(const QPointF &scenePos);
258 bool checkRemovePoint(const QPointF &scenePos);
259 bool checkAutoLayoutSpline();
260
261 bool linePathStartsAt(const UMLWidget* widget);
262
263 void insertIntoLists(qreal position, const AssociationWidget* assoc);
264
265 qreal m_positions[100];
266 int m_positions_len;
267 AssociationWidgetList m_ordered;
268
269 bool m_activated;
270
278 int m_unNameLineSegment;
279
280 QPointF m_oldNamePoint;
281 QPointF m_oldMultiAPoint;
282 QPointF m_oldMultiBPoint;
283 QPointF m_oldChangeAPoint;
284 QPointF m_oldChangeBPoint;
285 QPointF m_oldRoleAPoint;
286 QPointF m_oldRoleBPoint;
287
288 int m_nLinePathSegmentIndex;
289 QGraphicsLineItem *m_pAssocClassLine;
290 QGraphicsRectItem *m_pAssocClassLineSel0;
291 QGraphicsRectItem *m_pAssocClassLineSel1;
292
293 AssociationLine *m_associationLine;
294 ClassifierWidget *m_associationClass;
295 Uml::AssociationType::Enum m_associationType;
296 AssociationWidgetRole m_role[2];
297 FloatingTextWidget* m_nameWidget;
298 QPointF m_eventScenePos;
299
300};
301
302#endif
associationwidgetlist.h
AssociationWidgetList
QList< QPointer< AssociationWidget > > AssociationWidgetList
Definition: associationwidgetlist.h:15
associationwidgetrole.h
AssociationLine
Definition: associationline.h:101
AssociationWidgetRole
Definition: associationwidgetrole.h:27
AssociationWidget
This class represents an association inside a diagram. Bugs and comments to umbrello-devel@kde....
Definition: associationwidget.h:47
AssociationWidget::linePathStartsAt
bool linePathStartsAt(const UMLWidget *widget)
Definition: associationwidget.cpp:1185
AssociationWidget::widgetLocalIDForRole
Uml::ID::Type widgetLocalIDForRole(Uml::RoleType::Enum role) const
Definition: associationwidget.cpp:1468
AssociationWidget::m_oldChangeAPoint
QPointF m_oldChangeAPoint
Position of role A changeability floatingtext saved by saveIdealTextPositions()
Definition: associationwidget.h:283
AssociationWidget::setXEntireAssoc
void setXEntireAssoc(qreal x)
Definition: associationwidget.cpp:3795
AssociationWidget::boundingRect
virtual QRectF boundingRect() const
Definition: associationwidget.cpp:3854
AssociationWidget::calculateTextPosition
QPointF calculateTextPosition(Uml::TextRole::Enum role)
Definition: associationwidget.cpp:2460
AssociationWidget::syncToModel
void syncToModel()
Definition: associationwidget.cpp:1765
AssociationWidget::hoverLeaveEvent
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
Definition: associationwidget.cpp:3950
AssociationWidget::setWidgetForRole
void setWidgetForRole(UMLWidget *widget, Uml::RoleType::Enum role)
Definition: associationwidget.cpp:787
AssociationWidget::cleanup
void cleanup()
Definition: associationwidget.cpp:1239
AssociationWidget::doUpdates
void doUpdates(const QPointF &otherP, Uml::RoleType::Enum role)
Definition: associationwidget.cpp:1706
AssociationWidget::createPointsSelfAssociation
void createPointsSelfAssociation()
Definition: associationwidget.cpp:1943
AssociationWidget::slotMenuSelection
virtual void slotMenuSelection(QAction *action)
Definition: associationwidget.cpp:2922
AssociationWidget::setTextPosition
void setTextPosition(Uml::TextRole::Enum role)
Definition: associationwidget.cpp:2714
AssociationWidget::setActivated
void setActivated(bool active)
Definition: associationwidget.cpp:1757
AssociationWidget::setOperationText
virtual void setOperationText(const QString &op)
Definition: associationwidget.cpp:459
AssociationWidget::slotAttributeChanged
void slotAttributeChanged()
Definition: associationwidget.cpp:3888
AssociationWidget::moveEntireAssoc
void moveEntireAssoc(qreal x, qreal y)
Definition: associationwidget.cpp:3835
AssociationWidget::setLineColor
virtual void setLineColor(const QColor &color)
Definition: associationwidget.cpp:3157
AssociationWidget::moveMidPointsBy
void moveMidPointsBy(qreal x, qreal y)
Definition: associationwidget.cpp:3819
AssociationWidget::setOperation
virtual void setOperation(UMLOperation *op)
Definition: associationwidget.cpp:306
AssociationWidget::setYEntireAssoc
void setYEntireAssoc(qreal y)
Definition: associationwidget.cpp:3807
AssociationWidget::m_eventScenePos
QPointF m_eventScenePos
holds scene pos of contextMenuEvent()
Definition: associationwidget.h:298
AssociationWidget::loadFromXMI1
bool loadFromXMI1(QDomElement &qElement, const UMLWidgetList &widgets, const MessageWidgetList *messages)
Definition: associationwidget.cpp:4026
AssociationWidget::isCollaboration
bool isCollaboration() const
Definition: associationwidget.cpp:1379
AssociationWidget::mergeAssociationDataIntoUMLRepresentation
void mergeAssociationDataIntoUMLRepresentation()
Definition: associationwidget.cpp:1799
AssociationWidget::m_nameWidget
FloatingTextWidget * m_nameWidget
displays the name of this association
Definition: associationwidget.h:297
AssociationWidget::create
static AssociationWidget * create(UMLScene *scene)
Definition: associationwidget.cpp:98
AssociationWidget::m_role
AssociationWidgetRole m_role[2]
Definition: associationwidget.h:296
AssociationWidget::isAutoLayouted
bool isAutoLayouted()
Definition: associationwidget.cpp:1308
AssociationWidget::getRegionCount
int getRegionCount(Uml::Region::Enum region, Uml::RoleType::Enum role)
Definition: associationwidget.cpp:3301
AssociationWidget::visibility
Uml::Visibility::Enum visibility(Uml::RoleType::Enum role) const
Definition: associationwidget.cpp:1077
AssociationWidget::setMultiplicity
void setMultiplicity(const QString &text, Uml::RoleType::Enum role)
Definition: associationwidget.cpp:1064
AssociationWidget::checkAddPoint
bool checkAddPoint(const QPointF &scenePos)
Definition: associationwidget.cpp:3173
AssociationWidget::name
QString name() const
Definition: associationwidget.cpp:869
AssociationWidget::operation
virtual UMLOperation * operation()
Definition: associationwidget.cpp:297
AssociationWidget::computeAssocClassLine
void computeAssocClassLine()
Definition: associationwidget.cpp:2835
AssociationWidget::m_oldRoleAPoint
QPointF m_oldRoleAPoint
Position of role A name floatingtext saved by saveIdealTextPositions()
Definition: associationwidget.h:285
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:1285
AssociationWidget::customOpText
virtual QString customOpText()
Definition: associationwidget.cpp:321
AssociationWidget::showPropertiesDialog
virtual bool showPropertiesDialog()
Definition: associationwidget.cpp:418
AssociationWidget::onWidget
UMLWidget * onWidget(const QPointF &p)
Definition: associationwidget.cpp:3724
AssociationWidget::changeabilityWidget
FloatingTextWidget * changeabilityWidget(Uml::RoleType::Enum role) const
Definition: associationwidget.cpp:830
AssociationWidget::m_associationLine
AssociationLine * m_associationLine
the definition points for the association line
Definition: associationwidget.h:293
AssociationWidget::saveToXMI1
virtual void saveToXMI1(QXmlStreamWriter &writer)
Definition: associationwidget.cpp:3966
AssociationWidget::createPointsException
void createPointsException()
Definition: associationwidget.cpp:1997
AssociationWidget::createAssocClassLine
void createAssocClassLine()
Definition: associationwidget.cpp:2790
AssociationWidget::m_positions_len
int m_positions_len
auxiliary variable for updateAssociations()
Definition: associationwidget.h:266
AssociationWidget::setSelected
virtual void setSelected(bool _select)
Definition: associationwidget.cpp:3687
AssociationWidget::constrainTextPos
virtual void constrainTextPos(qreal &textX, qreal &textY, qreal textWidth, qreal textHeight, Uml::TextRole::Enum tr)
Definition: associationwidget.cpp:2569
AssociationWidget::updatePointsSelfAssociation
void updatePointsSelfAssociation()
Definition: associationwidget.cpp:1970
AssociationWidget::association
UMLAssociation * association() const
Definition: associationwidget.cpp:519
AssociationWidget::m_oldMultiBPoint
QPointF m_oldMultiBPoint
Position of role B multiplicity floatingtext saved by saveIdealTextPositions()
Definition: associationwidget.h:282
AssociationWidget::attribute
UMLAttribute * attribute() const
Definition: associationwidget.cpp:532
AssociationWidget::associationLine
AssociationLine * associationLine() const
Definition: associationwidget.cpp:657
AssociationWidget::resetTextPositions
virtual void resetTextPositions()
Definition: associationwidget.cpp:339
AssociationWidget::calculateEndingPoints
void calculateEndingPoints()
Definition: associationwidget.cpp:1610
AssociationWidget::m_pAssocClassLine
QGraphicsLineItem * m_pAssocClassLine
used for connecting assoc. class
Definition: associationwidget.h:289
AssociationWidget::updateRegionLineCount
void updateRegionLineCount(int index, int totalCount, Uml::Region::Enum region, Uml::RoleType::Enum role)
Definition: associationwidget.cpp:3538
AssociationWidget::font
QFont font() const
Definition: associationwidget.cpp:3105
AssociationWidget::nameWidget
FloatingTextWidget * nameWidget() const
Definition: associationwidget.cpp:812
AssociationWidget::roleName
QString roleName(Uml::RoleType::Enum role) const
Definition: associationwidget.cpp:944
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:1300
AssociationWidget::setUMLAssociation
void setUMLAssociation(UMLAssociation *assoc)
Definition: associationwidget.cpp:1330
AssociationWidget::setAssociationType
void setAssociationType(Uml::AssociationType::Enum type)
Definition: associationwidget.cpp:1413
AssociationWidget::m_pAssocClassLineSel0
QGraphicsRectItem * m_pAssocClassLineSel0
selection decoration for the start point of the assoc. class line
Definition: associationwidget.h:290
AssociationWidget::clipSize
void clipSize()
Definition: associationwidget.cpp:3899
AssociationWidget::m_activated
bool m_activated
flag which is true if the activate method has been called for this class instance
Definition: associationwidget.h:269
AssociationWidget::mouseDoubleClickEvent
virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
Definition: associationwidget.cpp:1518
AssociationWidget::m_associationType
Uml::AssociationType::Enum m_associationType
is only used if m_pObject is not set
Definition: associationwidget.h:295
AssociationWidget::findPointRegion
static Uml::Region::Enum findPointRegion(const QRectF &rect, const QPointF &pos)
Definition: associationwidget.cpp:2102
AssociationWidget::setMessageText
virtual void setMessageText(FloatingTextWidget *ft)
Definition: associationwidget.cpp:370
AssociationWidget::swapXY
static QPointF swapXY(const QPointF &p)
Definition: associationwidget.cpp:2159
AssociationWidget::updateAssociations
void updateAssociations(int totalCount, Uml::Region::Enum region, Uml::RoleType::Enum role)
Definition: associationwidget.cpp:3462
AssociationWidget::roleDocumentation
QString roleDocumentation(Uml::RoleType::Enum role) const
Definition: associationwidget.cpp:997
AssociationWidget::intersect
static QLineF::IntersectType intersect(const QRectF &rect, const QLineF &line, QPointF *intersectionPoint)
Definition: associationwidget.cpp:3338
AssociationWidget::widgetForRole
UMLWidget * widgetForRole(Uml::RoleType::Enum role) const
Definition: associationwidget.cpp:1231
AssociationWidget::setRoleName
void setRoleName(const QString &strRole, Uml::RoleType::Enum role)
Definition: associationwidget.cpp:957
AssociationWidget::containsAsEndpoint
bool containsAsEndpoint(UMLWidget *widget)
Definition: associationwidget.cpp:1371
AssociationWidget::setTextPositionRelatively
void setTextPositionRelatively(Uml::TextRole::Enum role, const QPointF &oldPosition)
Definition: associationwidget.cpp:2738
AssociationWidget::operator!=
bool operator!=(AssociationWidget &other) const
Definition: associationwidget.cpp:649
AssociationWidget::setRoleDocumentation
void setRoleDocumentation(const QString &doc, Uml::RoleType::Enum role)
Definition: associationwidget.cpp:986
AssociationWidget::checkAutoLayoutSpline
bool checkAutoLayoutSpline()
Definition: associationwidget.cpp:3257
AssociationWidget::onAssociation
bool onAssociation(const QPointF &point)
Definition: associationwidget.cpp:3773
AssociationWidget::mousePressEvent
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event)
Definition: associationwidget.cpp:2884
AssociationWidget::operationOwner
virtual UMLClassifier * operationOwner()
Definition: associationwidget.cpp:279
AssociationWidget::setText
virtual void setText(FloatingTextWidget *ft, const QString &newText)
Definition: associationwidget.cpp:389
AssociationWidget::toString
QString toString() const
Definition: associationwidget.cpp:1485
AssociationWidget::midPoint
static QPointF midPoint(const QPointF &p0, const QPointF &p1)
Definition: associationwidget.cpp:2545
AssociationWidget::lwSetFont
virtual void lwSetFont(QFont font)
Definition: associationwidget.cpp:265
AssociationWidget::multiplicityWidget
FloatingTextWidget * multiplicityWidget(Uml::RoleType::Enum role) const
Definition: associationwidget.cpp:802
AssociationWidget::findInterceptOnEdge
static qreal findInterceptOnEdge(const QRectF &rect, Uml::Region::Enum region, const QPointF &point)
Definition: associationwidget.cpp:3366
AssociationWidget::m_positions
qreal m_positions[100]
auxiliary variable for updateAssociations()
Definition: associationwidget.h:265
AssociationWidget::onAssocClassLine
bool onAssocClassLine(const QPointF &point)
Definition: associationwidget.cpp:3746
AssociationWidget::removeAssocClassLine
void removeAssocClassLine()
Definition: associationwidget.cpp:2773
AssociationWidget::associationType
Uml::AssociationType::Enum associationType() const
Definition: associationwidget.cpp:1400
AssociationWidget::lwClassifier
virtual UMLClassifier * lwClassifier()
Definition: associationwidget.cpp:446
AssociationWidget::saveIdealTextPositions
void saveIdealTextPositions()
Definition: associationwidget.cpp:1852
AssociationWidget::hoverEnterEvent
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event)
Definition: associationwidget.cpp:3942
AssociationWidget::selectAssocClassLine
void selectAssocClassLine(bool sel=true)
Definition: associationwidget.cpp:2873
AssociationWidget::setStereotype
void setStereotype(const QString &stereo)
Definition: associationwidget.cpp:916
AssociationWidget::operator==
bool operator==(const AssociationWidget &other) const
Definition: associationwidget.cpp:600
AssociationWidget::setLineWidth
virtual void setLineWidth(uint width)
Definition: associationwidget.cpp:3165
AssociationWidget::m_oldChangeBPoint
QPointF m_oldChangeBPoint
Position of role B changeability floatingtext saved by saveIdealTextPositions()
Definition: associationwidget.h:284
AssociationWidget::AssociationWidget
AssociationWidget(UMLScene *scene)
Definition: associationwidget.cpp:67
AssociationWidget::setVisibility
void setVisibility(Uml::Visibility::Enum value, Uml::RoleType::Enum role)
Definition: associationwidget.cpp:1091
AssociationWidget::isActivated
bool isActivated() const
Definition: associationwidget.cpp:1749
AssociationWidget::slotClassifierListItemRemoved
void slotClassifierListItemRemoved(UMLClassifierListItem *obj)
Definition: associationwidget.cpp:3874
AssociationWidget::setUMLObject
virtual void setUMLObject(UMLObject *obj)
Definition: associationwidget.cpp:215
AssociationWidget::m_oldNamePoint
QPointF m_oldNamePoint
Position of name floatingtext saved by saveIdealTextPositions()
Definition: associationwidget.h:280
AssociationWidget::roleWidget
FloatingTextWidget * roleWidget(Uml::RoleType::Enum role) const
Definition: associationwidget.cpp:822
AssociationWidget::changeability
Uml::Changeability::Enum changeability(Uml::RoleType::Enum role) const
Definition: associationwidget.cpp:1120
AssociationWidget::m_ordered
AssociationWidgetList m_ordered
auxiliary variable for updateAssociations()
Definition: associationwidget.h:267
AssociationWidget::setName
void setName(const QString &strRole)
Definition: associationwidget.cpp:880
AssociationWidget::m_unNameLineSegment
int m_unNameLineSegment
Definition: associationwidget.h:278
AssociationWidget::isLayoutChangeable
bool isLayoutChangeable()
Definition: associationwidget.cpp:1322
AssociationWidget::m_associationClass
ClassifierWidget * m_associationClass
used if we have an assoc. class
Definition: associationwidget.h:294
AssociationWidget::shape
virtual QPainterPath shape() const
Definition: associationwidget.cpp:3862
AssociationWidget::setChangeWidget
void setChangeWidget(const QString &strChangeWidget, Uml::RoleType::Enum role)
Definition: associationwidget.cpp:1147
AssociationWidget::calculateNameTextSegment
virtual void calculateNameTextSegment()
Definition: associationwidget.cpp:479
AssociationWidget::setFloatingText
void setFloatingText(Uml::TextRole::Enum role, const QString &text, FloatingTextWidget *&ft)
Definition: associationwidget.cpp:1018
AssociationWidget::hoverMoveEvent
virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *event)
Definition: associationwidget.cpp:3958
AssociationWidget::moveEvent
void moveEvent(QGraphicsSceneMouseEvent *me)
Definition: associationwidget.cpp:1530
AssociationWidget::widgetMoved
void widgetMoved(UMLWidget *widget, qreal x, qreal y)
Definition: associationwidget.cpp:1866
AssociationWidget::mouseReleaseEvent
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
Definition: associationwidget.cpp:2914
AssociationWidget::isSelf
bool isSelf() const
Definition: associationwidget.cpp:1390
AssociationWidget::widgetIDForRole
Uml::ID::Type widgetIDForRole(Uml::RoleType::Enum role) const
Definition: associationwidget.cpp:1449
AssociationWidget::m_nLinePathSegmentIndex
int m_nLinePathSegmentIndex
anchor for m_pAssocClassLine
Definition: associationwidget.h:288
AssociationWidget::m_pAssocClassLineSel1
QGraphicsRectItem * m_pAssocClassLineSel1
selection decoration for the end point of the assoc. class line
Definition: associationwidget.h:291
AssociationWidget::textWidgetByRole
FloatingTextWidget * textWidgetByRole(Uml::TextRole::Enum tr) const
Definition: associationwidget.cpp:840
AssociationWidget::m_oldRoleBPoint
QPointF m_oldRoleBPoint
Position of role B name floatingtext saved by saveIdealTextPositions()
Definition: associationwidget.h:286
AssociationWidget::lwOperationText
virtual QString lwOperationText()
Definition: associationwidget.cpp:435
AssociationWidget::checkRemovePoint
bool checkRemovePoint(const QPointF &scenePos)
Definition: associationwidget.cpp:3224
AssociationWidget::setChangeability
void setChangeability(Uml::Changeability::Enum value, Uml::RoleType::Enum role)
Definition: associationwidget.cpp:1131
AssociationWidget::m_oldMultiAPoint
QPointF m_oldMultiAPoint
Position of role A multiplicity floatingtext saved by saveIdealTextPositions()
Definition: associationwidget.h:281
AssociationWidget::multiplicity
QString multiplicity(Uml::RoleType::Enum role) const
Definition: associationwidget.cpp:1053
AssociationWidget::calculateNameType
Uml::TextRole::Enum calculateNameType(Uml::TextRole::Enum defaultRoleType)
Definition: associationwidget.cpp:1206
AssociationWidget::contextMenuEvent
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
Definition: associationwidget.cpp:3914
AssociationWidget::mouseMoveEvent
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event)
Definition: associationwidget.cpp:3266
AssociationWidget::~AssociationWidget
virtual ~AssociationWidget()
Definition: associationwidget.cpp:204
AssociationWidget::setTextColor
virtual void setTextColor(const QColor &color)
Definition: associationwidget.cpp:3133
AssociationWidget::insertIntoLists
void insertIntoLists(qreal position, const AssociationWidget *assoc)
Definition: associationwidget.cpp:3438
AssociationWidget::updatePointsException
void updatePointsException()
Definition: associationwidget.cpp:2021
AssociationWidget::setCustomOpText
virtual void setCustomOpText(const QString &opText)
Definition: associationwidget.cpp:330
AssociationWidget::activate
virtual bool activate(IDChangeLog *changeLog=0)
Definition: associationwidget.cpp:667
ClassifierWidget
Common implementation for class widget and interface widget.
Definition: classifierwidget.h:28
FloatingTextWidget
Displays a line of text or an operation.
Definition: floatingtextwidget.h:32
IDChangeLog
Definition: idchangelog.h:22
LinkWidget
Interface to FloatingTextWidget for AssociationWidget and MessageWidget.
Definition: linkwidget.h:32
UMLAssociation
Sets up association information.
Definition: association.h:29
UMLAttribute
Sets up attribute information.
Definition: attribute.h:23
UMLClassifierListItem
A base class for classifier list items (e.g. attributes)
Definition: classifierlistitem.h:25
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:35
UMLObject
The base class for UML objects.
Definition: umlobject.h:70
UMLOperation
Definition: operation.h:20
UMLScene
Definition: umlscene.h:65
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:36
WidgetBase
Common base class for UMLWidget and AssociationWidget.
Definition: widgetbase.h:101
WidgetBase::rect
QRectF rect() const
Definition: widgetbase.cpp:835
x
int x
Definition: cxx11-lambda-functions-and-expressions.h:4
linkwidget.h
messagewidgetlist.h
MessageWidgetList
QList< QPointer< MessageWidget > > MessageWidgetList
Definition: messagewidgetlist.h:13
Model_Utils::newText
QString newText(UMLObject::ObjectType type)
Definition: model_utils.cpp:620
Uml::AssociationType::Enum
Enum
Definition: basictypes.h:92
Uml::Changeability::Enum
Enum
Definition: basictypes.h:202
Uml::ID::Type
std::string Type
Definition: basictypes.h:371
Uml::Region::Enum
Enum
Definition: basictypes.h:330
Uml::RoleType::Enum
Enum
Definition: basictypes.h:236
Uml::TextRole::Enum
Enum
Definition: basictypes.h:176
Uml::Visibility::Enum
Enum
Definition: basictypes.h:45
umlwidgetlist.h
UMLWidgetList
QList< QPointer< UMLWidget > > UMLWidgetList
Definition: umlwidgetlist.h:13
widgetbase.h