|
|
This class represents an association inside a diagram. It is the equivalent to the original Association class plus support for non straight lines
| enum Region { Error = 0, West , North, East, South, NorthWest, NorthEast, SouthEast, SouthWest, Center } | Region |
enumeration used for stating where a line is on a widget.
| AssociationWidget (QWidget *parent, AssociationWidgetData * pData)
| AssociationWidget |
Constructor
| AssociationWidget (QWidget *parent)
| AssociationWidget |
Constructor
| AssociationWidget (QWidget *parent, UMLWidget* WidgetA, Association_Type Type, UMLWidget* WidgetB)
| AssociationWidget |
Constructor
| ~AssociationWidget ()
| ~AssociationWidget |
[virtual]
Deconstructor
| AssociationWidget& operator= (AssociationWidget & Other)
| operator= |
Overrides = operator
| bool operator== (AssociationWidget & Other)
| operator== |
Overrides == operator
| bool operator!= (AssociationWidget & Other)
| operator!= |
Overrides != operator
| bool setMultiA ( FloatingText* pMultiA)
| setMultiA |
[virtual]
Write property of FloatingText* m_pMultiA.
| bool Activate ()
| Activate |
activates an associationwidget after a serialize function
| FloatingText* getMultiAWidget ()
| getMultiAWidget |
[virtual]
Read property of FloatingText* m_pMultiA.
| QString getMultiA ()
| getMultiA |
[virtual]
Returns the m_pMultiA's text.
| bool setMultiB ( FloatingText* pMultiB)
| setMultiB |
[virtual]
Write property of FloatingText* m_pMultiB.
| FloatingText* getMultiBWidget ()
| getMultiBWidget |
[virtual]
Read property of FloatingText* m_pMultiB.
| QString getMultiB ()
| getMultiB |
[virtual]
Returns the m_pMultiB's text.
| bool setRole ( FloatingText* pRole)
| setRole |
[virtual]
Write property of CFloatingText* m_pRole.
| FloatingText* getRoleWidget ()
| getRoleWidget |
[virtual]
Read property of CFloatingText* m_pRole.
| QString getRole ()
| getRole |
[virtual]
Returns the m_pRole's text.
| bool setMultiB (QString strMultiB)
| setMultiB |
Sets the text to the FloatingText representing the Multiplicity at the ending side of the association
| bool setMultiA (QString strMultiA)
| setMultiA |
Sets the text to the FloatingText representing the Multiplicity at the starting side of the association
| bool setRole (QString strRole)
| setRole |
Sets the text to the FloatingText that display the Role text of this association For this funtion to work properly, the associated widgets (m_pWidgetA and m_pWidgetB) should be already set
| UMLWidget* getWidgetA ()
| getWidgetA |
[virtual]
Read property of UMLWidget* m_pWidgetA.
| bool setWidgets ( UMLWidget* WidgetA, Association_Type AssocType, UMLWidget* WidgetB)
| setWidgets |
[virtual]
Set the associated widgets.
| UMLWidget* getWidgetB ()
| getWidgetB |
[virtual]
Read property of UMLWidget* m_pWidgetB.
| void SynchronizeData ()
| SynchronizeData |
Synchronizes the Widget's m_pData member with its display properties, for example: the X and Y positions of the widget, etc
| bool checkAssoc (UMLWidget * WidgetA, UMLWidget *WidgetB)
| checkAssoc |
Returns true if this association associates WidgetA to WidgetB, otherwise it returns false
| void cleanup ()
| cleanup |
CleansUp all the association's data in the related widgets
| bool contains (UMLWidget* Widget)
| contains |
Returns true if the Widget is either at the starting or ending side of the association
| Association_Type getAssocType ()
| getAssocType |
Returns the Association's Type
| void setAssocType (Association_Type Type)
| setAssocType |
Sets the association's type
| QString toString ()
| toString |
Returns a QString Object representing this AssociationWidget
| const bool IsActivated ()
| IsActivated |
Read property of bool m_bActivated.
| void SetActivated (bool Active )
| SetActivated |
Set the m_bActivated flag of a widget but does not perform the Activate method
| bool serialize (QDataStream *s, bool archive )
| serialize |
Save/load the widget
| long getClipSizeOf ()
| getClipSizeOf |
Returns the amount of bytes needed to serialize this object
| void setSelected (bool _select)
| setSelected |
Sets the state of whether the widget is selected.
Parameters:
| _select | The state of whether the widget is selected. |
| bool getSelected ()
| getSelected |
Returns the state of whether the widget is selected.
Returns: Returns the state of whether the widget is selected.
| AssociationWidgetData* getData ()
| getData |
Return the widget data instance.
| void WidgetMoved (UMLWidget* Widget, int x, int y)
| WidgetMoved |
Adjusts the endding point of the association that connects to Widget
| void calculateRoleTextSegment ()
| calculateRoleTextSegment |
calculates the m_unRoleLineSegment value according to the new RoleText topleft corner PT. It iterates through all LinePath's segments for each one it 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_unRoleLineSegment to the start point of the chosen segment
| void mouseDoubleClickEvent (QMouseEvent * me)
| mouseDoubleClickEvent |
Overrides standard event method
| void mousePressEvent (QMouseEvent * me)
| mousePressEvent |
Overrides standard event method
| void mouseReleaseEvent (QMouseEvent * me)
| mouseReleaseEvent |
Overrides standard event method
| void mouseMoveEvent (QMouseEvent * me)
| mouseMoveEvent |
Overrides standard event method
| bool onAssociation (const QPoint & point)
| onAssociation |
Returns true if the given point is ob the Association.
| QString getDoc ()
| getDoc |
Returns the associations documentation.
| void setDoc ( QString doc)
| setDoc |
Sets the associations documentation.
| void moveMidPointsBy ( int x, int y )
| moveMidPointsBy |
Moves all the mid points (all expcept start /end ) by the given amount
| void moveEntireAssoc ( int x, int y )
| moveEntireAssoc |
Moves the entire association by the given offset.
| void changeFont ( Uml::Text_Role callingRole, QFont font )
| changeFont |
Sets the new font for the text widgets used. Called by the text widgets when the menu was selected on one of them.
| void updateAssociations (int totalCount, Region region, bool widgetA)
| updateAssociations |
[protected]
Tells all the other view associations the new count for the given widget on a certain region. And also what index they should be.
| int getRegionCount (Region region, bool widgetA)
| getRegionCount |
[protected]
Returns the number of lines there are on the given region for either widget a or b of the association. Setting the boolean value to true will give a count for widgetA and false for widgetB.
| void slotMenuSelection (int sel)
| slotMenuSelection |
[slot]
Handles the selection from the popup menu.
| void slotRemovePopupMenu ()
| slotRemovePopupMenu |
[virtual slot]
This slot is entered when an event has occurred on the views display, most likely a mouse event. Before it sends out that mouse event all children should make sure that they don't have a menu active or there could be more than one popup menu displayed.
| void slotClearAllSelected ()
| slotClearAllSelected |
[slot]
Handles any signals that tells everyone not to be selected.