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

Sharan Rao sharanrao at gmail.com
Mon Oct 1 19:43:28 UTC 2007


SVN commit 719730 by sharan:

Add a menu Item "Properties" for many ListViewItems which didn't have them ( like, attributes et all )



 M  +2 -0      dialogs/classgenpage.cpp  
 M  +5 -4      listpopupmenu.cpp  
 M  +5 -0      umllistview.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/classgenpage.cpp #719729:719730
@@ -71,6 +71,8 @@
         name = i18n("Interface &name:");
     } else if (t == Uml::ot_Component) {
         name = i18n("Component &name:");
+    } else if (t == Uml::ot_Node) {
+        name = i18n("Node &name:");
     } else if (t == Uml::ot_Artifact) {
         name = i18n("Artifact &name:");
     } else if (t == Uml::ot_Enum) {
--- trunk/KDE/kdesdk/umbrello/umbrello/listpopupmenu.cpp #719729:719730
@@ -742,7 +742,7 @@
     insert(mt_Delete);
 }
 
-void ListPopupMenu::insertContainerItems(bool folderAndDiagrams) 
+void ListPopupMenu::insertContainerItems(bool folderAndDiagrams)
 {
     KMenu* menu = new KMenu(i18n("New"), this);
     menu->setIcon(SmallIcon("document-new"));
@@ -771,7 +771,7 @@
     insert(mt_Properties);
 }
 
-void ListPopupMenu::insertSubmodelAction() 
+void ListPopupMenu::insertSubmodelAction()
 {
     const Settings::OptionState& ostat = Settings::getOptionState();
     if (ostat.generalState.tabdiagrams) {
@@ -879,7 +879,7 @@
     addMenu(color);
 }
 
-Uml::Diagram_Type ListPopupMenu::convert_MT_DT(Menu_Type mt) 
+Uml::Diagram_Type ListPopupMenu::convert_MT_DT(Menu_Type mt)
 {
     Uml::Diagram_Type type =  Uml::dt_Undefined;
 
@@ -1366,6 +1366,7 @@
     case mt_Operation:
     case mt_Template:
         insertStdItems(false);
+        insert( mt_Properties );
         break;
 
     case mt_Category:
@@ -1612,7 +1613,7 @@
 
 QAction* ListPopupMenu::getAction(Menu_Type idx)
 {
-    return m_actions.value(idx, NULL); 
+    return m_actions.value(idx, NULL);
 }
 
 // ListPopupMenu::Menu_Type ListPopupMenu::getMenuType(KAction* action)
--- trunk/KDE/kdesdk/umbrello/umbrello/umllistview.cpp #719729:719730
@@ -525,6 +525,11 @@
 
         if ( Model_Utils::typeIsCanvasWidget(lvt) ) {
             object->showProperties(ClassPropDlg::page_gen);
+        } else if ( umlType == Uml::ot_EnumLiteral ) {
+            // Show the Enum Literal Dialog
+            UMLEnumLiteral* selectedEnumLiteral = static_cast<UMLEnumLiteral*>( object );
+            selectedEnumLiteral->showPropertiesDialog( this );
+
         } else if(umlType == Uml::ot_Attribute) {
             // show the attribute dialog
             UMLAttribute* selectedAttribute = static_cast<UMLAttribute*>(object);




More information about the umbrello-devel mailing list