[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [umbrello] [Bug 128351] Lines connect to bounding box of component interface instead of interface
From:       Oliver Kellogg <okellogg () users ! sourceforge ! net>
Date:       2014-08-04 21:31:17
Message-ID: bug-128351-17878-HpJ3SIG96J () http ! bugs ! kde ! org/
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=128351

--- Comment #12 from Oliver Kellogg <okellogg@users.sourceforge.net> ---
Git commit b32458c3013194bb2961269966b8018c5d63c586 by Oliver Kellogg.
Committed on 04/08/2014 at 21:32.
Pushed by okellogg into branch 'master'.

(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">

M  +1    -1    umbrello/version.h
M  +14   -2    umbrello/widgets/associationwidget.cpp
M  +106  -47   umbrello/widgets/classifierwidget.cpp
M  +8    -3    umbrello/widgets/classifierwidget.h
M  +15   -6    umbrello/widgets/floatingtextwidget.cpp
M  +324  -0    umbrello/widgets/widget_utils.cpp
M  +4    -0    umbrello/widgets/widget_utils.h

http://commits.kde.org/umbrello/b32458c3013194bb2961269966b8018c5d63c586

-- 
You are receiving this mail because:
You are watching all bug changes.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic