1. 21 Jun, 2014 1 commit
    • 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
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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
  7. 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
  8. 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
  9. 12 Jun, 2014 1 commit
  10. 11 Jun, 2014 1 commit
  11. 09 Jun, 2014 5 commits
    • Ralf Habacker's avatar
      Rename uml_p.h to umlappprivate.h to reflect class name. · 4db7138d
      Ralf Habacker authored
      The empty cpp file is required for autogenerating signal/slot related methods from class UMLAppPrivate.
      4db7138d
    • Andi Fischer's avatar
      Replacing KUrl with QUrl. · cd89f6b0
      Andi Fischer authored
      Preparation work to port to Frameworks 5.
      cd89f6b0
    • Andi Fischer's avatar
      Umbrello did not compile for me. · c7d19cf1
      Andi Fischer authored
      This patch solved the problem.
      c7d19cf1
    • Oliver Kellogg's avatar
      (In reply to comment #2) · 60fc2177
      Oliver Kellogg authored
      > (In reply to comment #1)
      > > A workaround I found is adding the line indicated with '+'.
      > > ms_seenFiles.append(includeFile);
      >
      > The problem is that the current file is added to the list of seen files
      > after importing, which failed when an included file includes the current
      > file.
      
      I tested this on current clucene/src/core/CLucene git master and I confirm
      your finding.
      I therefore commit both comment #2 and a clean version of comment #3:
      
      umbrello/codeimport/classimport.h
      - New virtual function initPerFile() lets concrete importers provide
        initializations which are executed before each single file parsed.
        This is different from initialize() in that initialize() is executed only
        once for all files parsed.
      
      umbrello/codeimport/classimport.cpp
      - Provide empty default implementation for new function initPerFile()
      - In function importFiles(), call importFile() instead of parseFile()
      - In function importFile(), call initPerFile() instead of initialize()
      
      umbrello/codeimport/cppimport.{h,cpp}
      - Reimplement function initPerFile() from ClassImport.
      - In function feedTheModel(), append includeFile to ms_seenFiles prior to
        calling feedTheModel(includeFile) if includeFile is not found in
        ms_seenFiles.
      
      umbrello/codeimport/import_utils.cpp
      - In function createUMLObject(), if name.startsWith("::") then remove the
        leading "::" from name, and set parentPkg to logicalView.
      
      umbrello/model_utils.cpp
      - In function findUMLObject(), if name.startsWith("::") then remove the
        leading "::" from name, and set currentObj to NULL.
      
      BUG:335914
      60fc2177
    • Oliver Kellogg's avatar
  12. 08 Jun, 2014 2 commits
  13. 07 Jun, 2014 3 commits
  14. 06 Jun, 2014 4 commits