1. 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>
    • Oliver Kellogg's avatar
    • Oliver Kellogg's avatar
      Completion of commit cd1979ae - factoring of abstract base class from · 17e9a744
      Oliver Kellogg authored
      PinWidget and PortWidget
      - Factor new abstract base class PinPortBase from Portwidget and PinWidget.
      - Inherit from PinPortBase instead of UMLWidget.
      - 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().
      - 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.
      - In function insertSingleSelectionMenu() case WidgetBase::wt_Pin add
        mt_NameAsTooltip. Set action checked if the object's floatingTextWidget()
        returns NULL.
      - In function setupNewWidget() admit w->baseType() == WidgetBase::wt_Pin to
        call to PinPortBase::attachToOwner().
      - Add widgets/pinportbase.cpp to libwidgets_SRCS.
    • Oliver Kellogg's avatar
      umbrello/widgets/umlwidget.cpp · 3405bbfb
      Oliver Kellogg authored
      - In function onWidget() comment out uDebug() calls.
    • Oliver Kellogg's avatar
      umbrello/widgets/componentwidget.h · 5c76aaff
      Oliver Kellogg authored
      - At documentation of signal sigCompMoved() add @param's diffX and diffY.
  2. 15 Jun, 2014 1 commit
    • 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)
      - New function ownerWidget() encapsulates extraction of owning
        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).
      - Adapt function setupNewWidget() to renamed PortWidget function
  3. 14 Jun, 2014 7 commits
    • Oliver Kellogg's avatar
      Permit creation of ports using toolbar for component diagram: · f8d4dbf7
      Oliver Kellogg authored
      - 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'.
      - In function slotCheckToolBar(Uml::DiagramType::Enum) switch (m_Type) case
        Uml::DiagramType::Component, insertHotBtn(tbb_Pin).
        tbb_Pin is reused for ports.
      - 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() ]
          if scenePos.y() is in the top half of owner then
            setY(owner->y() - height())
            setY(owner->y() + owner->height())
    • Oliver Kellogg's avatar
    • 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)
      - 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.
      - Reimplement UMLWidget function widgetWithID() to additionally check
      - 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
      - In function saveToXMI(), remove saving of attribute "textid".
      - 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().
      - In function redo() call umlScene->findWidget() in lieu of
        umlScene->findWidgetByLocalId() which was removed.
      - Reimplement UMLWidget function onWidget() to additionally check PortWidget
      - 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.
      - In function loadFromXMI(), add TODO note about removing the code for
        loading "textid".
      - Increment XMI_FILE_VERSION due to changes in function saveToXMI() of
        FloatingTextWidget and PortWidget.
    • Oliver Kellogg's avatar
      umbrello/widgets/messagewidget.cpp · 7e997587
      Oliver Kellogg authored
      - In function setY() do not emit sigMessageMoved() if
      - In function setY() do not moveEvent(0) if
    • 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.
      - Adapt reimplemented function onWidget() to changed return type.
      - Reimplement UMLWidget::onWidget() in order to additionally check m_pName.
      - Adapt function widgetAt() to changed return type of UMLWidget::onWidget().
    • 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.
  4. 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.
  5. 12 Jun, 2014 1 commit
  6. 11 Jun, 2014 1 commit
  7. 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.
    • Andi Fischer's avatar
      Replacing KUrl with QUrl. · cd89f6b0
      Andi Fischer authored
      Preparation work to port to Frameworks 5.
    • Andi Fischer's avatar
      Umbrello did not compile for me. · c7d19cf1
      Andi Fischer authored
      This patch solved the problem.
    • 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:
      - 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.
      - Provide empty default implementation for new function initPerFile()
      - In function importFiles(), call importFile() instead of parseFile()
      - In function importFile(), call initPerFile() instead of initialize()
      - Reimplement function initPerFile() from ClassImport.
      - In function feedTheModel(), append includeFile to ms_seenFiles prior to
        calling feedTheModel(includeFile) if includeFile is not found in
      - In function createUMLObject(), if name.startsWith("::") then remove the
        leading "::" from name, and set parentPkg to logicalView.
      - In function findUMLObject(), if name.startsWith("::") then remove the
        leading "::" from name, and set currentObj to NULL.
    • Oliver Kellogg's avatar
  8. 08 Jun, 2014 2 commits
  9. 07 Jun, 2014 3 commits
  10. 06 Jun, 2014 6 commits
  11. 02 Jun, 2014 2 commits
  12. 31 May, 2014 3 commits
    • Oliver Kellogg's avatar
      Integration of PinWidget's floating-text name display in PortWidget · ca646e95
      Oliver Kellogg authored
      (see "BTW" at https://bugs.kde.org/show_bug.cgi?id=335399#c1)
      - At enum MenuType add new value, mt_NameAsTooltip.
      - Add protected member m_pName of type pointer-to-FloatingTextWidget with
        corresponding public getter and setter method.
        The intention is that the FloatingTextWidget may be used as an
        alternative to the tooltip for displaying the port name on a diagram.
      - Override UMLWidget::slotMenuSelection() for adding handling of
      - In function insertSingleSelectionMenu() case wt_Port, insert
        mt_NameAsTooltip as checkable. If the PortWidget's floatingTextWidget()
        is NULL then setChecked(true) on m_actions[mt_NameAsTooltip].
        This is the default case as the PortWidget does not automatically
        construct its FloatingTextWidget.
      - In function updateWidget(), if m_pName is non NULL then update the text
        in the FloatingTextWidget; else update the text in the ToolTip.
      - In function slotMenuSelection(), handle ListPopupMenu::mt_NameAsTooltip
        as follows: If m_pName is non NULL then toggle the name display from
        FloatingText to ToolTip; else toggle the name display from ToolTip to
      - In functions loadFromXMI() and saveToXMI(), implement loading/saving of
        the optional FloatingTextWidget *m_pName.
    • Oliver Kellogg's avatar
      umbrello/umlscene.cpp · 9ef8ecfa
      Oliver Kellogg authored
      - Cosmetic change in function removeWidgetCmd() : If an "if" statement
        uses braces then for symmetry its "else" part should use them also.
    • Oliver Kellogg's avatar
      umbrello/widgets/pinwidget.cpp : Do not assume that m_pName is always non... · f1c41922
      Oliver Kellogg authored
      umbrello/widgets/pinwidget.cpp : Do not assume that m_pName is always non NULL. (It may have been deleted.)
  13. 30 May, 2014 1 commit
    • Oliver Kellogg's avatar
      Followup to commit d0bafb53, · aea59832
      Oliver Kellogg authored
      > > On moving a ComponentWidget, its attached PortWidgets should move along.
      > [...]
      Additionally, associations attached at ports should also move along when a
      ComponentWidget is moved:
      - Reimplement UMLWidget virtual method adjustAssocs(qreal dx, qreal dy)
        to additionally propagate the adjustAssocs call to attached PortWidgets.
  14. 29 May, 2014 2 commits