[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-10 18:27:56
Message-ID: bug-128351-17878-SFxXdVdXgy () http ! bugs ! kde ! org/
[Download RAW message or body]

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

--- Comment #20 from Oliver Kellogg <okellogg@users.sourceforge.net> ---
Git commit 3360998ea25f5974455939bd100fb4c37bd17d36 by Oliver Kellogg.
Committed on 10/08/2014 at 18:28.
Pushed by okellogg into branch 'master'.

(In reply to Ralf Habacker from comment #9)
> Comment on attachment 83576 [details]
> Similar example for instantiated template class
>
> Here using correct widget shape for line intersecting would solve the issue.

Here is an implementation for corrected widget shape of template classes.
However, apparently Widget_Utils::closestPoints() still has a bug related to
anchoring in the NorthWest, West, and SouthWest regions; I'll look into that
next.

umbrello/widgets/umlwidget.{h,cpp}
- At function calculateSize() add optional bool argument `withExtensions'
  defaulting to true.
- At functions calculateSize(), minimumSize(), and getFontMetrics(), add
  `const' qualifier to enable use in overriding QGraphicsItem::shape().
- In function init() add allocation of the m_pFontMetrics array elements.
  Reason: Ad hoc allocation of m_pFontMetrics element is removed from
  getFontMetrics() in order to make that method `const'.
- In function forceUpdateFontMetrics() for-loops let loop variable count
  backwards so that m_font ends up initialized to FT_NORMAL (index 0.)

umbrello/widgets/classifierwidget.{h,cpp}
- UMLWidget overriding function calculateSize() assumes minimumSize() body.
  If `withExtensions' arg is true then size is calculated to include
  template box; else size does not include template box.
- Function minimumSize() now simply calls calculateSize() using default
  withExtensions argument.
- Declare following functions `const':
  calculateTemplatesBoxSize(), calculateAsCircleSize(), minimumSize(),
  displayedMembers(), displayedAttributes(), displayedOperations().
  This is required due to their usage in overriding QGraphicsItem::shape().
- In function paint() rename m_bodyOffsetY to bodyOffsetY.
  Reason: This is a local variable not a class member.
- In function shape(), if calculateTemplatesBoxSize() returns non-zero then
  add the templates box rectangle to the path, and displace the main
  rectangle by a postive Y offset of templatesBoxSize.height() minus MARGIN.

umbrello/widgets/notewidget.{h,cpp}
- Adjust calculateSize() override to changed signature in UMLWidget.

umbrello/widgets/activitywidget.{h,cpp}
umbrello/widgets/actorwidget.{h,cpp}
umbrello/widgets/artifactwidget.{h,cpp}
umbrello/widgets/categorywidget.{h,cpp}
umbrello/widgets/combinedfragmentwidget.{h,cpp}
umbrello/widgets/componentwidget.{h,cpp}
umbrello/widgets/datatypewidget.{h,cpp}
umbrello/widgets/entitywidget.{h,cpp}
umbrello/widgets/enumwidget.{h,cpp}
umbrello/widgets/floatingtextwidget.{h,cpp}
umbrello/widgets/forkjoinwidget.{h,cpp}
umbrello/widgets/nodewidget.{h,cpp}
umbrello/widgets/notewidget.{h,cpp}
umbrello/widgets/usecasewidget.{h,cpp}
umbrello/widgets/objectnodewidget.{h,cpp}
umbrello/widgets/objectwidget.{h,cpp}
umbrello/widgets/packagewidget.{h,cpp}
umbrello/widgets/preconditionwidget.{h,cpp}
umbrello/widgets/regionwidget.{h,cpp}
umbrello/widgets/signalwidget.{h,cpp}
umbrello/widgets/statewidget.{h,cpp}
umbrello/widgets/umlwidget.{h,cpp}
- Adjust minimumSize() override to changed signature in UMLWidget.

umbrello/widgets/associationwidget.cpp
- In function calculateEndingPoints(), apply
    QPolygonF::translated(pWidgetA->pos()) on polyA
  and apply
    QPolygonF::translated(pWidgetB->pos()) on polyB
  to properly handle non child widgets (i.e. with absolute pos().)
- In function updateRegionLineCount(), for calculating `pt' employ
  Widget_Utils::closestPoints() following the pattern used in
  calculateEndingPoints().

umbrello/widgets/widget_utils.cpp
- New function middle() returns the middle value of two axis values.
  The function handles not only relative but also absolute coordinates.
- In function closestPoints() employ function middle() in the
  result.setLine() arguments for regions North, South, West, and East.

M  +1    -1    umbrello/widgets/activitywidget.cpp
M  +1    -1    umbrello/widgets/activitywidget.h
M  +1    -1    umbrello/widgets/actorwidget.cpp
M  +1    -1    umbrello/widgets/actorwidget.h
M  +3    -3    umbrello/widgets/artifactwidget.cpp
M  +3    -3    umbrello/widgets/artifactwidget.h
M  +39   -26   umbrello/widgets/associationwidget.cpp
M  +1    -1    umbrello/widgets/categorywidget.cpp
M  +1    -1    umbrello/widgets/categorywidget.h
M  +50   -31   umbrello/widgets/classifierwidget.cpp
M  +8    -6    umbrello/widgets/classifierwidget.h
M  +1    -1    umbrello/widgets/combinedfragmentwidget.cpp
M  +1    -1    umbrello/widgets/combinedfragmentwidget.h
M  +1    -1    umbrello/widgets/componentwidget.cpp
M  +1    -1    umbrello/widgets/componentwidget.h
M  +1    -1    umbrello/widgets/datatypewidget.cpp
M  +1    -1    umbrello/widgets/datatypewidget.h
M  +1    -1    umbrello/widgets/entitywidget.cpp
M  +1    -1    umbrello/widgets/entitywidget.h
M  +1    -1    umbrello/widgets/enumwidget.cpp
M  +1    -1    umbrello/widgets/enumwidget.h
M  +1    -1    umbrello/widgets/floatingtextwidget.cpp
M  +1    -1    umbrello/widgets/floatingtextwidget.h
M  +1    -1    umbrello/widgets/forkjoinwidget.cpp
M  +1    -1    umbrello/widgets/forkjoinwidget.h
M  +1    -1    umbrello/widgets/nodewidget.cpp
M  +1    -1    umbrello/widgets/nodewidget.h
M  +3    -4    umbrello/widgets/notewidget.cpp
M  +2    -2    umbrello/widgets/notewidget.h
M  +1    -1    umbrello/widgets/objectnodewidget.cpp
M  +1    -1    umbrello/widgets/objectnodewidget.h
M  +1    -1    umbrello/widgets/objectwidget.cpp
M  +1    -1    umbrello/widgets/objectwidget.h
M  +1    -1    umbrello/widgets/packagewidget.cpp
M  +1    -1    umbrello/widgets/packagewidget.h
M  +1    -1    umbrello/widgets/preconditionwidget.cpp
M  +1    -1    umbrello/widgets/preconditionwidget.h
M  +1    -1    umbrello/widgets/regionwidget.cpp
M  +1    -1    umbrello/widgets/regionwidget.h
M  +1    -1    umbrello/widgets/signalwidget.cpp
M  +1    -1    umbrello/widgets/signalwidget.h
M  +3    -3    umbrello/widgets/statewidget.cpp
M  +1    -1    umbrello/widgets/statewidget.h
M  +13   -11   umbrello/widgets/umlwidget.cpp
M  +3    -3    umbrello/widgets/umlwidget.h
M  +1    -1    umbrello/widgets/usecasewidget.cpp
M  +1    -1    umbrello/widgets/usecasewidget.h
M  +15   -8    umbrello/widgets/widget_utils.cpp

http://commits.kde.org/umbrello/3360998ea25f5974455939bd100fb4c37bd17d36

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