umbrello/umbrello
#include <associationwidget.h>
Public Slots | |
void | slotAttributeChanged () |
void | slotClassifierListItemRemoved (UMLClassifierListItem *obj) |
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 | isSelf () const |
bool | loadFromXMI (QDomElement &qElement, const UMLWidgetList &widgets, const MessageWidgetList *messages) |
virtual bool | loadFromXMI (QDomElement &qElement) |
virtual UMLClassifier * | lwClassifier () |
virtual QString | lwOperationText () |
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) |
UMLWidget * | onWidget (const QPointF &p) |
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) |
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) |
virtual void | setOperationText (const QString &op) |
void | setRoleDocumentation (const QString &doc, Uml::RoleType::Enum role) |
void | setRoleName (const QString &strRole, Uml::RoleType::Enum role) |
virtual void | setSelected (bool _select) |
void | setStereotype (const QString &stereo) |
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 |
Uml::ID::Type | widgetLocalIDForRole (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 | setRect (const QRectF &rect) |
void | setRect (qreal x, qreal y, qreal width, qreal height) |
virtual 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 QGraphicsObject | |
QGraphicsObject (QGraphicsItem *parent) | |
void | enabledChanged () |
void | grabGesture (Qt::GestureType gesture, QFlags< Qt::GestureFlag > flags) |
void | opacityChanged () |
void | parentChanged () |
void | rotationChanged () |
void | scaleChanged () |
void | ungrabGesture (Qt::GestureType gesture) |
void | visibleChanged () |
void | xChanged () |
void | yChanged () |
void | zChanged () |
Public Member Functions inherited from QObject | |
QObject (QObject *parent) | |
QObject (QObject *parent, const char *name) | |
virtual | ~QObject () |
bool | blockSignals (bool block) |
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
const QObjectList & | children () const |
const char * | className () const |
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const QObject *receiver, const char *method) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
void | dumpObjectInfo () |
void | dumpObjectTree () |
QList< QByteArray > | dynamicPropertyNames () const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name) const |
QList< T > | findChildren (const QRegExp ®Exp) const |
QList< T > | findChildren (const QString &name) const |
bool | inherits (const char *className) const |
void | insertChild (QObject *object) |
void | installEventFilter (QObject *filterObj) |
bool | isA (const char *className) const |
bool | isWidgetType () const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
const char * | name () const |
const char * | name (const char *defaultName) const |
QString | objectName () const |
QObject * | parent () const |
QVariant | property (const char *name) const |
void | removeChild (QObject *object) |
void | removeEventFilter (QObject *obj) |
void | setName (const char *name) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const |
int | startTimer (int interval) |
QThread * | thread () const |
Public Member Functions inherited from QGraphicsItem | |
QGraphicsItem (QGraphicsItem *parent) | |
virtual | ~QGraphicsItem () |
bool | acceptDrops () const |
Qt::MouseButtons | acceptedMouseButtons () const |
bool | acceptHoverEvents () const |
bool | acceptsHoverEvents () const |
bool | acceptTouchEvents () const |
virtual void | advance (int phase) |
virtual QRectF | boundingRect () const =0 |
QRegion | boundingRegion (const QTransform &itemToDeviceTransform) const |
qreal | boundingRegionGranularity () const |
CacheMode | cacheMode () const |
QList< QGraphicsItem * > | childItems () const |
QList< QGraphicsItem * > | children () const |
QRectF | childrenBoundingRect () const |
void | clearFocus () |
QPainterPath | clipPath () const |
virtual bool | collidesWithItem (const QGraphicsItem *other, Qt::ItemSelectionMode mode) const |
virtual bool | collidesWithPath (const QPainterPath &path, Qt::ItemSelectionMode mode) const |
QList< QGraphicsItem * > | collidingItems (Qt::ItemSelectionMode mode) const |
QGraphicsItem * | commonAncestorItem (const QGraphicsItem *other) const |
virtual bool | contains (const QPointF &point) const |
QCursor | cursor () const |
QVariant | data (int key) const |
QTransform | deviceTransform (const QTransform &viewportTransform) const |
qreal | effectiveOpacity () const |
void | ensureVisible (const QRectF &rect, int xmargin, int ymargin) |
void | ensureVisible (qreal x, qreal y, qreal w, qreal h, int xmargin, int ymargin) |
bool | filtersChildEvents () const |
GraphicsItemFlags | flags () const |
QGraphicsItem * | focusItem () const |
QGraphicsItem * | focusProxy () const |
void | grabKeyboard () |
void | grabMouse () |
QGraphicsEffect * | graphicsEffect () const |
QGraphicsItemGroup * | group () const |
bool | handlesChildEvents () const |
bool | hasCursor () const |
bool | hasFocus () const |
void | hide () |
Qt::InputMethodHints | inputMethodHints () const |
void | installSceneEventFilter (QGraphicsItem *filterItem) |
bool | isActive () const |
bool | isAncestorOf (const QGraphicsItem *child) const |
bool | isBlockedByModalPanel (QGraphicsItem **blockingPanel) const |
bool | isClipped () const |
bool | isEnabled () const |
bool | isObscured () const |
bool | isObscured (const QRectF &rect) const |
bool | isObscured (qreal x, qreal y, qreal w, qreal h) const |
virtual bool | isObscuredBy (const QGraphicsItem *item) const |
bool | isPanel () const |
bool | isSelected () const |
bool | isUnderMouse () const |
bool | isVisible () const |
bool | isVisibleTo (const QGraphicsItem *parent) const |
bool | isWidget () const |
bool | isWindow () const |
QTransform | itemTransform (const QGraphicsItem *other, bool *ok) const |
QPointF | mapFromItem (const QGraphicsItem *item, const QPointF &point) const |
QPolygonF | mapFromItem (const QGraphicsItem *item, const QRectF &rect) const |
QPolygonF | mapFromItem (const QGraphicsItem *item, const QPolygonF &polygon) const |
QPainterPath | mapFromItem (const QGraphicsItem *item, const QPainterPath &path) const |
QPointF | mapFromItem (const QGraphicsItem *item, qreal x, qreal y) const |
QPolygonF | mapFromItem (const QGraphicsItem *item, qreal x, qreal y, qreal w, qreal h) const |
QPointF | mapFromParent (const QPointF &point) const |
QPolygonF | mapFromParent (const QRectF &rect) const |
QPolygonF | mapFromParent (const QPolygonF &polygon) const |
QPainterPath | mapFromParent (const QPainterPath &path) const |
QPointF | mapFromParent (qreal x, qreal y) const |
QPolygonF | mapFromParent (qreal x, qreal y, qreal w, qreal h) const |
QPolygonF | mapFromScene (const QPolygonF &polygon) const |
QPointF | mapFromScene (const QPointF &point) const |
QPolygonF | mapFromScene (const QRectF &rect) const |
QPainterPath | mapFromScene (const QPainterPath &path) const |
QPointF | mapFromScene (qreal x, qreal y) const |
QPolygonF | mapFromScene (qreal x, qreal y, qreal w, qreal h) const |
QRectF | mapRectFromItem (const QGraphicsItem *item, const QRectF &rect) const |
QRectF | mapRectFromItem (const QGraphicsItem *item, qreal x, qreal y, qreal w, qreal h) const |
QRectF | mapRectFromParent (const QRectF &rect) const |
QRectF | mapRectFromParent (qreal x, qreal y, qreal w, qreal h) const |
QRectF | mapRectFromScene (qreal x, qreal y, qreal w, qreal h) const |
QRectF | mapRectFromScene (const QRectF &rect) const |
QRectF | mapRectToItem (const QGraphicsItem *item, const QRectF &rect) const |
QRectF | mapRectToItem (const QGraphicsItem *item, qreal x, qreal y, qreal w, qreal h) const |
QRectF | mapRectToParent (const QRectF &rect) const |
QRectF | mapRectToParent (qreal x, qreal y, qreal w, qreal h) const |
QRectF | mapRectToScene (const QRectF &rect) const |
QRectF | mapRectToScene (qreal x, qreal y, qreal w, qreal h) const |
QPointF | mapToItem (const QGraphicsItem *item, const QPointF &point) const |
QPolygonF | mapToItem (const QGraphicsItem *item, const QRectF &rect) const |
QPolygonF | mapToItem (const QGraphicsItem *item, const QPolygonF &polygon) const |
QPainterPath | mapToItem (const QGraphicsItem *item, const QPainterPath &path) const |
QPointF | mapToItem (const QGraphicsItem *item, qreal x, qreal y) const |
QPolygonF | mapToItem (const QGraphicsItem *item, qreal x, qreal y, qreal w, qreal h) const |
QPointF | mapToParent (const QPointF &point) const |
QPolygonF | mapToParent (const QRectF &rect) const |
QPainterPath | mapToParent (const QPainterPath &path) const |
QPointF | mapToParent (qreal x, qreal y) const |
QPolygonF | mapToParent (qreal x, qreal y, qreal w, qreal h) const |
QPolygonF | mapToParent (const QPolygonF &polygon) const |
QPolygonF | mapToScene (const QRectF &rect) const |
QPainterPath | mapToScene (const QPainterPath &path) const |
QPointF | mapToScene (qreal x, qreal y) const |
QPolygonF | mapToScene (qreal x, qreal y, qreal w, qreal h) const |
QPolygonF | mapToScene (const QPolygonF &polygon) const |
QPointF | mapToScene (const QPointF &point) const |
QMatrix | matrix () const |
void | moveBy (qreal dx, qreal dy) |
qreal | opacity () const |
virtual QPainterPath | opaqueArea () const |
virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)=0 |
QGraphicsItem * | panel () const |
PanelModality | panelModality () const |
QGraphicsItem * | parentItem () const |
QGraphicsObject * | parentObject () const |
QGraphicsWidget * | parentWidget () const |
QPointF | pos () const |
void | removeSceneEventFilter (QGraphicsItem *filterItem) |
void | resetMatrix () |
void | resetTransform () |
void | rotate (qreal angle) |
qreal | rotation () const |
void | scale (qreal sx, qreal sy) |
qreal | scale () const |
QGraphicsScene * | scene () const |
QRectF | sceneBoundingRect () const |
QMatrix | sceneMatrix () const |
QPointF | scenePos () const |
QTransform | sceneTransform () const |
void | scroll (qreal dx, qreal dy, const QRectF &rect) |
void | setAcceptDrops (bool on) |
void | setAcceptedMouseButtons (QFlags< Qt::MouseButton > buttons) |
void | setAcceptHoverEvents (bool enabled) |
void | setAcceptsHoverEvents (bool enabled) |
void | setAcceptTouchEvents (bool enabled) |
void | setActive (bool active) |
void | setBoundingRegionGranularity (qreal granularity) |
void | setCacheMode (CacheMode mode, const QSize &logicalCacheSize) |
void | setCursor (const QCursor &cursor) |
void | setData (int key, const QVariant &value) |
void | setEnabled (bool enabled) |
void | setFiltersChildEvents (bool enabled) |
void | setFlag (GraphicsItemFlag flag, bool enabled) |
void | setFlags (QFlags< QGraphicsItem::GraphicsItemFlag > flags) |
void | setFocus (Qt::FocusReason focusReason) |
void | setFocusProxy (QGraphicsItem *item) |
void | setGraphicsEffect (QGraphicsEffect *effect) |
void | setGroup (QGraphicsItemGroup *group) |
void | setHandlesChildEvents (bool enabled) |
void | setInputMethodHints (QFlags< Qt::InputMethodHint > hints) |
void | setMatrix (const QMatrix &matrix, bool combine) |
void | setOpacity (qreal opacity) |
void | setPanelModality (PanelModality panelModality) |
void | setParentItem (QGraphicsItem *newParent) |
void | setPos (const QPointF &pos) |
void | setPos (qreal x, qreal y) |
void | setRotation (qreal angle) |
void | setScale (qreal factor) |
void | setSelected (bool selected) |
void | setToolTip (const QString &toolTip) |
void | setTransform (const QTransform &matrix, bool combine) |
void | setTransformations (const QList< QGraphicsTransform * > &transformations) |
void | setTransformOriginPoint (qreal x, qreal y) |
void | setTransformOriginPoint (const QPointF &origin) |
void | setVisible (bool visible) |
void | setX (qreal x) |
void | setY (qreal y) |
void | setZValue (qreal z) |
void | shear (qreal sh, qreal sv) |
void | show () |
void | stackBefore (const QGraphicsItem *sibling) |
QGraphicsObject * | toGraphicsObject () |
const QGraphicsObject * | toGraphicsObject () const |
QString | toolTip () const |
QGraphicsItem * | topLevelItem () const |
QGraphicsWidget * | topLevelWidget () const |
QTransform | transform () const |
QList< QGraphicsTransform * > | transformations () const |
QPointF | transformOriginPoint () const |
void | translate (qreal dx, qreal dy) |
virtual int | type () const |
void | ungrabKeyboard () |
void | ungrabMouse () |
void | unsetCursor () |
void | update (qreal x, qreal y, qreal width, qreal height) |
void | update (const QRectF &rect) |
QGraphicsWidget * | window () const |
qreal | x () const |
qreal | y () const |
qreal | zValue () const |
Public Member Functions inherited from LinkWidget | |
LinkWidget () | |
virtual | ~LinkWidget () |
QString | operationText (UMLScene *scene=0) |
QString | sequenceNumber () const |
void | setSequenceNumber (const QString &sequenceNumber) |
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) |
Static Public Member Functions inherited from QObject | |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
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 QGraphicsObject | |
void | updateMicroFocus () |
Protected Member Functions inherited from QObject | |
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const char *signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const char *signal) |
int | receivers (const char *signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
Protected Member Functions inherited from QGraphicsItem | |
virtual void | dragEnterEvent (QGraphicsSceneDragDropEvent *event) |
virtual void | dragLeaveEvent (QGraphicsSceneDragDropEvent *event) |
virtual void | dragMoveEvent (QGraphicsSceneDragDropEvent *event) |
virtual void | dropEvent (QGraphicsSceneDragDropEvent *event) |
virtual void | focusInEvent (QFocusEvent *event) |
virtual void | focusOutEvent (QFocusEvent *event) |
virtual void | inputMethodEvent (QInputMethodEvent *event) |
virtual QVariant | inputMethodQuery (Qt::InputMethodQuery query) const |
virtual QVariant | itemChange (GraphicsItemChange change, const QVariant &value) |
virtual void | keyPressEvent (QKeyEvent *event) |
virtual void | keyReleaseEvent (QKeyEvent *event) |
void | prepareGeometryChange () |
virtual bool | sceneEvent (QEvent *event) |
virtual bool | sceneEventFilter (QGraphicsItem *watched, QEvent *event) |
void | updateMicroFocus () |
virtual void | wheelEvent (QGraphicsSceneWheelEvent *event) |
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 216 of file associationwidget.cpp.
Member Function Documentation
|
virtual |
Activates the AssociationWidget after a load.
- Returns
- true for success
Definition at line 708 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 555 of file associationwidget.cpp.
AssociationLine * AssociationWidget::associationLine | ( | ) | const |
Returns a pointer to the association widget's line path.
Definition at line 698 of file associationwidget.cpp.
Uml::AssociationType::Enum AssociationWidget::associationType | ( | ) | const |
Gets the association's type.
- Returns
- This AssociationWidget's AssociationType::Enum.
Definition at line 1448 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 568 of file associationwidget.cpp.
|
virtual |
Returns the bounding rectangle of all segments of the association.
Reimplemented from WidgetBase.
Definition at line 3873 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 1658 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 515 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 1143 of file associationwidget.cpp.
FloatingTextWidget * AssociationWidget::changeabilityWidget | ( | Uml::RoleType::Enum | role | ) | const |
Return the given role's changeability FloatingTextWidget widget.
Definition at line 869 of file associationwidget.cpp.
void AssociationWidget::cleanup | ( | ) |
CleansUp all the association's data in the related widgets.
Definition at line 1288 of file associationwidget.cpp.
void AssociationWidget::clipSize | ( | ) |
Definition at line 3918 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 2895 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 2613 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 1419 of file associationwidget.cpp.
|
protectedvirtual |
Event handler for context menu events, called from the line segments.
Reimplemented from WidgetBase.
Definition at line 3948 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 110 of file associationwidget.cpp.
|
static |
Preferred constructor (static factory method.)
- Parameters
-
scene The parent view of this widget. pWidgetA Pointer to the role A widget for the association. assocType The AssociationType::Enum for this association. pWidgetB Pointer to the role B widget for the association. umlobject Pointer to the underlying UMLObject (if applicable.)
Definition at line 126 of file associationwidget.cpp.
void AssociationWidget::createAssocClassLine | ( | ) |
Creates the association class connecting line.
Definition at line 2850 of file associationwidget.cpp.
void AssociationWidget::createAssocClassLine | ( | ClassifierWidget * | classifier, |
int | linePathSegmentIndex | ||
) |
Creates the association class connecting line using the specified ClassifierWidget.
- Parameters
-
classifier The ClassifierWidget to use. linePathSegmentIndex The index of the segment where the association class is created.
Definition at line 2874 of file associationwidget.cpp.
|
virtual |
Overrides operation from LinkWidget.
Required by FloatingTextWidget.
Implements LinkWidget.
Definition at line 338 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 3145 of file associationwidget.cpp.
|
protectedvirtual |
Reimplemented event handler for hover enter events.
Reimplemented from QGraphicsItem.
Definition at line 4003 of file associationwidget.cpp.
|
protectedvirtual |
Reimplemented event handler for hover leave events.
Reimplemented from QGraphicsItem.
Definition at line 4011 of file associationwidget.cpp.
|
protectedvirtual |
Reimplemented event handler for hover move events.
Reimplemented from QGraphicsItem.
Definition at line 4019 of file associationwidget.cpp.
bool AssociationWidget::isActivated | ( | ) | const |
Read property of bool m_activated.
Definition at line 1797 of file associationwidget.cpp.
bool AssociationWidget::isCollaboration | ( | ) | const |
Returns true if this AssociationWidget represents a collaboration message.
Definition at line 1427 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 1352 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 1367 of file associationwidget.cpp.
bool AssociationWidget::isSelf | ( | ) | const |
Returns true if this AssociationWidget represents a self message.
Definition at line 1438 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 4099 of file associationwidget.cpp.
|
virtual |
Queries the UMLView for resolving the role A and role B widgets.
....
Reimplemented from LinkWidget.
Definition at line 4348 of file associationwidget.cpp.
|
virtual |
Overrides operation from LinkWidget.
Required by FloatingTextWidget.
- Returns
- classifier
Implements LinkWidget.
Definition at line 482 of file associationwidget.cpp.
|
virtual |
Overrides operation from LinkWidget.
Required by FloatingTextWidget.
- Parameters
-
op Return this AssociationWidget's operation string.
Implements LinkWidget.
Definition at line 471 of file associationwidget.cpp.
|
virtual |
Set all 'owned' child widgets to this font.
Implements LinkWidget.
Definition at line 268 of file associationwidget.cpp.
|
virtual |
Adds a break point (if left mouse button).
Reimplemented from QGraphicsItem.
Definition at line 1566 of file associationwidget.cpp.
|
virtual |
Moves the break point being dragged.
Reimplemented from QGraphicsItem.
Definition at line 3277 of file associationwidget.cpp.
|
virtual |
Sets the association to be selected.
Reimplemented from QGraphicsItem.
Definition at line 2944 of file associationwidget.cpp.
|
virtual |
Displays the right mouse buttom menu if right button is pressed.
Reimplemented from QGraphicsItem.
Definition at line 2974 of file associationwidget.cpp.
void AssociationWidget::moveEntireAssoc | ( | qreal | x, |
qreal | y | ||
) |
Moves the entire association by the given offset.
Definition at line 3861 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 3845 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 1081 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 841 of file associationwidget.cpp.
QString AssociationWidget::name | ( | ) | const |
Returns the m_nameWidget's text.
- Returns
- Text of the FloatingTextWidget name widget.
Definition at line 908 of file associationwidget.cpp.
FloatingTextWidget * AssociationWidget::nameWidget | ( | ) | const |
Read property of FloatingTextWidget* m_nameWidget.
- Returns
- Pointer to the FloatingTextWidget name widget.
Definition at line 851 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 3772 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 3799 of file associationwidget.cpp.
Reimplement method from WidgetBase in order to check owned floating texts.
- Parameters
-
p Point to be checked.
- Returns
- m_nameWidget if m_nameWidget is non NULL and m_nameWidget->onWidget(p) returns non NULL; m_role[0].(multiplicity|changeability|role)Widget if the resp. widget is non NULL and its onWidget(p) returns non NULL; m_role[1].(multiplicity|changeability|role)Widget if the resp. widget is non NULL and its onWidget(p) returns non NULL; else NULL.
Reimplemented from WidgetBase.
Definition at line 3749 of file associationwidget.cpp.
|
virtual |
Implements operation from LinkWidget.
Motivated by FloatingTextWidget.
Implements LinkWidget.
Definition at line 314 of file associationwidget.cpp.
|
virtual |
Overrides operation from LinkWidget.
Required by FloatingTextWidget.
- Todo:
- Move to LinkWidget.
Reimplemented from LinkWidget.
Definition at line 296 of file associationwidget.cpp.
bool AssociationWidget::operator!= | ( | AssociationWidget & | other | ) | const |
Overrides the != operator.
Definition at line 690 of file associationwidget.cpp.
bool AssociationWidget::operator== | ( | const AssociationWidget & | other | ) | const |
Overrides the equality test operator.
Definition at line 637 of file associationwidget.cpp.
void AssociationWidget::removeAssocClassLine | ( | ) |
Remove dashed connecting line for association class.
Definition at line 2833 of file associationwidget.cpp.
|
virtual |
Calls setTextPosition on all the labels.
Overrides operation from LinkWidget.
Reimplemented from LinkWidget.
Definition at line 356 of file associationwidget.cpp.
QString AssociationWidget::roleDocumentation | ( | Uml::RoleType::Enum | role | ) | const |
Returns the given role's documentation.
Definition at line 1025 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 972 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 861 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 1900 of file associationwidget.cpp.
|
virtual |
Saves this widget to the "assocwidget" XMI element.
Reimplemented from LinkWidget.
Definition at line 4027 of file associationwidget.cpp.
void AssociationWidget::selectAssocClassLine | ( | bool | sel = true | ) |
Renders the association class connecting line selected.
Definition at line 2933 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 1805 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 1461 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 1154 of file associationwidget.cpp.
|
virtual |
Overrides operation from LinkWidget.
Required by FloatingTextWidget.
Implements LinkWidget.
Definition at line 347 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 387 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 1092 of file associationwidget.cpp.
|
virtual |
Sets the text in the FloatingTextWidget widget representing the Name of this association.
Reimplemented from WidgetBase.
Definition at line 919 of file associationwidget.cpp.
|
virtual |
Implements operation from LinkWidget.
Motivated by FloatingTextWidget.
Implements LinkWidget.
Definition at line 323 of file associationwidget.cpp.
|
virtual |
Overrides operation from LinkWidget.
Required by FloatingTextWidget.
- Parameters
-
op The new operation string to set.
Implements LinkWidget.
Definition at line 495 of file associationwidget.cpp.
void AssociationWidget::setRoleDocumentation | ( | const QString & | doc, |
Uml::RoleType::Enum | role | ||
) |
Set the documentation on the given role.
Definition at line 1014 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 985 of file associationwidget.cpp.
|
virtual |
Sets the state of whether the widget is selected.
- Parameters
-
_select The state of whether the widget is selected.
Reimplemented from WidgetBase.
Definition at line 3698 of file associationwidget.cpp.
void AssociationWidget::setStereotype | ( | const QString & | stereo | ) |
Definition at line 955 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 3173 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 226 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 1119 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 826 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 1266 of file associationwidget.cpp.
void AssociationWidget::setXEntireAssoc | ( | qreal | x | ) |
Set all association points to x coordinate.
Definition at line 3821 of file associationwidget.cpp.
void AssociationWidget::setYEntireAssoc | ( | qreal | y | ) |
Set all association points to y coordinate.
Definition at line 3833 of file associationwidget.cpp.
|
virtual |
Returns the shape of all segments of the association.
Reimplemented from QGraphicsItem.
Definition at line 3881 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 3907 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 3893 of file associationwidget.cpp.
|
virtualslot |
Handles the selection from the popup menu.
Definition at line 2982 of file associationwidget.cpp.
|
slot |
Synchronize this widget from the UMLAssociation.
Definition at line 1813 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 879 of file associationwidget.cpp.
QString AssociationWidget::toString | ( | ) | const |
Returns a QString Object representing this AssociationWidget.
Definition at line 1534 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 1105 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 1254 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 1496 of file associationwidget.cpp.
Uml::ID::Type AssociationWidget::widgetLocalIDForRole | ( | Uml::RoleType::Enum | role | ) | const |
Gets the local ID of the given role widget.
Definition at line 1515 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 1914 of file associationwidget.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.