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

Oliver Kellogg okellogg at users.sourceforge.net
Sat May 24 18:44:51 UTC 2014


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

--- Comment #11 from Oliver Kellogg <okellogg at users.sourceforge.net> ---
Git commit d22ed2f5758089d376574337aebdf2e4615ab30b by Oliver Kellogg.
Committed on 24/05/2014 at 18:44.
Pushed by okellogg into branch 'master'.

(In reply to comment #9)
>
> On component diagrams:
> * Ports (on component edges)

Here is a first stab at ports.

umbrello/pics/sources/port.svg, umbrello/pics/port.png,
umbrello/pics/CMakeLists.txt
- Port icon temporarily copied from node.{svg,png}, still to be reworked
  for proper port symbol.

umbrello/port.{h,cpp}, umbrello/widgets/portwidget.{h,cpp}
- Implementation for new UML object Port and its PortWidget.
  Known issues:
  1) The PortWidget is saved but is not restored on reloading the XMI file.
  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/CMakeLists.txt
- Add widgets/portwidget.cpp to libwidgets_SRCS.
- Add port.cpp to libumbrello_SRCS.

umbrello/umlobject.h
- At end of enum ObjectType, add value ot_Port.

umbrello/umllistviewitem.h
- At enum ListViewType, insert value lvt_Port before end-of-enum mark.

umbrello/umllistviewitem.cpp
- In functions slotEditFinished() and toString(), handle case lvt_Port.

umbrello/icon_utils.h
- At enum IconType add value it_Port.

umbrello/icon_utils.cpp
In function toString(IconType type), handle case it_Port.

umbrello/listpopupmenu.h
- At enum MenuType add value mt_Port.

umbrello/listpopupmenu.cpp
- In constructor
    ListPopupMenu(QWidget*, UMLListViewItem::ListViewType, UMLObject*)
  handle case UMLListViewItem::lvt_Port.
- In function insertSingleSelectionMenu() handle case WidgetBase::wt_Port.
- In functions insert() and insertSubMenuNew() handle case mt_Component.
- In functions insertSubMenuNew() and setupMenu() handle case mt_Port.

umbrello/optionstate.h
- In struct GeneralState add member bool uml2.

umbrello/umbrello.kcfg
- In group "General Options" add entry "uml2" for enabling UML2 notation.

umbrello/uml.cpp
- In functions saveOptions() and readOptionState() handle new
  optionState.generalState member uml2.

umbrello/umlscene.cpp
- In function dragEnterEvent(), set bAccept = true for `ot' value ot_Port.

umbrello/model_utils.cpp
- In function isCloneable() handle case WidgetBase::wt_Port.
- In functions uniqObjectName(), guessContainer(), convert_OT_LVT(), and
  convert_OT_MT(), handle case UMLObject::ot_Port.
- In functions typeIsCanvasWidget(), typeIsAllowedInType(), convert_LVT_IT()
  handle case UMLListViewItem::lvt_Port.

umbrello/object_factory.cpp
- In function createNewUMLObject() handle case UMLObject::ot_Port.
- In function makeObjectFromXMI handle case UMLDoc::tagEq(xmiTag, "Port").

umbrello/umllistview.cpp
- In function slotMenuSelection() handle case ListPopupMenu::mt_Port.
- In function connectNewObjectsSlots() handle case UMLObject::ot_Port.
- In functions findUMLObjectInFolder(), moveObject(), determineParentItem(),
  isUnique(), loadChildrenFromXMI(), handle case UMLListViewItem::lvt_Port.
- In function slotMenuSelection() handle case ListPopupMenu::mt_Port.

umbrello/assocrules.cpp
- At AssocRules::m_AssocRules[] add rules for Association and UniAssociation
  from wt_Port to wt_Interface.

umbrello/widgets/widgetbase.h
- At end of enum WidgetType, add value wt_Port.

umbrello/widgets/widgetbase.cpp
- In function slotMenuSelection(), at case ListPopupMenu::mt_Properties,
  admit `wt' value wt_Port to call of showPropertiesDialog().

umbrello/widgets/umlwidget.cpp
- In function widgetHasUMLObject(), return true for `type' value wt_Port.

umbrello/widgets/widget_factory.cpp
- In function createWidget(), add case for ot_Port setting newWidget to
  a new PortWidget.

umbrello/dialogs/pages/classgeneralpage.cpp
- In ClassGeneralPage constructor setup of `name', handle case ot_Port.

M  +2    -0    umbrello/CMakeLists.txt
M  +3    -0    umbrello/assocrules.cpp
M  +3    -0    umbrello/dialogs/pages/classgeneralpage.cpp
M  +2    -0    umbrello/icon_utils.cpp
M  +1    -0    umbrello/icon_utils.h
M  +20   -1    umbrello/listpopupmenu.cpp
M  +1    -0    umbrello/listpopupmenu.h
M  +19   -1    umbrello/model_utils.cpp
M  +6    -0    umbrello/object_factory.cpp
M  +1    -1    umbrello/optionstate.cpp
M  +1    -0    umbrello/optionstate.h
M  +1    -1    umbrello/pics/CMakeLists.txt
A  +-    --    umbrello/pics/port.png
A  +114  -0    umbrello/pics/sources/port.svg
A  +69   -0    umbrello/port.cpp     [License: GPL (v2+)]
A  +46   -0    umbrello/port.h     [License: GPL (v2+)]
M  +5    -0    umbrello/umbrello.kcfg
M  +2    -0    umbrello/uml.cpp
M  +28   -6    umbrello/umllistview.cpp
M  +3    -0    umbrello/umllistviewitem.cpp
M  +1    -0    umbrello/umllistviewitem.h
M  +2    -1    umbrello/umlobject.h
M  +2    -0    umbrello/umlscene.cpp
M  +18   -6    umbrello/widgets/componentwidget.cpp
A  +101  -0    umbrello/widgets/portwidget.cpp     [License: GPL (v2+)]
A  +49   -0    umbrello/widgets/portwidget.h     [License: GPL (v2+)]
M  +1    -0    umbrello/widgets/umlwidget.cpp
M  +5    -0    umbrello/widgets/widget_factory.cpp
M  +1    -0    umbrello/widgets/widgetbase.cpp
M  +2    -1    umbrello/widgets/widgetbase.h

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

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


More information about the umbrello-devel mailing list