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

Ralf Habacker ralf.habacker at gmail.com
Fri Jun 15 20:23:23 UTC 2012


SVN commit 1300950 by habacker:

Added show export layout config attribute.

 M  +3 -1      dialogs/autolayoutoptionpage.cpp  
 M  +35 -14    dialogs/autolayoutoptionpage.ui  
 M  +2 -0      listpopupmenu.cpp  
 M  +1 -0      optionstate.h  
 M  +17 -10    umbrello.kcfg  
 M  +2 -0      uml.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/autolayoutoptionpage.cpp #1300949:1300950
@@ -37,6 +37,7 @@
     setupUi(this);
     m_autoDotPath->setChecked( Settings::optionState().autoLayoutState.autoDotPath );
     m_dotPath->setText( Settings::optionState().autoLayoutState.dotPath );
+    m_showExportLayout->setChecked( Settings::optionState().autoLayoutState.showExportLayout );
     connect( m_autoDotPath, SIGNAL(toggled(bool)), this, SLOT(slotAutoDotPathCBClicked(bool)) );
 
     if (Settings::optionState().autoLayoutState.autoDotPath) {
@@ -58,6 +59,7 @@
 void AutoLayoutOptionPage::setDefaults()
 {
     m_autoDotPath->setChecked(true);
+    m_showExportLayout->setChecked(false);
 }
 
 /**
@@ -66,9 +68,9 @@
  */
 void AutoLayoutOptionPage::apply()
 {
-    // FIXME use autoLayoutState
     Settings::optionState().autoLayoutState.autoDotPath = m_autoDotPath->isChecked();
     Settings::optionState().autoLayoutState.dotPath = m_autoDotPath->isChecked() ? "" : m_dotPath->text();
+    Settings::optionState().autoLayoutState.showExportLayout = m_showExportLayout->isChecked();
     emit applyClicked();
 }
 
--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/autolayoutoptionpage.ui #1300949:1300950
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>523</width>
-    <height>192</height>
+    <width>539</width>
+    <height>270</height>
    </rect>
   </property>
   <layout class="QVBoxLayout">
@@ -28,7 +28,7 @@
 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Umbrello has build in support for detecting the install location of these layout generators. For cases where this dependency is not available or do not fit, a different installation path could be provided.   </p></body></html></string>
         </property>
         <property name="text">
-         <string>auto detect layout generator</string>
+         <string>Auto detect layout generator</string>
         </property>
         <property name="checked">
          <bool>true</bool>
@@ -61,40 +61,61 @@
         </property>
        </widget>
       </item>
-      <item row="4" column="0">
-       <spacer name="verticalSpacer">
+      <item row="1" column="0">
+       <spacer name="verticalSpacer_2">
         <property name="orientation">
          <enum>Qt::Vertical</enum>
         </property>
+        <property name="sizeType">
+         <enum>QSizePolicy::Fixed</enum>
+        </property>
         <property name="sizeHint" stdset="0">
          <size>
           <width>20</width>
-          <height>40</height>
+          <height>20</height>
          </size>
         </property>
        </spacer>
       </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="Other">
+     <property name="title">
+      <string>Miscellaneous</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_2">
       <item row="1" column="0">
-       <spacer name="verticalSpacer_2">
+       <widget class="QCheckBox" name="m_showExportLayout">
+        <property name="toolTip">
+         <string>Dot file export is perfomed by using the export layout. 
+
+With this option checked, the export layout is added to the list of available diagram layouts and enables a quick dot export preview.</string>
+        </property>
+        <property name="text">
+         <string>Show export layout in diagram context menu</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <spacer name="verticalSpacer">
         <property name="orientation">
          <enum>Qt::Vertical</enum>
         </property>
-        <property name="sizeType">
-         <enum>QSizePolicy::Fixed</enum>
-        </property>
         <property name="sizeHint" stdset="0">
          <size>
           <width>20</width>
-          <height>20</height>
+       <height>40</height>
          </size>
         </property>
        </spacer>
       </item>
      </layout>
     </widget>
-   </item>
-  </layout>
- </widget>
  <customwidgets>
   <customwidget>
    <class>KUrlRequester</class>
--- trunk/KDE/kdesdk/umbrello/umbrello/listpopupmenu.cpp #1300949:1300950
@@ -1749,6 +1749,8 @@
             foreach(const QString &key, configFiles.keys()) {
                 if (i >= types.size())
                     break;
+                if (key == "export" && !Settings::optionState().autoLayoutState.showExportLayout )
+                    continue;
                 insert(types[i], QPixmap(), i18n("apply '%1'",configFiles[key]));
                 getAction(types[i])->setData(QVariant(key));
                 i++;
--- trunk/KDE/kdesdk/umbrello/umbrello/optionstate.h #1300949:1300950
@@ -134,6 +134,7 @@
 struct AutoLayoutState {
     bool autoDotPath;  ///< determine path to dot executable automatically
     QString dotPath;  ///< path to dot executable
+    bool showExportLayout;  ///< flag for display export layout
 };
 
 struct OptionState {
--- trunk/KDE/kdesdk/umbrello/umbrello/umbrello.kcfg #1300949:1300950
@@ -44,16 +44,6 @@
          <whatsthis>Enables/Disables Support for footer printing</whatsthis>
          <default>true</default>
        </entry>
-      <entry name="autoDotPath" type="bool">
-        <label>Automatic Dot Path</label>
-        <whatsthis>determine automatically the path of dot executable</whatsthis>
-        <default>true</default>
-      </entry>
-      <entry name="dotPath" type="String">
-         <label>Dot Path</label>
-         <whatsthis>set path to dot executable (optional)</whatsthis>
-         <default></default>
-       </entry>
        <entry name="autosave" type="Bool">
          <label>Auto Save</label>
          <whatsthis>Enables/Disables Auto Saving at Regular Intervals</whatsthis>
@@ -549,5 +539,22 @@
           <default>true</default>
        </entry>
     </group>    
+    <group name="Auto Layout">
+        <entry name="autoDotPath" type="bool">
+            <label>Automatic Dot Path</label>
+            <whatsthis>determine automatically the path of dot executable</whatsthis>
+            <default>true</default>
+        </entry>
+        <entry name="dotPath" type="String">
+            <label>Dot Path</label>
+            <whatsthis>set path to dot executable (optional)</whatsthis>
+            <default></default>
+        </entry>
+        <entry name="showExportLayout" type="bool">
+            <label>Show Export Layout</label>
+            <whatsthis>show export layout</whatsthis>
+            <default>false</default>
+        </entry>
+    </group>
 </kcfg>
 
--- trunk/KDE/kdesdk/umbrello/umbrello/uml.cpp #1300949:1300950
@@ -894,6 +894,7 @@
     UmbrelloSettings::setFooterPrinting( optionState.generalState.footerPrinting );
     UmbrelloSettings::setAutoDotPath( optionState.autoLayoutState.autoDotPath );
     UmbrelloSettings::setDotPath( optionState.autoLayoutState.dotPath );
+    UmbrelloSettings::setShowExportLayout( optionState.autoLayoutState.showExportLayout );
     UmbrelloSettings::setAutosave( optionState.generalState.autosave );
     UmbrelloSettings::setTime(  optionState.generalState.time );
     UmbrelloSettings::setAutosavetime( optionState.generalState.autosavetime );
@@ -1929,6 +1930,7 @@
     optionState.generalState.footerPrinting =  UmbrelloSettings::footerPrinting();
     optionState.autoLayoutState.autoDotPath =  UmbrelloSettings::autoDotPath();
     optionState.autoLayoutState.dotPath =  UmbrelloSettings::dotPath();
+    optionState.autoLayoutState.showExportLayout =  UmbrelloSettings::showExportLayout();
     optionState.generalState.autosave =  UmbrelloSettings::autosave();
     optionState.generalState.time =  UmbrelloSettings::time(); //old autosavetime value kept for compatibility
     optionState.generalState.autosavetime =  UmbrelloSettings::autosavetime();




More information about the umbrello-devel mailing list