[Uml-devel] kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Tue Dec 7 13:55:24 UTC 2004


CVS commit by okellogg: 

loadUisDiagramPresentation(): Set multiplicities.


  M +17 -0     umlview.cpp   1.193


--- kdesdk/umbrello/umbrello/umlview.cpp  #1.192:1.193
@@ -45,4 +45,5 @@
 #include "docwindow.h"
 #include "assocrules.h"
+#include "umlrole.h"
 #include "umlviewcanvas.h"
 #include "dialogs/classoptionspage.h"
@@ -3542,4 +3543,10 @@ bool UMLView::loadUisDiagramPresentation
                                                 AssociationWidget *aw =
                                                     new AssociationWidget(this, wA, at, wB);
+                                                QString multiA = umla->getMulti(Uml::A);
+                                                if (!multiA.isEmpty())
+                                                        aw->setMulti(multiA, Uml::A);
+                                                QString multiB = umla->getMulti(Uml::B);
+                                                if (!multiB.isEmpty())
+                                                        aw->setMulti(multiB, Uml::B);
                                                 m_AssociationList.append(aw);
                                         } else {
@@ -3549,4 +3556,14 @@ bool UMLView::loadUisDiagramPresentation
                                         break;
                                 }
+                                case Uml::ot_Role:
+                                {
+                                        UMLRole *robj = static_cast<UMLRole*>(o);
+                                        UMLAssociation *umla = robj->getParentAssociation();
+                                        // @todo properly display role names.
+                                        //       For now, in order to get the role names displayed
+                                        //       simply delete the participating diagram objects
+                                        //       and drag them from the list view to the diagram.
+                                        break;
+                                }
                                 default:
                                         kdError() << "UMLView::uisLoadFromXMI: "






More information about the umbrello-devel mailing list