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

Oliver Kellogg okellogg at users.sourceforge.net
Sat Jun 14 20:46:49 UTC 2014


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

--- Comment #16 from Oliver Kellogg <okellogg at users.sourceforge.net> ---
Git commit f8d4dbf7fc67e1ce0de180708eb98641b6cdd627 by Oliver Kellogg.
Committed on 14/06/2014 at 20:46.
Pushed by okellogg into branch 'master'.

Permit creation of ports using toolbar for component diagram:

umbrello/widgets/toolbarstateonewidget.cpp
- In function mouseReleaseWidget() admit
    currentWidget()->baseType() == WidgetBase::wt_Component
  to the call of setWidget(currentWidget())
- In function setWidget() handling of widgetType() == WidgetBase::wt_Pin,
  add handling of m_firstObject->baseType() == WidgetBase::wt_Component:
  - Open a dialog querying the user for a new port name
  - If user confirmed port creation then
    - Let Object_Factory create a UML Port object of given name.
      The object is owned by the UML Component underlying m_firstObject.
    - Let Widget_Factory create a PortWidget representing the UML Port and
      assign this widget to `umlwidget'.

umbrello/worktoolbar.cpp
- In function slotCheckToolBar(Uml::DiagramType::Enum) switch (m_Type) case
  Uml::DiagramType::Component, insertHotBtn(tbb_Pin).
  tbb_Pin is reused for ports.

umbrello/widgets/portwidget.cpp
- In function attachToOwningComponent() prevent the port from being dropped
  underneath its owning component (thus becoming inaccessible).
  This is achieved as follows:
  If scenePos.x() is in the range
    [ owner->x() : owner->x() + owner->width() ]
  and scenePos.y() is in the range
    [ owner->y() : owner->y() + owner->height() ]
  then
    if scenePos.y() is in the top half of owner then
      setY(owner->y() - height())
    else
      setY(owner->y() + owner->height())

M  +18   -7    umbrello/widgets/portwidget.cpp
M  +21   -4    umbrello/widgets/toolbarstateonewidget.cpp
M  +1    -0    umbrello/worktoolbar.cpp

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

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


More information about the umbrello-devel mailing list