umbrello/umbrello
#include <associationwidget.h>
Public Slots | |
void | slotAttributeChanged () |
void | slotClassifierListItemRemoved (UMLClassifierListItem *obj) |
void | slotClearAllSelected () |
virtual void | slotMenuSelection (QAction *action) |
void | syncToModel () |
Public Slots inherited from WidgetBase | |
virtual void | slotMenuSelection (QAction *trigger) |
Public Member Functions | |
virtual | ~AssociationWidget () |
virtual bool | activate () |
UMLAssociation * | association () const |
AssociationLine * | associationLine () const |
Uml::AssociationType::Enum | associationType () const |
UMLAttribute * | attribute () const |
virtual QRectF | boundingRect () const |
void | calculateEndingPoints () |
virtual void | calculateNameTextSegment () |
Uml::Changeability::Enum | changeability (Uml::RoleType::Enum role) const |
FloatingTextWidget * | changeabilityWidget (Uml::RoleType::Enum role) const |
void | cleanup () |
void | clipSize () |
void | computeAssocClassLine () |
virtual void | constrainTextPos (qreal &textX, qreal &textY, qreal textWidth, qreal textHeight, Uml::TextRole::Enum tr) |
bool | containsAsEndpoint (UMLWidget *widget) |
void | createAssocClassLine () |
void | createAssocClassLine (ClassifierWidget *classifierWidget, int linePathSegmentIndex) |
virtual QString | customOpText () |
QFont | font () const |
bool | isActivated () const |
bool | isCollaboration () const |
bool | isPointAddable () |
bool | isPointRemovable () |
bool | isSelected () const |
bool | isSelf () const |
bool | loadFromXMI (QDomElement &qElement, const UMLWidgetList &widgets, const MessageWidgetList *messages) |
virtual bool | loadFromXMI (QDomElement &qElement) |
virtual void | lwSetFont (QFont font) |
virtual void | mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) |
virtual void | mouseMoveEvent (QGraphicsSceneMouseEvent *event) |
virtual void | mousePressEvent (QGraphicsSceneMouseEvent *event) |
virtual void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) |
void | moveEntireAssoc (qreal x, qreal y) |
void | moveMidPointsBy (qreal x, qreal y) |
QString | multiplicity (Uml::RoleType::Enum role) const |
FloatingTextWidget * | multiplicityWidget (Uml::RoleType::Enum role) const |
QString | name () const |
FloatingTextWidget * | nameWidget () const |
bool | onAssocClassLine (const QPointF &point) |
bool | onAssociation (const QPointF &point) |
virtual UMLOperation * | operation () |
virtual UMLClassifier * | operationOwner () |
bool | operator!= (AssociationWidget &other) const |
bool | operator== (const AssociationWidget &other) const |
void | removeAssocClassLine () |
virtual void | resetTextPositions () |
QString | roleDocumentation (Uml::RoleType::Enum role) const |
QString | roleName (Uml::RoleType::Enum role) const |
FloatingTextWidget * | roleWidget (Uml::RoleType::Enum role) const |
void | saveIdealTextPositions () |
virtual void | saveToXMI (QDomDocument &qDoc, QDomElement &qElement) |
void | selectAssocClassLine (bool sel=true) |
virtual UMLClassifier * | seqNumAndOp (QString &seqNum, QString &op) |
void | setActivated (bool active) |
void | setAssociationType (Uml::AssociationType::Enum type) |
void | setChangeability (Uml::Changeability::Enum value, Uml::RoleType::Enum role) |
virtual void | setCustomOpText (const QString &opText) |
virtual void | setMessageText (FloatingTextWidget *ft) |
void | setMultiplicity (const QString &text, Uml::RoleType::Enum role) |
void | setName (const QString &strRole) |
virtual void | setOperation (UMLOperation *op) |
void | setRoleDocumentation (const QString &doc, Uml::RoleType::Enum role) |
void | setRoleName (const QString &strRole, Uml::RoleType::Enum role) |
void | setSelected (bool _select=true) |
virtual void | setSeqNumAndOp (const QString &seqNum, const QString &op) |
virtual void | setText (FloatingTextWidget *ft, const QString &newText) |
virtual void | setTextColor (const QColor &color) |
virtual void | setUMLObject (UMLObject *obj) |
void | setVisibility (Uml::Visibility::Enum value, Uml::RoleType::Enum role) |
void | setWidgetForRole (UMLWidget *widget, Uml::RoleType::Enum role) |
bool | setWidgets (UMLWidget *widgetA, Uml::AssociationType::Enum assocType, UMLWidget *widgetB) |
void | setXEntireAssoc (qreal x) |
void | setYEntireAssoc (qreal y) |
virtual QPainterPath | shape () const |
virtual void | showPropertiesDialog () |
FloatingTextWidget * | textWidgetByRole (Uml::TextRole::Enum tr) const |
QString | toString () const |
Uml::Visibility::Enum | visibility (Uml::RoleType::Enum role) const |
UMLWidget * | widgetForRole (Uml::RoleType::Enum role) const |
Uml::ID::Type | widgetIDForRole (Uml::RoleType::Enum role) const |
void | widgetMoved (UMLWidget *widget, qreal x, qreal y) |
Public Member Functions inherited from WidgetBase | |
WidgetBase (UMLScene *scene, WidgetType type=wt_UMLWidget) | |
virtual | ~WidgetBase () |
WidgetType | baseType () const |
QLatin1String | baseTypeStr () const |
QString | documentation () const |
QColor | fillColor () const |
bool | hasDocumentation () |
Uml::ID::Type | id () const |
QColor | lineColor () const |
uint | lineWidth () const |
QString | name () const |
WidgetBase & | operator= (const WidgetBase &other) |
virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0) |
QRectF | rect () const |
void | setDocumentation (const QString &doc) |
virtual void | setFillColor (const QColor &color) |
virtual void | setFont (const QFont &font) |
void | setID (Uml::ID::Type id) |
virtual void | setLineColor (const QColor &color) |
virtual void | setLineWidth (uint width) |
void | setName (const QString &strName) |
void | setRect (const QRectF &rect) |
void | setRect (qreal x, qreal y, qreal width, qreal height) |
void | setUseFillColor (bool state) |
void | setUsesDiagramFillColor (bool state) |
void | setUsesDiagramLineColor (bool state) |
void | setUsesDiagramLineWidth (bool state) |
void | setUsesDiagramTextColor (bool state) |
void | setUsesDiagramUseFillColor (bool state) |
QColor | textColor () const |
UMLDoc * | umlDoc () const |
UMLObject * | umlObject () const |
UMLScene * | umlScene () const |
bool | useFillColor () |
bool | usesDiagramFillColor () const |
bool | usesDiagramLineColor () const |
bool | usesDiagramLineWidth () const |
bool | usesDiagramTextColor () const |
bool | usesDiagramUseFillColor () const |
Public Member Functions inherited from LinkWidget | |
LinkWidget () | |
virtual | ~LinkWidget () |
QString | operationText (UMLScene *scene=0) |
Static Public Member Functions | |
static AssociationWidget * | create (UMLScene *scene) |
static AssociationWidget * | create (UMLScene *scene, UMLWidget *WidgetA, Uml::AssociationType::Enum assocType, UMLWidget *WidgetB, UMLObject *umlobject=NULL) |
Static Public Member Functions inherited from WidgetBase | |
static QString | toString (WidgetType wt) |
Protected Member Functions | |
virtual void | contextMenuEvent (QGraphicsSceneContextMenuEvent *event) |
virtual void | hoverEnterEvent (QGraphicsSceneHoverEvent *event) |
virtual void | hoverLeaveEvent (QGraphicsSceneHoverEvent *event) |
virtual void | hoverMoveEvent (QGraphicsSceneHoverEvent *event) |
Protected Member Functions inherited from WidgetBase | |
virtual void | setupContextMenuActions (ListPopupMenu &menu) |
Additional Inherited Members | |
Public Types inherited from WidgetBase | |
enum | WidgetType { wt_UMLWidget = 300, wt_Actor, wt_UseCase, wt_Class, wt_Interface, wt_Datatype, wt_Enum, wt_Entity, wt_Package, wt_Object, wt_Note, wt_Box, wt_Message, wt_Text, wt_State, wt_Activity, wt_Component, wt_Artifact, wt_Node, wt_Association, wt_ForkJoin, wt_Precondition, wt_CombinedFragment, wt_FloatingDashLine, wt_Signal, wt_Pin, wt_ObjectNode, wt_Region, wt_Category } |
Protected Attributes inherited from WidgetBase | |
WidgetType | m_baseType |
QBrush | m_brush |
QString | m_Doc |
QColor | m_fillColor |
QFont | m_font |
QColor | m_lineColor |
uint | m_lineWidth |
Uml::ID::Type | m_nId |
QRectF | m_rect |
UMLScene * | m_scene |
QString | m_Text |
QColor | m_textColor |
UMLObject * | m_umlObject |
bool | m_useFillColor |
bool | m_usesDiagramFillColor |
bool | m_usesDiagramLineColor |
bool | m_usesDiagramLineWidth |
bool | m_usesDiagramTextColor |
bool | m_usesDiagramUseFillColor |
Detailed Description
This class represents an association inside a diagram.
Constructor is made non accessible: Users shall use the static create() methods for constructing AssociationWidgets.
Associations exist not only between UML objects. For example, when a Note is attached to a UML object, the Note itself is not a UML object. This class supports both kinds of associations. An association where one or both roles are not a UML object is called a "pure widget association".
An AssociationWidget where both roles are UML objects has a corresponding UMLAssociation. The UMLAssociation can be retrieved using the getAssociation method. A pure widget association does not have a corresponding UMLAssociation. The getAssociation method returns NULL in this case.
Definition at line 50 of file associationwidget.h.
Constructor & Destructor Documentation
|
virtual |
Destructor.
Definition at line 217 of file associationwidget.cpp.
Member Function Documentation
|
virtual |
Activates the AssociationWidget after a load.
- Returns
- true for success
Definition at line 701 of file associationwidget.cpp.
UMLAssociation * AssociationWidget::association | ( | ) | const |
Returns the UMLAssociation representation of this object.
- Returns
- Pointer to the UMLAssociation that is represented by this AsociationWidget.
Definition at line 548 of file associationwidget.cpp.
AssociationLine * AssociationWidget::associationLine | ( | ) | const |
Returns a pointer to the association widget's line path.
Definition at line 691 of file associationwidget.cpp.
Uml::AssociationType::Enum AssociationWidget::associationType | ( | ) | const |
Gets the association's type.
- Returns
- This AssociationWidget's AssociationType::Enum.
Definition at line 1427 of file associationwidget.cpp.
UMLAttribute * AssociationWidget::attribute | ( | ) | const |
Returns the UMLAttribute representation of this object.
- Returns
- Pointer to the UMLAttribute that is represented by this AsociationWidget.
Definition at line 561 of file associationwidget.cpp.
|
virtual |
Returns the bounding rectangle of all segments of the association.
Reimplemented from WidgetBase.
Definition at line 3834 of file associationwidget.cpp.
void AssociationWidget::calculateEndingPoints | ( | ) |
Calculates and sets the first and last point in the Association's AssociationLine.
Each point is a middle point of its respecting UMLWidget's Bounding rectangle or a corner of it. This method picks which sides to use for the association.
Definition at line 1618 of file associationwidget.cpp.
|
virtual |
Calculates the m_unNameLineSegment value according to the new NameText topleft corner PT.
It iterates through all AssociationLine's segments and for each one calculates the sum of PT's distance to the start point + PT's distance to the end point. The segment with the smallest sum will be the RoleTextSegment (if this segment moves then the RoleText will move with it). It sets m_unNameLineSegment to the start point of the chosen segment.
Overrides operation from LinkWidget (i.e. this method is also required by FloatingTextWidget.)
Reimplemented from LinkWidget.
Definition at line 508 of file associationwidget.cpp.
Uml::Changeability::Enum AssociationWidget::changeability | ( | Uml::RoleType::Enum | role | ) | const |
Gets the changeability on the given end of the Association.
Definition at line 1124 of file associationwidget.cpp.
FloatingTextWidget * AssociationWidget::changeabilityWidget | ( | Uml::RoleType::Enum | role | ) | const |
Return the given role's changeability FloatingTextWidget widget.
Definition at line 862 of file associationwidget.cpp.
void AssociationWidget::cleanup | ( | ) |
CleansUp all the association's data in the related widgets.
Definition at line 1269 of file associationwidget.cpp.
void AssociationWidget::clipSize | ( | ) |
Definition at line 3879 of file associationwidget.cpp.
void AssociationWidget::computeAssocClassLine | ( | ) |
Compute the end points of m_pAssocClassLine in case this association has an attached association class.
TODO: The decoration points make no sense for now, because they are not movable.
Definition at line 2844 of file associationwidget.cpp.
|
virtual |
Constrains the FloatingTextWidget X and Y values supplied.
Implements the abstract operation from LinkWidget.
- Parameters
-
textX Candidate X value (may be modified by the constraint.) textY Candidate Y value (may be modified by the constraint.) textWidth Width of the text. textHeight Height of the text. tr Uml::Text_Role of the text.
Implements LinkWidget.
Definition at line 2562 of file associationwidget.cpp.
bool AssociationWidget::containsAsEndpoint | ( | UMLWidget * | widget | ) |
Returns true if the Widget is either at the starting or ending side of the association.
Definition at line 1400 of file associationwidget.cpp.
|
protectedvirtual |
Event handler for context menu events, called from the line segments.
Reimplemented from WidgetBase.
Definition at line 3909 of file associationwidget.cpp.
|
static |
This constructor is really only for loading from XMI, otherwise it should not be allowed as it creates an incomplete associationwidget.
- Parameters
-
scene The parent view of this widget.
Definition at line 111 of file associationwidget.cpp.
|
static |
Preferred constructor (static factory method.)
- Parameters
-
scene The parent view of this widget. WidgetA Pointer to the role A widget for the association. assocType The AssociationType::Enum for this association. WidgetB Pointer to the role B widget for the association. umlobject Pointer to the underlying UMLObject (if applicable.)
Definition at line 127 of file associationwidget.cpp.
void AssociationWidget::createAssocClassLine | ( | ) |
Creates the association class connecting line.
Definition at line 2799 of file associationwidget.cpp.
void AssociationWidget::createAssocClassLine | ( | ClassifierWidget * | classifier, |
int | linePathSegmentIndex | ||
) |
Creates the association class connecting line using the specified ClassifierWidget.
- Parameters
-
classifierWidget The ClassifierWidget to use. linePathSegmentIndex The index of the segment where the association class is created.
Definition at line 2823 of file associationwidget.cpp.
|
virtual |
Overrides operation from LinkWidget.
Required by FloatingTextWidget.
Implements LinkWidget.
Definition at line 337 of file associationwidget.cpp.
|
virtual |
Return the first font found being used by any child widget.
(They could be different fonts, so this is a slightly misleading method.)
Reimplemented from WidgetBase.
Definition at line 3104 of file associationwidget.cpp.
|
protectedvirtual |
Reimplemented event handler for hover enter events.
Definition at line 3964 of file associationwidget.cpp.
|
protectedvirtual |
Reimplemented event handler for hover leave events.
Definition at line 3972 of file associationwidget.cpp.
|
protectedvirtual |
Reimplemented event handler for hover move events.
Definition at line 3980 of file associationwidget.cpp.
bool AssociationWidget::isActivated | ( | ) | const |
Read property of bool m_activated.
Definition at line 1746 of file associationwidget.cpp.
bool AssociationWidget::isCollaboration | ( | ) | const |
Returns true if this AssociationWidget represents a collaboration message.
Definition at line 1408 of file associationwidget.cpp.
bool AssociationWidget::isPointAddable | ( | ) |
Return state if the assocation line point in the near of the last context menu event position is addable or not.
A point is addable if the association is not an Exception and there is no point in the near.
- Returns
- true if point is addable
Definition at line 1333 of file associationwidget.cpp.
bool AssociationWidget::isPointRemovable | ( | ) |
Return state if the assocation line point in the near of the last context menu event position is removable or not.
A point is removable if the association is not an Exception and is not the start or end point.
- Returns
- true if point is removable
Definition at line 1348 of file associationwidget.cpp.
bool AssociationWidget::isSelected | ( | ) | const |
Returns the state of whether the widget is selected.
- Returns
- Returns the state of whether the widget is selected.
Definition at line 3665 of file associationwidget.cpp.
bool AssociationWidget::isSelf | ( | ) | const |
Returns true if this AssociationWidget represents a self message.
Definition at line 1417 of file associationwidget.cpp.
bool AssociationWidget::loadFromXMI | ( | QDomElement & | qElement, |
const UMLWidgetList & | widgets, | ||
const MessageWidgetList * | messages | ||
) |
Uses the supplied widgetList for resolving the role A and role B widgets.
(The other loadFromXMI() queries the UMLView for these widgets.) Required for clipboard operations.
Definition at line 4059 of file associationwidget.cpp.
|
virtual |
Queries the UMLView for resolving the role A and role B widgets.
....
Reimplemented from WidgetBase.
Definition at line 4303 of file associationwidget.cpp.
|
virtual |
Set all 'owned' child widgets to this font.
Implements LinkWidget.
Definition at line 269 of file associationwidget.cpp.
|
virtual |
Adds a break point (if left mouse button).
Definition at line 1526 of file associationwidget.cpp.
|
virtual |
Moves the break point being dragged.
Definition at line 3236 of file associationwidget.cpp.
|
virtual |
Sets the association to be selected.
Definition at line 2893 of file associationwidget.cpp.
|
virtual |
Displays the right mouse buttom menu if right button is pressed.
Definition at line 2923 of file associationwidget.cpp.
void AssociationWidget::moveEntireAssoc | ( | qreal | x, |
qreal | y | ||
) |
Moves the entire association by the given offset.
Definition at line 3822 of file associationwidget.cpp.
void AssociationWidget::moveMidPointsBy | ( | qreal | x, |
qreal | y | ||
) |
Moves all the mid points (all expcept start /end) by the given amount.
Definition at line 3804 of file associationwidget.cpp.
QString AssociationWidget::multiplicity | ( | Uml::RoleType::Enum | role | ) | const |
Return the given role's multiplicity text.
- Returns
- Text of the given role's multiplicity widget.
Definition at line 1062 of file associationwidget.cpp.
FloatingTextWidget * AssociationWidget::multiplicityWidget | ( | Uml::RoleType::Enum | role | ) | const |
Return the multiplicity FloatingTextWidget widget of the given role.
- Returns
- Pointer to the multiplicity FloatingTextWidget object.
Definition at line 834 of file associationwidget.cpp.
QString AssociationWidget::name | ( | ) | const |
Returns the m_nameWidget's text.
- Returns
- Text of the FloatingTextWidget name widget.
Definition at line 901 of file associationwidget.cpp.
FloatingTextWidget * AssociationWidget::nameWidget | ( | ) | const |
Read property of FloatingTextWidget* m_nameWidget.
- Returns
- Pointer to the FloatingTextWidget name widget.
Definition at line 844 of file associationwidget.cpp.
bool AssociationWidget::onAssocClassLine | ( | const QPointF & | point | ) |
Returns true if the given point is on the connecting line to the association class.
Returns false if there is no association class attached, or if the given point is not on the connecting line.
Definition at line 3721 of file associationwidget.cpp.
bool AssociationWidget::onAssociation | ( | const QPointF & | point | ) |
Returns true if the given point is on the association line.
A circle (rectangle) around the point is used to obtain more tolerance.
- Parameters
-
point the point to check
- Returns
- flag whether point is on association line
Definition at line 3748 of file associationwidget.cpp.
|
virtual |
Implements operation from LinkWidget.
Motivated by FloatingTextWidget.
Implements LinkWidget.
Definition at line 315 of file associationwidget.cpp.
|
virtual |
Overrides operation from LinkWidget.
Required by FloatingTextWidget.
- Todo:
- Move to LinkWidget.
Reimplemented from LinkWidget.
Definition at line 297 of file associationwidget.cpp.
bool AssociationWidget::operator!= | ( | AssociationWidget & | other | ) | const |
Overrides the != operator.
Definition at line 683 of file associationwidget.cpp.
bool AssociationWidget::operator== | ( | const AssociationWidget & | other | ) | const |
Overrides the equality test operator.
Definition at line 630 of file associationwidget.cpp.
void AssociationWidget::removeAssocClassLine | ( | ) |
Remove dashed connecting line for association class.
Definition at line 2782 of file associationwidget.cpp.
|
virtual |
Calls setTextPosition on all the labels.
Overrides operation from LinkWidget.
Reimplemented from LinkWidget.
Definition at line 355 of file associationwidget.cpp.
QString AssociationWidget::roleDocumentation | ( | Uml::RoleType::Enum | role | ) | const |
Returns the given role's documentation.
Definition at line 1006 of file associationwidget.cpp.
QString AssociationWidget::roleName | ( | Uml::RoleType::Enum | role | ) | const |
Return the given role's FloatingTextWidget widget text.
- Returns
- The name set at the FloatingTextWidget.
Definition at line 953 of file associationwidget.cpp.
FloatingTextWidget * AssociationWidget::roleWidget | ( | Uml::RoleType::Enum | role | ) | const |
Return the given role's FloatingTextWidget object.
- Returns
- Pointer to the role's FloatingTextWidget widget.
Definition at line 854 of file associationwidget.cpp.
void AssociationWidget::saveIdealTextPositions | ( | ) |
Auxiliary method for widgetMoved(): Saves all ideally computed floatingtext positions before doing any kind of change.
This is necessary because a single invocation of calculateEndingPoints() modifies the AssociationLine ending points on ALL AssociationWidgets. This means that if we don't save the old ideal positions then they are irretrievably lost as soon as calculateEndingPoints() is invoked.
Definition at line 1849 of file associationwidget.cpp.
|
virtual |
Saves this widget to the "assocwidget" XMI element.
Reimplemented from WidgetBase.
Definition at line 3988 of file associationwidget.cpp.
void AssociationWidget::selectAssocClassLine | ( | bool | sel = true | ) |
Renders the association class connecting line selected.
Definition at line 2882 of file associationwidget.cpp.
|
virtual |
Overrides operation from LinkWidget.
Required by FloatingTextWidget.
- Parameters
-
seqNum Return this AssociationWidget's sequence number string. op Return this AssociationWidget's operation string.
Implements LinkWidget.
Definition at line 471 of file associationwidget.cpp.
void AssociationWidget::setActivated | ( | bool | active | ) |
Set the m_activated flag of a widget but does not perform the Activate method.
Definition at line 1754 of file associationwidget.cpp.
void AssociationWidget::setAssociationType | ( | Uml::AssociationType::Enum | type | ) |
Sets the association's type.
- Parameters
-
type The AssociationType::Enum to set.
Definition at line 1440 of file associationwidget.cpp.
void AssociationWidget::setChangeability | ( | Uml::Changeability::Enum | value, |
Uml::RoleType::Enum | role | ||
) |
Sets the changeability on the given end of the Association.
Definition at line 1135 of file associationwidget.cpp.
|
virtual |
Overrides operation from LinkWidget.
Required by FloatingTextWidget.
Implements LinkWidget.
Definition at line 346 of file associationwidget.cpp.
|
virtual |
Overrides operation from LinkWidget.
Required by FloatingTextWidget.
- Parameters
-
ft The text widget which to update.
Implements LinkWidget.
Definition at line 386 of file associationwidget.cpp.
void AssociationWidget::setMultiplicity | ( | const QString & | text, |
Uml::RoleType::Enum | role | ||
) |
Sets the text in the FloatingTextWidget representing the multiplicity at the given side of the association.
Definition at line 1073 of file associationwidget.cpp.
void AssociationWidget::setName | ( | const QString & | strRole | ) |
Sets the text in the FloatingTextWidget widget representing the Name of this association.
Definition at line 912 of file associationwidget.cpp.
|
virtual |
Implements operation from LinkWidget.
Motivated by FloatingTextWidget.
Implements LinkWidget.
Definition at line 324 of file associationwidget.cpp.
void AssociationWidget::setRoleDocumentation | ( | const QString & | doc, |
Uml::RoleType::Enum | role | ||
) |
Set the documentation on the given role.
Definition at line 995 of file associationwidget.cpp.
void AssociationWidget::setRoleName | ( | const QString & | strRole, |
Uml::RoleType::Enum | role | ||
) |
Sets the text to the FloatingTextWidget that display the Role text of this association.
For this function to work properly, the associated widget should already be set.
Definition at line 966 of file associationwidget.cpp.
void AssociationWidget::setSelected | ( | bool | _select = true | ) |
Sets the state of whether the widget is selected.
- Parameters
-
_select The state of whether the widget is selected.
Definition at line 3675 of file associationwidget.cpp.
|
virtual |
Overrides operation from LinkWidget.
Required by FloatingTextWidget.
- Parameters
-
seqNum The new sequence number string to set. op The new operation string to set.
Implements LinkWidget.
Definition at line 487 of file associationwidget.cpp.
|
virtual |
Sets the text of the given FloatingTextWidget.
Overrides operation from LinkWidget. Required by FloatingTextWidget.
Implements LinkWidget.
Definition at line 406 of file associationwidget.cpp.
|
virtual |
Set all 'owned' child widgets to this text color.
Reimplemented from WidgetBase.
Definition at line 3132 of file associationwidget.cpp.
|
virtual |
Overriding the method from WidgetBase because we need to do something extra in case this AssociationWidget represents an attribute of a classifier.
Reimplemented from WidgetBase.
Definition at line 227 of file associationwidget.cpp.
void AssociationWidget::setVisibility | ( | Uml::Visibility::Enum | value, |
Uml::RoleType::Enum | role | ||
) |
Sets the visibility on the given role of the association.
Definition at line 1100 of file associationwidget.cpp.
void AssociationWidget::setWidgetForRole | ( | UMLWidget * | widget, |
Uml::RoleType::Enum | role | ||
) |
Set the widget of the given role.
Add this AssociationWidget at the widget. If this AssociationWidget has an underlying UMLAssociation then set the widget's underlying UMLObject at the UMLAssociation's role object.
- Parameters
-
widget Pointer to the UMLWidget. role Role for which to set the widget.
Definition at line 819 of file associationwidget.cpp.
bool AssociationWidget::setWidgets | ( | UMLWidget * | widgetA, |
Uml::AssociationType::Enum | assocType, | ||
UMLWidget * | widgetB | ||
) |
Sets the associated widgets.
- Parameters
-
widgetA Pointer the role A widget for the association. assocType The AssociationType::Enum for this association. widgetB Pointer the role B widget for the association.
Definition at line 1247 of file associationwidget.cpp.
void AssociationWidget::setXEntireAssoc | ( | qreal | x | ) |
Set all association points to x coordinate.
Definition at line 3778 of file associationwidget.cpp.
void AssociationWidget::setYEntireAssoc | ( | qreal | y | ) |
Set all association points to y coordinate.
Definition at line 3791 of file associationwidget.cpp.
|
virtual |
Returns the shape of all segments of the association.
Definition at line 3842 of file associationwidget.cpp.
|
virtual |
Shows the association properties dialog and updates the corresponding texts if its execution is successful.
Reimplemented from LinkWidget.
Definition at line 435 of file associationwidget.cpp.
|
slot |
Connected to UMLObject::modified() in case this AssociationWidget is linked to a classifer's attribute type.
Definition at line 3868 of file associationwidget.cpp.
|
slot |
Connected to UMLClassifier::attributeRemoved() or UMLEntity::constraintRemoved() in case this AssociationWidget is linked to a clasifier list item (an attribute or a foreign key constraint)
- Parameters
-
obj The UMLClassifierListItem removed.
Definition at line 3854 of file associationwidget.cpp.
|
slot |
Handles any signals that tells everyone not to be selected.
Definition at line 3770 of file associationwidget.cpp.
|
virtualslot |
Handles the selection from the popup menu.
Definition at line 2931 of file associationwidget.cpp.
|
slot |
Synchronize this widget from the UMLAssociation.
Definition at line 1762 of file associationwidget.cpp.
FloatingTextWidget * AssociationWidget::textWidgetByRole | ( | Uml::TextRole::Enum | tr | ) | const |
Return the FloatingTextWidget object indicated by the given TextRole::Enum.
- Returns
- Pointer to the text role's FloatingTextWidget widget.
Definition at line 872 of file associationwidget.cpp.
QString AssociationWidget::toString | ( | ) | const |
Returns a QString Object representing this AssociationWidget.
Definition at line 1494 of file associationwidget.cpp.
Visibility::Enum AssociationWidget::visibility | ( | Uml::RoleType::Enum | role | ) | const |
Gets the visibility on the given role of the association.
Definition at line 1086 of file associationwidget.cpp.
UMLWidget * AssociationWidget::widgetForRole | ( | Uml::RoleType::Enum | role | ) | const |
Gets the given role widget.
- Returns
- Pointer to the role's UMLWidget.
Definition at line 1235 of file associationwidget.cpp.
Uml::ID::Type AssociationWidget::widgetIDForRole | ( | Uml::RoleType::Enum | role | ) | const |
Gets the ID of the given role widget.
Definition at line 1475 of file associationwidget.cpp.
void AssociationWidget::widgetMoved | ( | UMLWidget * | widget, |
qreal | x, | ||
qreal | y | ||
) |
Adjusts the ending point of the association that connects to Widget.
- Todo:
- avoid trigger of this event during load
Definition at line 1863 of file associationwidget.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:06:01 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.