[umbrello-devel] [umbrello] [Bug 115269] Implement the UML 2.0 standard

Oliver Kellogg okellogg at users.sourceforge.net
Sun May 25 06:38:25 UTC 2014


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

--- Comment #13 from Oliver Kellogg <okellogg at users.sourceforge.net> ---
Git commit cdba7fef0d5c18a04e0a18d8f0c38d2e615930b1 by Oliver Kellogg.
Committed on 25/05/2014 at 06:38.
Pushed by okellogg into branch 'master'.

Address known issue of commit d22ed2f,
> 2) On dragging a port on the diagram, the PortWidget should be made to
     snap to the nearest edge of the nearest ComponentWidget, i.e. the
     port should "stick" to a component on moving.

umbrello/widgets/portwidget.{h,cpp}
- New function attachToOwningComponent() aligns the PortWidget's position
  such that it is attached at one of the sides of its component's widget.
- Reimplement function UMLWidget::moveWidgetBy() in order to constrain
  movement such that the port is always attached to its component.
  (Not flawless yet - to be improved.)
- Change constant `FixedSize' to QSizeF(15, 15).
  Reason: Use same value for width and height to achieve uniform aspect
  regardless of the edge at which the port is attached to the component.

umbrello/umlscene.{h,cpp}
- At function widgetOnDiagram(Uml::ID::Type), change return type from bool
  to UMLWidget*. Return pointer to the widget corresponding to `id' if it
  is on the diagram, NULL if not.
- In function setupNewWidget(), if `w' is of type wt_Port then delegate its
  setting of X/Y position to function PortWidget::attachToOwningComponent().
- In function dragEnterEvent() case DiagramType::Component, if `ot' is of
  type ot_Port then require that the owning component be present on the
  diagram in order to accept the drag event.

M  +16   -10   umbrello/umlscene.cpp
M  +1    -1    umbrello/umlscene.h
M  +69   -1    umbrello/widgets/portwidget.cpp
M  +2    -0    umbrello/widgets/portwidget.h

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

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the umbrello-devel mailing list