[Uml-devel] kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Wed Dec 29 01:32:01 UTC 2004


CVS commit by okellogg: 

popupMenuSel(mt_Properties): Bring up the UMLTemplateDialog.


  M +14 -2     umllistview.cpp   1.137


--- kdesdk/umbrello/umbrello/umllistview.cpp  #1.136:1.137
@@ -43,4 +43,5 @@
 #include "docwindow.h"
 #include "listpopupmenu.h"
+#include "template.h"
 #include "operation.h"
 #include "attribute.h"
@@ -57,4 +58,5 @@
 #include "dialogs/umlattributedialog.h"
 #include "dialogs/umloperationdialog.h"
+#include "dialogs/umltemplatedialog.h"
 
 class LVToolTip : public QToolTip
@@ -399,12 +401,17 @@ void UMLListView::popupMenuSel(int sel) 
                 } else if(umlType == Uml::ot_Attribute) {
                         // show the attribute dialogue
-                        UMLAttribute* selectedAttribute = (UMLAttribute*)object;
+                        UMLAttribute* selectedAttribute = static_cast<UMLAttribute*>(object);
                         UMLAttributeDialog dialogue( this, selectedAttribute );
                         dialogue.exec();
                 } else if(umlType == Uml::ot_Operation) {
                         // show the operation dialogue
-                        UMLOperation* selectedOperation = (UMLOperation*)object;
+                        UMLOperation* selectedOperation = static_cast<UMLOperation*>(object);
                         UMLOperationDialog dialogue( this, selectedOperation );
                         dialogue.exec();
+                } else if(umlType == Uml::ot_Template) {
+                        // show the template dialogue
+                        UMLTemplate* selectedTemplate = static_cast<UMLTemplate*>(object);
+                        UMLTemplateDialog dialogue( this, selectedTemplate );
+                        dialogue.exec();
                 } else {
                         kdWarning() << "calling properties on unknown type" << endl;
@@ -1485,4 +1492,8 @@ Uml::Object_Type UMLListView::convert_LV
                 break;
 
+        case Uml::lvt_EntityAttribute:
+                ot = Uml::ot_EntityAttribute;
+                break;
+
         case Uml::lvt_Attribute:
                 ot = Uml::ot_Attribute;






More information about the umbrello-devel mailing list