From bd8c5b498950e8a01981fbbfcf3ace4baec81804 Mon Sep 17 00:00:00 2001 From: "Sandro S. Andrade" Date: Sun, 17 Nov 2013 02:24:27 -0300 Subject: Add concrete syntax handling of shared and composite UML properties Change-Id: I1488821020ccc41fc52cc4b52b1ccc624e935cbc Reviewed-by: Sandro S. Andrade --- examples/uml/duse-mt/src/app/example.xmi | 21 ++++++++++++++++++++- .../qmlplugin/relationshipitem.cpp | 4 ++-- 2 files changed, 22 insertions(+), 3 deletions(-) (limited to 'examples/uml') diff --git a/examples/uml/duse-mt/src/app/example.xmi b/examples/uml/duse-mt/src/app/example.xmi index 26f0e517..1e561dd5 100644 --- a/examples/uml/duse-mt/src/app/example.xmi +++ b/examples/uml/duse-mt/src/app/example.xmi @@ -15,6 +15,14 @@ + + + + + + + + @@ -23,9 +31,12 @@ - + + + + @@ -36,6 +47,14 @@ + + + + + + + + diff --git a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/relationshipitem.cpp b/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/relationshipitem.cpp index b1790525..f528436f 100644 --- a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/relationshipitem.cpp +++ b/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/relationshipitem.cpp @@ -80,8 +80,8 @@ void RelationshipItem::paint(QPainter *painter) transform.rotate(-originalLine.angle()); painter->drawPolyline(transform.map(arrow)); - if (_end1Aggregation == "composite") { - painter->setBrush(QBrush(Qt::black)); + if (_end1Aggregation == "composite" || _end1Aggregation == "shared") { + painter->setBrush(QBrush(_end1Aggregation == "composite" ? Qt::black:Qt::white)); QPolygon diamond(QVector() << QPoint(0, 0) << QPoint(10, -10) << QPoint(20, 0) << QPoint(10, 10)); QTransform transform; transform.translate(p1.x()-x(), p1.y()-y()); -- cgit v1.2.3