[Uml-devel] branches/KDE/4.8/kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Wed Feb 22 21:22:42 UTC 2012


SVN commit 1281810 by okellogg:

Merge 1273416:1273459 from trunk (LinePath -> AssociationLine rename.)
1273378:1273416 is not applied due to i18n changes.


 M  +1 -1      CMakeLists.txt  
 M  +1 -1      association.cpp  
 D             linepath.cpp  
 D             linepath.h  
 A             widgets/associationline.cpp   linepath.cpp#1281808 [License: GPL (v2+)]
 A             widgets/associationline.h   linepath.h#1281808 [License: GPL (v2+)]
 M  +10 -10    widgets/associationwidget.cpp  
 M  +8 -8      widgets/associationwidget.h  
 M  +1 -1      widgets/widgetbase.cpp  


--- branches/KDE/4.8/kdesdk/umbrello/umbrello/CMakeLists.txt #1281809:1281810
@@ -364,6 +364,7 @@
     widgets/activitywidget.cpp
     widgets/actorwidget.cpp
     widgets/artifactwidget.cpp
+    widgets/associationline.cpp
     widgets/associationwidget.cpp
     widgets/boxwidget.cpp
     widgets/categorywidget.cpp
@@ -433,7 +434,6 @@
     foreignkeyconstraint.cpp
     icon_utils.cpp
     import_rose.cpp
-    linepath.cpp
     listpopupmenu.cpp
     main.cpp
     model_utils.cpp
--- branches/KDE/4.8/kdesdk/umbrello/umbrello/association.cpp #1281809:1281810
@@ -415,7 +415,7 @@
     Uml::IDType roleBObjID = STR2ID(element.attribute( "roleb", "-1" ));
     if (assocType == Uml::AssociationType::Aggregation ||
         assocType == Uml::AssociationType::Composition) {
-        // Flip roles to compensate for changed diamond logic in LinePath.
+        // Flip roles to compensate for changed diamond logic in AssociationLine.
         // For further explanations see AssociationWidget::loadFromXMI.
         Uml::IDType tmp = roleAObjID;
         roleAObjID = roleBObjID;
--- branches/KDE/4.8/kdesdk/umbrello/umbrello/widgets/associationwidget.cpp #1281809:1281810
@@ -1223,7 +1223,7 @@
 }
 
 
-/** Calculates and sets the first and last point in the Association's LinePath
+/** Calculates and sets the first and last point in the Association's AssociationLine
     Each point is a middle point of its respecting UMLWidget's Bounding rectangle
     or a corner of it
     This method picks which sides to use for the association */
@@ -1246,12 +1246,12 @@
      *
      * Each diagonal is defined by two corners of the bounding rectangle
      *
-     * To calculate the first point in the LinePath we have to find out in which
+     * To calculate the first point in the AssociationLine we have to find out in which
      * Region (defined by WidgetA's diagonals) is WidgetB's center
      * (let's call it Region M.) After that the first point will be the middle
      * point of the rectangle's side contained in Region M.
      *
-     * To calculate the last point in the LinePath we repeat the above but
+     * To calculate the last point in the AssociationLine we repeat the above but
      * in the opposite direction (from widgetB to WidgetA)
      */
 
@@ -1475,7 +1475,7 @@
  * Auxiliary method for widgetMoved():
  * Saves all ideally computed floatingtext positions before doing any
  * kind of change.  This is necessary because a single invocation of
- * calculateEndingPoints() modifies the LinePath ending points on ALL
+ * calculateEndingPoints() modifies the AssociationLine ending points on ALL
  * AssociationWidgets.  This means that if we don't save the old ideal
  * positions then they are irretrievably lost as soon as
  * calculateEndingPoints() is invoked.
@@ -1722,7 +1722,7 @@
     return swapped;
 }
 
-/* Returns the total length of the association's LinePath:
+/* Returns the total length of the association's AssociationLine:
    result = segment_1_length + segment_2_length + ..... + segment_n_length
  */
 float AssociationWidget::totalLength()
@@ -2264,7 +2264,7 @@
 /**
  * Calculates the m_unNameLineSegment value according to the new
  * NameText topleft corner PT.
- * It iterates through all LinePath's segments and for each one
+ * It iterates through all AssociationLine's segments and for each one
  * calculates the sum of PT's distance to the start point + PT's
  * distance to the end point. The segment with the smallest sum will
  * be the RoleTextSegment (if this segment moves then the RoleText
@@ -3223,7 +3223,7 @@
             continue;
         // Determine intercept position on the edge indicated by `region'.
         UMLWidget * otherWidget = (inWidgetARegion ? wB : wA);
-        LinePath *linepath = assocwidget->getLinePath();
+        AssociationLine *linepath = assocwidget->getLinePath();
         QPoint refpoint;
         if (assocwidget->linePathStartsAt(otherWidget))
             refpoint = linepath->getPoint(linepath->count() - 2);
@@ -3386,8 +3386,8 @@
         m_LinePath.setPoint( 0, pt );
     else {
         m_LinePath.setPoint( m_LinePath.count() - 1, pt );
-        LinePath::Region r = ( region == South || region == North ) ?
-                             LinePath::TopBottom : LinePath::LeftRight;
+        AssociationLine::Region r = ( region == South || region == North ) ?
+                             AssociationLine::TopBottom : AssociationLine::LeftRight;
         m_LinePath.setDockRegion( r );
     }
 }
@@ -3947,7 +3947,7 @@
                 if (aType == AssociationType::Aggregation || aType == AssociationType::Composition) {
                     uWarning()<<" Old Style save file? swapping roles on association widget"<<this;
                     // We have to swap the A and B widgets to compensate
-                    // for the long standing bug in LinePath of drawing
+                    // for the long standing bug in AssociationLine of drawing
                     // the diamond at the wrong end which was fixed
                     // just before the 1.2 release.
                     // The logic here is that the user has understood
--- branches/KDE/4.8/kdesdk/umbrello/umbrello/widgets/associationwidget.h #1281809:1281810
@@ -16,7 +16,7 @@
 #include "umlwidgetlist.h"
 #include "messagewidgetlist.h"
 #include "associationwidgetlist.h"
-#include "linepath.h"
+#include "associationline.h"
 
 #include <QMouseEvent>
 #include <QMoveEvent>
@@ -270,7 +270,7 @@
     /**
      * Returns a pointer to the association widget's line path.
      */
-    LinePath* getLinePath() {
+    AssociationLine* getLinePath() {
         return &m_LinePath;
     }
 
@@ -293,7 +293,7 @@
      * Auxiliary method for widgetMoved():
      * Saves all ideally computed floatingtext positions before doing any
      * kind of change.  This is necessary because a single invocation of
-     * calculateEndingPoints() modifies the LinePath ending points on ALL
+     * calculateEndingPoints() modifies the AssociationLine ending points on ALL
      * AssociationWidgets.  This means that if we don't save the old ideal
      * positions then they are irretrievably lost as soon as
      * calculateEndingPoints() is invoked.
@@ -303,7 +303,7 @@
     /**
      * Calculates the m_unNameLineSegment value according to the new
      * NameText topleft corner PT.
-     * It iterates through all LinePath's segments and for each one
+     * It iterates through all AssociationLine's segments and for each one
      * calculates the sum of PT's distance to the start point + PT's
      * distance to the end point. The segment with the smallest sum will
      * be the RoleTextSegment (if this segment moves then the RoleText
@@ -530,7 +530,7 @@
 
     /**
      * Calculates and sets the first and last point in the association's
-     * LinePath.
+     * AssociationLine.
      * Each point is a middle point of its respective UMLWidget's bounding
      * rectangle.
      * This method picks which sides to use for the association.
@@ -664,7 +664,7 @@
     static QPoint swapXY(const QPoint &p);
 
     /**
-     * Returns the total length of the association's LinePath:
+     * Returns the total length of the association's AssociationLine:
      * result = segment_1_length + segment_2_length + ... + segment_n_length
      */
     float totalLength();
@@ -886,7 +886,7 @@
 
     /**
      * When the association has a Role Floating Text this text should move
-     * when the LinePath moves but only if the closest segment to the
+     * when the AssociationLine moves but only if the closest segment to the
      * role text moves.
      * This segment is:
      * m_LinePath[m_unNameLineSegment] -- m_LinePath[m_unNameLineSegment+1]
@@ -942,7 +942,7 @@
     /**
      * The definition points for the association line.
      */
-    LinePath m_LinePath;
+    AssociationLine m_LinePath;
 
     // The following items are only used if m_pObject is not set.
     Uml::AssociationType m_AssocType;
--- branches/KDE/4.8/kdesdk/umbrello/umbrello/widgets/widgetbase.cpp #1281809:1281810
@@ -83,7 +83,7 @@
 
 /**
  * Deliver a pointer to the connected UMLView
- * ( needed esp. by event handling of LinePath ).
+ * ( needed esp. by event handling of AssociationLine ).
  */
 UMLScene* WidgetBase::umlScene() const
 {




More information about the umbrello-devel mailing list