Revision d22ed2f...

Go back to digest for 25th May 2014

Features in Office

Oliver Kellogg committed changes in [umbrello] /:

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

File Changes

Added 5 files
  •   umbrello/port.cpp
  •   umbrello/port.h
  •   umbrello/widgets/portwidget.cpp
  •   umbrello/widgets/portwidget.h
  •   umbrello/pics/sources/port.svg
Modified 24 files
  •   umbrello/assocrules.cpp
  •   umbrello/CMakeLists.txt
  •   umbrello/icon_utils.cpp
  •   umbrello/icon_utils.h
  •   umbrello/listpopupmenu.cpp
  •   umbrello/listpopupmenu.h
  •   umbrello/model_utils.cpp
  •   umbrello/object_factory.cpp
  •   umbrello/optionstate.cpp
  •   umbrello/optionstate.h
  •   umbrello/umbrello.kcfg
  •   umbrello/uml.cpp
  •   umbrello/umllistview.cpp
  •   umbrello/umllistviewitem.cpp
  •   umbrello/umllistviewitem.h
  •   umbrello/umlobject.h
  •   umbrello/umlscene.cpp
  •   umbrello/pics/CMakeLists.txt
  •   umbrello/widgets/componentwidget.cpp
  •   umbrello/widgets/umlwidget.cpp
  •   umbrello/widgets/widget_factory.cpp
  •   umbrello/widgets/widgetbase.cpp
  •   umbrello/widgets/widgetbase.h
  •   umbrello/dialogs/pages/classgeneralpage.cpp
29 files changed in total