(In reply to Ralf Habacker from comment #8)
> Created attachment 88069 [details] > Hiding problems with UML2 interface ball an socket notation > > There are additional hiding problems in this diagram Thanks for the test case. Here is my attempt at fixing; please confirm. umbrello/widgets/widget_utils.{h,cpp} function closestPoints() - New function determines the approximate closest points of two polygons. umbrello/widgets/associationwidget.cpp function calculateEndingPoints() - In case (size < 2), pass QPainterPath::toFillPolygon() converted shape() of pWidgetA and pWidgetB into call of Widget_Utils::closestPoints(). Pass components p1() and p2() of returned QLine into call of m_associationLine->setEndPoints(). umbrello/widgets/classifierwidget.{h,cpp} - New member m_pInterfaceName of type FloatingTextWidget holds the name in case of interface drawn as circle. - Reimplement UMLWidget functions onWidget() and widgetWithID() to include consideration of m_pInterfaceName. umbrello/widgets/classifierwidget.cpp - In function shape() case (classifier()->isInterface() && visualProperty(DrawAsCircle)), add only the ellipse of the current rect() to path. - In function drawAsCircle(), - In case (m_Assocs.size() > 1) fix Y value of requireArc; - Remove painting of name underneath circle, this is now delegated to the FloatingTextWidget m_pInterfaceName. - In function calculateAsCircleSize() remove coding of name underneath circle, this is now delegated to the FloatingTextWidget m_pInterfaceName. - In function setDrawAsCircle(), - In case drawAsCircle add allocation of m_pInterfaceName and set up its geometry; - Choose same center point between circular and rectangular display so that on toggling argument the widget changes shape but not position. - In function changeToClass() ensure that visualProperty(DrawAsCircle) is false. - In functions {loadFrom,saveTo}XMI add loading/saving of m_pInterfaceName as child <floatingtext>. umbrello/widgets/floatingtextwidget.cpp function onWidget() - Consider case pw->baseType() == wt_Interface with ClassifierWidget::getDrawAsCircle() returning true in on-widget test. - Clearly separate handling of parent-widget relative (isWidgetChild=true) from absolute (isWidgetChild=false) coordinates. umbrello/version.h - Increment XMI_FILE_VERSION due to added <floatingtext> in <interfacewidget drawascircle="1"> CCBUG:128351
parent
36f758fc
Please register or sign in to comment