1. 26 Jun, 2014 1 commit
  2. 25 Jun, 2014 6 commits
  3. 24 Jun, 2014 1 commit
    • Oliver Kellogg's avatar
      (In reply to comment #21) · 8449eba5
      Oliver Kellogg authored
      > [...]
      > This test case contains multiple class diagrams and exposes a bug in the
      > current import code:
      > Only the last of the class diagrams actually show up.
      
      Here is the fix:
      
      umbrello/umllistview.cpp
      - In function slotDiagramCreated(), use return value from
        findUMLObject(scene->folder()) as the `parent' argument in call to
        UMLListViewItem constructor.
      - In function slotObjectCreated(), use return value from
        findUMLObject(object->umlPackage()) for `parentItem' instead of using
        determineParentItem(object).
      
      umbrello/widgets/widget_factory.cpp
      - In function createWidget() handle type UMLObject::ot_Folder alongside
        ot_Package.
      
      umbrello/import_rose.{h,cpp}
      - At function loadFromMDL() change return type to pointer-to-UMLPackage.
        On non NULL parentPkg return result from handleControlledUnit();
        on NULL parentPkg return UMLDoc::m_root[Uml::ModelType::Logical].
      
      umbrello/petaltree2uml.h
      - At function petalTree2Uml() change return type to pointer-to-UMLPackage.
      
      umbrello/petaltree2uml.{h,cpp}
      - At function handleControlledUnit() change return type to ptr-to-UMLPackage.
        Return object created for controlled unit.
      - New function diagramType() maps Rose diagram keyword to corresponding
        Uml::DiagramType::Enum.
      - In function umbrellify(),
        - At handling of Class_Category attribute logical_models and SubSystem
          attribute physical_models, for the non controlled-unit case add handling
          of attributes logical_presentations and physical_presentations.
          If unit_reference_list is non empty then create a UML object of type
          ot_Folder instead of ot_Package.
        - At handling of {Class,UseCase,Module_,Process_}Diagram employ function
          diagramType(). Use `parentPkg' cast to UMLFolder* as the rootFolder in
          call to umlDoc->createDiagram().
      - At function petalTree2Uml(),
        - Choose attribute to find based on
          umlDoc->rootFolderType(Model_Utils::rootPackage(parentPkg)) :
          - For Uml::ModelType::Logical seek logical_models;
          - For Uml::ModelType::Component seek physical_models.
        - At definition of `atts' use the PetalNode::attributes() of the `models'
          found.
        - Return pointer to the UMLFolder which is created for the controlled unit.
      
      CCBUG:81364
      8449eba5
  4. 23 Jun, 2014 2 commits
  5. 22 Jun, 2014 1 commit
  6. 21 Jun, 2014 3 commits
    • Oliver Kellogg's avatar
      umbrello/petaltree2uml.{h,cpp} · 8a1e776b
      Oliver Kellogg authored
      umbrello/import_rose.cpp
      - Merge function importLogicalPresentations() into importView().
        To this end, add following arguments to importView():
        QString firstNodeName : Name of first node in the root category
                                is checked to be equal to this name.
        QString presentationsName : Name of attribute containing diagrams
                                is checked to be equal to this name.
      
      umbrello/petaltree2uml.cpp
      - In function clean() remove from start of `str' not only "Logical View::"
        but all scope prefixes. This mitigates oversizing of UseCaseView ellipse.
      - In function handleAssocView() avoid dereferencing roleview_list when NULL.
      - In function umbrellify(),
        - Handle component package "SubSystem" alongside "Class_Category".
        - At objType "Class" implement stereotype "CORBAInterface".
        - Add handling of "module" aka "Component".
        - At objType "Association" fix null-pointer test of `roles'.
        - Handle "Module_Diagram" and "Process_Diagram" alongside "ClassDiagram"
          and "UseCaseDiagram".
        - Handle "ModView" and "SubSysView" alongside "CategoryView", "ClassView",
          and "UseCaseView".
      8a1e776b
    • Oliver Kellogg's avatar
      umbrello/petaltree2uml.cpp · f0e30894
      Oliver Kellogg authored
      - In function handleAssocView(),
        - Add support for attribute "roleview_list";
        - Produce precise uError() message on errors decoding supplier/client.
      - In function umbrellify(),
        - At objType "Class_Category" add missing parentPkg->addObject(o).
        - At objTypes "Class" and "UseCase",
          - Use Object_Factory instead of Import_Utils for createUMLObject();
          - Add missing parentPkg->addObject(o).
        - At objType "Association" add missing assoc->setUMLPackage(parentPkg).
        - At objTypes "ClassDiagram" and "UseCaseDiagram" loop over `atts',
          - At objTypes "CategoryView" / "ClassView" / "UseCaseView" use default
            values for attributes "width" and "height" when not found;
          - Support objType "AssociationViewNew";
          - At objType "NoteView" add an artificial "quidu" attribute onto `attr'.
      - In function petalTree2Uml() use Object_Factory instead of Import_Utils for
        createUMLObject().
      f0e30894
    • Oliver Kellogg's avatar
      umbrello/petaltree2uml.cpp · 27fc09f2
      Oliver Kellogg authored
      - New function handleAssocView() is factored from function umbrellify()
        handling of objType "InheritView".
      - In function umbrellify(),
        - Extend handling of objType "InheritView" to also apply to "RealizeView";
        - Handle objTypes "AttachView" and "UsesView".
      27fc09f2
  7. 20 Jun, 2014 2 commits
    • Oliver Kellogg's avatar
      umbrello/petaltree2uml.cpp · ed4e5120
      Oliver Kellogg authored
      - In SuperclassesReader and RealizationsReader function insertAtParent()
        set the UMLPackage of `assoc' to that of m_classifier.
      - In function umbrellify(), map objType "InheritView" to AssociationWidget
        with association type Generalization.
      ed4e5120
    • Oliver Kellogg's avatar
      Address TODO of commit 8344d5f4, · 86642f13
      Oliver Kellogg authored
      > [...]
      > - At the code past the (parentPkg_sav != NULL) return,
      >  - Remove call to importLogicalView(); the code farther above in effect
      >    performs importLogicalView() but at the same time deals with controlled
      >    units. Perhaps should be refactored for clean separation of these tasks.
      
      umbrello/import_rose.cpp
      - In function loadFromMDL() move import of views for the case
        (parentPkg == NULL) from function petalTree2Uml(PetalNode*, UMLPackage*)
        to here.
      
      umbrello/petaltree2uml.h
      - Publish functions importView() and importLogicalPresentations(), they are
        now called directly by function loadFromMDL()
      - At function petalTree2Uml(PetalNode *root, UMLPackage *parentPkg) remove
        default value of parentPkg.
      
      umbrello/petaltree2uml.cpp
      - In class ParametersReader function insertAtParent(), generate a new ID for
        `item' if item->id() returns Uml::ID::None.
        Reason: Rose "object Parameter" does not include "quid".
      - In function umbrellify(PetalNode *node, UMLPackage *parentPkg),
        - Remove default value at parentPkg;
        - At objType "Class" support stereotype "Actor";
        - Support objType "UseCase";
        - At "ClassDiagram" and "UseCaseDiagram" nested objType "NoteView", map
          attribute "label" to NoteWidget documentation.
      - Remove function folderType();
      - Remove function umbrellify(PetalNode*, const QString&, UMLListViewItem*);
      - At function importLogicalPresentations(PetalNode*, const QString &) add
        argument UMLPackage *parent and pass parent into call of umbrellify();
      - Remove function importLogicalView();
      - At function importView() replace argument UMLListViewItem *lvParent by
        UMLPackage *parent.
      86642f13
  8. 19 Jun, 2014 5 commits
    • Oliver Kellogg's avatar
      umbrello/petaltree2uml.cpp function umbrellify(PetalNode*, UMLPackage*) · 8344d5f4
      Oliver Kellogg authored
      - At handling of (objType == "ClassDiagram" || objType == "UseCaseDiagram"),
        choose Uml::DiagramType and umlDoc->rootFolder() according to objType.
      - At the code past the (parentPkg_sav != NULL) return,
        - Remove call to importLogicalView(); the code farther above in effect
          performs importLogicalView() but at the same time deals with controlled
          units. Perhaps should be refactored for clean separation of these tasks.
        - Move call to importLogicalPresentations(root, "root_usecase_package") to
          the "import Use Case View" section.
      8344d5f4
    • Oliver Kellogg's avatar
    • Oliver Kellogg's avatar
      umbrello/import_rose.cpp · 9f2c0115
      Oliver Kellogg authored
      - Implementation-level global variable `dirPrefix' of type QString buffers
        the directory prefix of the main .mdl file passed into user level call to
        loadFromMDL(). It is used for finding .cat/.sub controlled units if no
        path is given at their definition.
      
      umbrello/import_rose.{h,cpp}
      - At function loadFromMDL() change type of parameter `file' from QIODevice
        to QFile. Reason: Body of loadFromMDL() requires access to fileName().
      - New function mdlPath() returns dirPrefix.
      
      umbrello/petaltree2uml.cpp
      - At function fetchLocation() add arguments `width' and `height'.
        Reason: Encapsulate scaling by `Rose2Qt' in function body.
      - In function handleControlledUnit(), before attempting instantiation of
        QFile(file_name), if file_name is not an absolute path then prefix
        Import_Rose::mdlPath() to it.
      - In function petalTree2Uml(),
        - Store original parentPkg in parentPkg_sav;
        - Before for-loop calling umbrellify(), if parentPkg is NULL then set
          parentPkg to umldoc->rootFolder(Uml::ModelType::Logical);
        - At shortcut "return true" after for-loop, test parentPkg_sav in lieu of
          parentPkg.
      9f2c0115
    • Oliver Kellogg's avatar
      merge master@8f5cdde · 69f447eb
      Oliver Kellogg authored
      69f447eb
    • Oliver Kellogg's avatar
      umbrello/umldoc.cpp · 8f5cdde1
      Oliver Kellogg authored
      - In function openDocument(), at tests of `filetype' extension,
        - Simplify tests by using QString::endsWith() in lieu of indexOf(QRegExp())
        - Add test for extension ".tar.gz";
      - At function createDiagramName(), fix doc of @param name.
      
      umbrello/umllistview.cpp
      - At start of function slotDiagramCreated(), replace condition for premature
        return `m_doc->loading()' by `findItem(id)'.
        Reason: On importing Rose MDL files, diagram listview items are not created
        at all if (m_doc->loading()) is in effect.
      - At function setDocument(), fix typo in doc.
      8f5cdde1
  9. 18 Jun, 2014 1 commit
    • Oliver Kellogg's avatar
      umbrello/petaltree2uml.cpp · f1e73f10
      Oliver Kellogg authored
      - The Rose diagram coordinate system is roughly twice the scale of Qt.
        I.e. when going from Rose diagram-object location/width/height to Qt,
        we need to shrink everything.
        New constant Rose2Qt lets use configure the exact factor.
      - In function fetchLocation(),
        - add missing "return" at case !ok;
        - multiply `x' and `y' by Rose2Qt on constructing QPointF() return value.
      - In function fetchDouble(), multiply value by Rose2Qt on returning.
      - In function umbrellify(), declare `width' and `height' before start of
        for-loop over `atts'. Reason: Rose diagram locations denote the object
        CENTER thus on seeing a "location",
        - for X we must subtract width/2
        - for Y we must subtract height/2
      f1e73f10
  10. 16 Jun, 2014 5 commits
    • Oliver Kellogg's avatar
      umbrello/version.h : Increment XMI_FILE_VERSION due to · 8cb24713
      Oliver Kellogg authored
      - added saving/loading of "widgetaid" in <portwidget>
      - removed saving/loading of "textid" in <pinwidget>
      8cb24713
    • Oliver Kellogg's avatar
      b251041c
    • Oliver Kellogg's avatar
      Completion of commit cd1979ae - factoring of abstract base class from · 17e9a744
      Oliver Kellogg authored
      PinWidget and PortWidget
      
      umbrello/widgets/pinportbase.{h,cpp}
      - Factor new abstract base class PinPortBase from Portwidget and PinWidget.
      
      umbrello/widgets/pinwidget.{h,cpp}
      umbrello/widgets/portwidget.{h,cpp}
      - Inherit from PinPortBase instead of UMLWidget.
      
      umbrello/widgets/activitywidget.{h,cpp}
      - New signal sigActMoved(diffX,diffY) is emitted when the activity widget is
        moved (cf. ComponentWidget::sigCompMoved).
      - Reimplement UMLWidget virtual function moveWidgetBy() for adding emission
        of sigActMoved().
      
      umbrello/widgets/widget_factory.cpp
      - In function createWidget(UMLScene*,UMLObject*) case ot_Port, call
        PinPortBase::attachToOwner() on the newly constructed PortWidget.
      - In function makeWidgetFromXMI() case tag == "pinwidget", call
        PinPortBase::attachToOwner() on the newly constructed PinWidget.
      
      umbrello/listpopupmenu.cpp
      - In function insertSingleSelectionMenu() case WidgetBase::wt_Pin add
        mt_NameAsTooltip. Set action checked if the object's floatingTextWidget()
        returns NULL.
      
      umbrello/umlscene.cpp
      - In function setupNewWidget() admit w->baseType() == WidgetBase::wt_Pin to
        call to PinPortBase::attachToOwner().
      
      umbrello/CMakeLists.txt
      - Add widgets/pinportbase.cpp to libwidgets_SRCS.
      
      CCBUG:335399
      17e9a744
    • Oliver Kellogg's avatar
      umbrello/widgets/umlwidget.cpp · 3405bbfb
      Oliver Kellogg authored
      - In function onWidget() comment out uDebug() calls.
      3405bbfb
    • Oliver Kellogg's avatar
      umbrello/widgets/componentwidget.h · 5c76aaff
      Oliver Kellogg authored
      - At documentation of signal sigCompMoved() add @param's diffX and diffY.
      5c76aaff
  11. 15 Jun, 2014 2 commits
    • Oliver Kellogg's avatar
      Preparation of PortWidget for factoring of abstract base class shared with · cd1979ae
      Oliver Kellogg authored
      PinWidget (see "BTW" at https://bugs.kde.org/show_bug.cgi?id=335399#c1)
      
      umbrello/widgets/portwidget.{h,cpp}
      - New function ownerWidget() encapsulates extraction of owning
        ComponentWidget.
        Motivation: Implementation will be different for PinWidget.
      - Rename function attachToOwningComponent() to attachToOwner().
        Motivation: Prepare for applicability to PinWidget (owner of PinWidget is
        not a ComponentWidget).
      - Rename function slotCompMoved() to slotOwnerMoved().
        Motivation: Prepare for applicability to PinWidget.
      - In C++ body, replace mentions of m_umlObject->name() by name().
        Motivation: Prepare for common base class (m_umlObject of PinWidget is
        always NULL).
      
      umbrello/umlscene.cpp
      - Adapt function setupNewWidget() to renamed PortWidget function
        attachToOwner().
      cd1979ae
    • Oliver Kellogg's avatar
      merge master@f8d4dbf · 85f876bb
      Oliver Kellogg authored
      85f876bb
  12. 14 Jun, 2014 7 commits
    • Oliver Kellogg's avatar
      Permit creation of ports using toolbar for component diagram: · f8d4dbf7
      Oliver Kellogg authored
      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())
      
      CCBUG:115269
      f8d4dbf7
    • Oliver Kellogg's avatar
      ed9a487b
    • Oliver Kellogg's avatar
      Followup to commit b61d3ab7 (moving management of widget owned floating text · 0f47f8fc
      Oliver Kellogg authored
      from UMLScene to the owning widget)
      
      umbrello/widgets/umlwidget.{h,cpp}
      - New virtual function widgetWithID() returns 'this' if given id matches
        either of m_nLocalID, m_umlObject->id(), or m_nId; else returns NULL.
        The intention is that child classes of UMLWidget may reimplement this
        function in order to test the id against their child widgets.
      
      umbrello/widgets/portwidget.{h,cpp}
      - Reimplement UMLWidget function widgetWithID() to additionally check
        m_pName.
      - In function slotMenuSelection() case ListPopupMenu::mt_NameAsTooltip,
        - If m_pName is non NULL then do not call m_scene->removeWidget(m_pName).
          Reason: m_pName is now entirely managed by PortWidget.
        - If m_pName is NULL then after assigning a new FloatingTextWidget to
          m_pName call m_pName->setParentItem(this).
          This completes the switchover of m_pName management from UMLScene.
          Further, this means that m_pName position is no longer relative to
          UMLScene but instead is now relative to its owning PortWidget.
          Adjust m_pName X/Y computations accordingly.
      - In function setFloatingTextWidget(), m_pName->setParentItem(this) if
        m_pName is non NULL.
      - In function loadFromXMI(),
        - Remove loading of attribute "textid";
        - If m_pName->loadFromXMI() returns with success then call
          m_pName->setParentItem(this).
      - In function saveToXMI(), remove saving of attribute "textid".
      
      umbrello/umlscene.{h,cpp}
      - In function widgetOnDiagram(),
        - in foreach loop over m_WidgetList, call obj->widgetWithID(id) instead
          of direct comparison (id == obj->id())
        - in foreach loop over m_MessageList, add TODO note about checking whether
          MessageWidget should reimplement widgetWithID()
      - In function findWidget(),
        - in foreach loop over m_WidgetList, replace special casing of wt_Object
          and direct comparison (id == obj->id()) by call to obj->widgetWithID(id)
        - in foreach loop over m_MessageList, add TODO note about checking whether
          MessageWidget should reimplement widgetWithID()
      - Remove function findWidgetByLocalId(); due to above change it is redundant
        to findWidget().
      
      umbrello/cmds/widget/cmd_baseWidgetCommand.cpp
      umbrello/cmds/widget/cmd_createWidget.cpp
      umbrello/cmds/widget/cmd_removeWidget.cpp
      - In function redo() call umlScene->findWidget() in lieu of
        umlScene->findWidgetByLocalId() which was removed.
      
      umbrello/widgets/floatingtextwidget.{h,cpp}
      - Reimplement UMLWidget function onWidget() to additionally check PortWidget
        parentage.
      - In function setText(), avoid calling m_linkWidget->seqNumAndOp() when
        m_linkWidget is NULL.
      - In function loadFromXMI(), call setText() instead of directly assigning
        m_Text in order to achieve geometry update. (To be checked.)
      - Fix spelling at bool usefulWidget.
      - In function saveToXMI(), return immediately if isEmpty() returns true.
      
      umbrello/widgets/pinwidget.cpp
      - In function loadFromXMI(), add TODO note about removing the code for
        loading "textid".
      
      umbrello/version.h
      - Increment XMI_FILE_VERSION due to changes in function saveToXMI() of
        FloatingTextWidget and PortWidget.
      0f47f8fc
    • Oliver Kellogg's avatar
      umbrello/widgets/messagewidget.cpp · 7e997587
      Oliver Kellogg authored
      - In function setY() do not emit sigMessageMoved() if
        UMLApp::app()->document()->loading()
      
      umbrello/widgets/objectwidget.cpp
      - In function setY() do not moveEvent(0) if
        UMLApp::app()->document()->loading()
      
      BUG:336201
      7e997587
    • Oliver Kellogg's avatar
      umbrello/widgets/umlwidget.{h,cpp} · b61d3ab7
      Oliver Kellogg authored
      - Change return type of virtual function onWidget() from bool to UMLWidget*.
        This is one of the steps for moving management of widget-owned floating
        texts from UMLScene to the owning widget.
      
      umbrello/widgets/messagewidget.{h,cpp}
      - Adapt reimplemented function onWidget() to changed return type.
      
      umbrello/widgets/pinwidget.{h,cpp}
      umbrello/widgets/portwidget.{h,cpp}
      - Reimplement UMLWidget::onWidget() in order to additionally check m_pName.
      
      umbrello/umlscene.cpp
      - Adapt function widgetAt() to changed return type of UMLWidget::onWidget().
      b61d3ab7
    • Oliver Kellogg's avatar
    • Oliver Kellogg's avatar
      umbrello/object_factory.cpp · e3a161a5
      Oliver Kellogg authored
      - Revert commit 13cce915. I overlooked the UMLObject constructor
        explicit UMLObject(const QString& name = QString(), Uml::ID::Type id = Uml::ID::None);
        which means that calling UMLObject() is _not_ calling a default constructor.
      e3a161a5
  13. 13 Jun, 2014 1 commit
    • Oliver Kellogg's avatar
      umbrello/object_factory.cpp · 13cce915
      Oliver Kellogg authored
      - In function makeObjectFromXMI(), call setBaseType() on newly constructed
        pObject. Reason: default constructors do not set UMLObject::m_BaseType.
      13cce915
  14. 12 Jun, 2014 1 commit
  15. 11 Jun, 2014 1 commit
  16. 09 Jun, 2014 1 commit