[Uml-devel] branches/work/soc-umbrello/umbrello

Andi Fischer andi.fischer at hispeed.ch
Sun Feb 5 21:30:01 UTC 2012


SVN commit 1278237 by fischer:

Changes from trunk applied.

 M  +8 -1      umbrello.desktop  
 M  +89 -11    umbrello.kcfg  
 M  +23 -15    umllistview.cpp  
 M  +1 -0      umllistview.h  


--- branches/work/soc-umbrello/umbrello/umbrello.desktop #1278236:1278237
@@ -6,8 +6,10 @@
 X-DocPath=umbrello/index.html
 Terminal=false
 Name=Umbrello
+Name[ast]=Umbrello
 Name[bg]=Umbrello
 Name[br]=Umbrello
+Name[bs]=Umbrello
 Name[ca]=Umbrello
 Name[ca at valencia]=Umbrello
 Name[cs]=Umbrello
@@ -48,6 +50,7 @@
 Name[ru]=Umbrello
 Name[sk]=Umbrello
 Name[sl]=Umbrello
+Name[sq]=Umbrello
 Name[sr]=Умбрело
 Name[sr at ijekavian]=Умбрело
 Name[sr at ijekavianlatin]=Umbrello
@@ -56,13 +59,16 @@
 Name[ta]=  அம்ரல்லோ
 Name[tg]=Umbrello
 Name[tr]=Umbrello
+Name[ug]=Umbrello
 Name[uk]=Umbrello
 Name[wa]=Umbrello
 Name[x-test]=xxUmbrelloxx
 Name[zh_CN]=Umbrello
 Name[zh_TW]=Umbrello
 GenericName=UML Modeller
+GenericName[ast]=Modelador de UML
 GenericName[bg]=Моделиране на UML
+GenericName[bs]=Modeliranje UML
 GenericName[ca]=Modelador UML
 GenericName[ca at valencia]=Modelador UML
 GenericName[cs]=UML modelář
@@ -76,7 +82,7 @@
 GenericName[et]=UML-i modelleerimise rakendus
 GenericName[eu]=UML modelatzailea
 GenericName[fa]=مدل‌ساز UML
-GenericName[fi]=UML-mallintaja
+GenericName[fi]=UML-mallinnusohjelma
 GenericName[fr]=Modeleur UML
 GenericName[ga]=Samhaltóir UML
 GenericName[gl]=Modelador de UML
@@ -102,6 +108,7 @@
 GenericName[ru]=Средство UML моделирования
 GenericName[sk]=Modelár UML
 GenericName[sl]=Modelirnik UML
+GenericName[sq]=Modelues UML
 GenericName[sr]=УМЛ моделар
 GenericName[sr at ijekavian]=УМЛ моделар
 GenericName[sr at ijekavianlatin]=UML modelar
--- branches/work/soc-umbrello/umbrello/umbrello.kcfg #1278236:1278237
@@ -76,13 +76,47 @@
        <entry name="diagram" type="Enum">
          <label>Diagram To Load at Startup</label>
          <whatsthis>The Diagram to load at startup</whatsthis>
-         <choices name="Uml::DiagramType::Value"></choices>
+         <choices name="Uml::DiagramType::Value">
+            <choice name="Undefined" />
+            <choice name="Class" />
+            <choice name="UseCase" />
+            <choice name="Sequence" />
+            <choice name="Collaboration" />
+            <choice name="State" />
+            <choice name="Activity" />
+            <choice name="Component" />
+            <choice name="Deployment" />
+            <choice name="EntityRelationship" />
+            <choice name="N_DIAGRAMTYPES" />
+         </choices>
          <default>Uml::DiagramType::Class</default>
        </entry>
        <entry name="defaultLanguage" type="Enum">
          <label>Default Language at Startup</label>
          <whatsthis>The Language that Umbrello should start with by default</whatsthis>
-         <choices name="Uml::ProgrammingLanguage::Value"></choices>
+         <choices name="Uml::ProgrammingLanguage::Value">
+            <choice name="ActionScript" />
+            <choice name="Ada" />
+            <choice name="Cpp" />
+            <choice name="CSharp" />
+            <choice name="D" />
+            <choice name="IDL" />
+            <choice name="Java" />
+            <choice name="JavaScript" />
+            <choice name="MySQL" />
+            <choice name="Pascal" />
+            <choice name="Perl" />
+            <choice name="PHP" />
+            <choice name="PHP5" />
+            <choice name="PostgreSQL" />
+            <choice name="Python" />
+            <choice name="Ruby" />
+            <choice name="SQL" />
+            <choice name="Tcl" />
+            <choice name="Vala" />
+            <choice name="XMLSchema" />
+            <choice name="Reserved" />
+         </choices>
          <default>Uml::ProgrammingLanguage::Cpp</default>
        </entry>
        <entry name="lastFile" type="String">
@@ -187,13 +221,25 @@
        <entry name="defaultAttributeScope" type="Enum">
          <label>Default Attribute Scope</label>
          <whatsthis>Default Attribute Scope</whatsthis>
-         <choices name="Uml::Visibility::Value"></choices>
+         <choices name="Uml::Visibility::Value">
+            <choice name="Public" />
+            <choice name="Private" />
+            <choice name="Protected" />
+            <choice name="Implementation" />
+            <choice name="FromParent" />
+         </choices>
          <default>Uml::Visibility::Public</default>
        </entry>
        <entry name="defaultOperationScope" type="Enum">
          <label>Default Operation Scope</label>
          <whatsthis>Default Operation Scope</whatsthis>
-         <choices name="Uml::Visibility::Value"></choices>
+         <choices name="Uml::Visibility::Value">
+            <choice name="Public" />
+            <choice name="Private" />
+            <choice name="Protected" />
+            <choice name="Implementation" />
+            <choice name="FromParent" />
+         </choices>
          <default>Uml::Visibility::Public</default>
        </entry>
    </group>
@@ -277,19 +323,34 @@
        <entry name="commentStyle" type="Enum">
          <label>Comment Style</label>
          <whatsthis>Sets the Style of Comments to be used</whatsthis>
-         <choices name="CodeGenerationPolicy::CommentStyle"></choices>
+         <choices name="CodeGenerationPolicy::CommentStyle">
+            <choice name="SingleLine" />
+            <choice name="MultiLine" />
+         </choices>
          <default>CodeGenerationPolicy::SingleLine</default>
        </entry>
        <entry name="defaultAssocFieldScope" type="Enum">
          <label>Default Association Field Scope</label>
          <whatsthis>Sets the default Association field scope</whatsthis>
-         <choices name="Uml::Visibility::Value"></choices>
+         <choices name="Uml::Visibility::Value">
+            <choice name="Public" />
+            <choice name="Private" />
+            <choice name="Protected" />
+            <choice name="Implementation" />
+            <choice name="FromParent" />
+         </choices>
          <default>Uml::Visibility::FromParent</default>
        </entry>
        <entry name="defaultAttributeAccessorScope" type="Enum">
          <label>Default Attribute Accessor Scope</label>
          <whatsthis>Sets the default attribute accessor scope</whatsthis>
-         <choices name="Uml::Visibility::Value"></choices>
+         <choices name="Uml::Visibility::Value">
+            <choice name="Public" />
+            <choice name="Private" />
+            <choice name="Protected" />
+            <choice name="Implementation" />
+            <choice name="FromParent" />
+         </choices>
          <default>Uml::Visibility::FromParent</default>
        </entry>
        <entry name="forceDoc" type="Bool">
@@ -321,19 +382,31 @@
        <entry name="indentationType" type="Enum">
          <label>Indentation Type</label>
          <whatsthis>The Type of Indentation</whatsthis>
-         <choices name="CodeGenerationPolicy::IndentationType"></choices>
+         <choices name="CodeGenerationPolicy::IndentationType">
+            <choice name="NONE" />
+            <choice name="TAB" />
+            <choice name="SPACE" />
+         </choices>
          <default>CodeGenerationPolicy::SPACE</default>
        </entry>
        <entry name="lineEndingType" type="Enum">
          <label>Line Ending Type</label>
          <whatsthis>The type of line ending ( or new line type )</whatsthis>
-         <choices name="CodeGenerationPolicy::NewLineType"></choices> 
+         <choices name="CodeGenerationPolicy::NewLineType">
+            <choice name="UNIX" />
+            <choice name="DOS" />
+            <choice name="MAC" />
+         </choices>
          <default>CodeGenerationPolicy::UNIX</default>
        </entry>
        <entry name="modnamePolicy" type="Enum">
          <label>Modifier Name Policy</label>
          <whatsthis>Modifier Name Policy</whatsthis>
-         <choices name="CodeGenerationPolicy::ModifyNamePolicy"></choices>
+         <choices name="CodeGenerationPolicy::ModifyNamePolicy">
+            <choice name="No" />
+            <choice name="Underscore" />
+            <choice name="Capitalise" />
+          </choices>
          <default>CodeGenerationPolicy::Capitalise</default>
        </entry>
        <entry name="outputDirectory" type="Path">
@@ -344,7 +417,12 @@
        <entry name="overwritePolicy" type="Enum">
          <label>Overwrite Policy</label>
          <whatsthis>The policy to be followed when there are name conflicts</whatsthis>
-         <choices name="CodeGenerationPolicy::OverwritePolicy"></choices>
+         <choices name="CodeGenerationPolicy::OverwritePolicy">
+            <choice name="Ok" />
+            <choice name="Ask" />
+            <choice name="Never" />
+            <choice name="Cancel" />
+         </choices>
          <default>CodeGenerationPolicy::Ask</default>
        </entry>
     </group>
--- branches/work/soc-umbrello/umbrello/umllistview.cpp #1278236:1278237
@@ -325,7 +325,10 @@
     }
     else {
         const int k = ke->key();
-        if (k == Qt::Key_Delete || k == Qt::Key_Backspace) {
+        if (k == Qt::Key_F2) {
+            // disable qt default key for item rename, it does not work yet
+            ke->accept();
+        } else if (k == Qt::Key_Delete || k == Qt::Key_Backspace) {
             // delete every selected item
             UMLListViewItemList itemsSelected = selectedItemsRoot();
             foreach(UMLListViewItem *item, itemsSelected) {
@@ -2256,7 +2259,8 @@
         } else {
             name = Model_Utils::uniqObjectName(ot, parentPkg);
         }
-        newItem = new UMLListViewItem(parentItem, name, type, (UMLObject*)parentPkg);
+        newItem = new UMLListViewItem(parentItem, name, type, (UMLObject *)0);
+        createItem(newItem, type);
     }
     m_bIgnoreCancelRename = false;
     newItem->setIcon(icon);
@@ -2306,7 +2310,11 @@
             return false;
         }
     }
+    return createItem(renamedItem, type);
+}
 
+bool UMLListView::createItem(UMLListViewItem *item, UMLListViewItem::ListViewType type)
+{
     switch (type) {
     case UMLListViewItem::lvt_Actor:
     case UMLListViewItem::lvt_Class:
@@ -2331,7 +2339,7 @@
             uError() << "internal error";
             return false;
         }
-        UMLObject *o = createUMLObject(renamedItem, ot);
+        UMLObject *o = createUMLObject(item, ot);
         if (type == UMLListViewItem::lvt_Subsystem)
             o->setStereotype("subsystem");
         else if (Model_Utils::typeIsFolder(type))
@@ -2348,13 +2356,13 @@
     case UMLListViewItem::lvt_ForeignKeyConstraint:
     case UMLListViewItem::lvt_CheckConstraint:
 
-        return createChildUMLObject(renamedItem, Model_Utils::convert_LVT_OT(type));
+        return createChildUMLObject(item, Model_Utils::convert_LVT_OT(type));
         break;
 
     case UMLListViewItem::lvt_PrimaryKeyConstraint: {
 
-        bool result = createChildUMLObject(renamedItem, Model_Utils::convert_LVT_OT(type));
-        UMLObject* obj = renamedItem->umlObject();
+        bool result = createChildUMLObject(item, Model_Utils::convert_LVT_OT(type));
+        UMLObject* obj = item->umlObject();
         UMLUniqueConstraint* uuc = static_cast<UMLUniqueConstraint*>(obj);
         UMLEntity* ent = static_cast<UMLEntity*>(uuc->parent());
         if (ent)
@@ -2365,39 +2373,39 @@
     break;
 
     case UMLListViewItem::lvt_Class_Diagram:
-        createDiagram(renamedItem, Uml::DiagramType::Class);
+        createDiagram(item, Uml::DiagramType::Class);
         break;
 
     case UMLListViewItem::lvt_UseCase_Diagram:
-        createDiagram(renamedItem, Uml::DiagramType::UseCase);
+        createDiagram(item, Uml::DiagramType::UseCase);
         break;
 
     case UMLListViewItem::lvt_Sequence_Diagram:
-        createDiagram(renamedItem, Uml::DiagramType::Sequence);
+        createDiagram(item, Uml::DiagramType::Sequence);
         break;
 
     case UMLListViewItem::lvt_Collaboration_Diagram:
-        createDiagram(renamedItem, Uml::DiagramType::Collaboration);
+        createDiagram(item, Uml::DiagramType::Collaboration);
         break;
 
     case UMLListViewItem::lvt_State_Diagram:
-        createDiagram(renamedItem, Uml::DiagramType::State);
+        createDiagram(item, Uml::DiagramType::State);
         break;
 
     case UMLListViewItem::lvt_Activity_Diagram:
-        createDiagram(renamedItem, Uml::DiagramType::Activity);
+        createDiagram(item, Uml::DiagramType::Activity);
         break;
 
     case UMLListViewItem::lvt_Component_Diagram:
-        createDiagram(renamedItem, Uml::DiagramType::Component);
+        createDiagram(item, Uml::DiagramType::Component);
         break;
 
     case UMLListViewItem::lvt_Deployment_Diagram:
-        createDiagram(renamedItem, Uml::DiagramType::Deployment);
+        createDiagram(item, Uml::DiagramType::Deployment);
         break;
 
     case UMLListViewItem::lvt_EntityRelationship_Diagram:
-        createDiagram(renamedItem, Uml::DiagramType::EntityRelationship);
+        createDiagram(item, Uml::DiagramType::EntityRelationship);
         break;
 
     default:
--- branches/work/soc-umbrello/umbrello/umllistview.h #1278236:1278237
@@ -73,6 +73,7 @@
 
     UMLListViewItem* createItem(UMLListViewItem& Data, IDChangeLog& IDChanges,
                                 UMLListViewItem* parent = 0);
+    bool createItem(UMLListViewItem *item, UMLListViewItem::ListViewType type);
 
     UMLListViewItem* findFolderForDiagram(Uml::DiagramType dt);
 




More information about the umbrello-devel mailing list