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

Andi Fischer andi.fischer at hispeed.ch
Tue Jul 8 16:08:47 UTC 2008


SVN commit 829488 by fischer:

Fixes the addWidget of the combobox to the right layout.

 M  +13 -11    exportallviewsdialog.cpp  
 M  +3 -4      exportallviewsdialog.h  
 M  +48 -55    exportallviewsdialogbase.ui  


--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/exportallviewsdialog.cpp #829487:829488
@@ -1,5 +1,4 @@
 /***************************************************************************
- *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
  *   the Free Software Foundation; either version 2 of the License, or     *
@@ -12,16 +11,16 @@
 // own header
 #include "exportallviewsdialog.h"
 
-// include files for Qt
-#include <QLayout>
-#include <QLabel>
+// qt include files
+#include <QtGui/QLayout>
+#include <QtGui/QLabel>
 
 // kde include files
 #include <kfilefiltercombo.h>
 #include <klocale.h>
 
 // application specific includes
-#include "../umlviewimageexportermodel.h"
+#include "umlviewimageexportermodel.h"
 
 ExportAllViewsDialog::ExportAllViewsDialog(
         QWidget* parent /* = 0 */,
@@ -29,8 +28,8 @@
         bool modal /* = false */,
         Qt::WindowFlags fl /* = 0*/,
         const QString& defaultMimeType /*= "image/png"*/)
-  : QDialog(parent,fl) {
-
+  : QDialog(parent,fl)
+{
     setObjectName(name);
     setModal(modal);
     setupUi(this);
@@ -46,19 +45,22 @@
 
     m_imageType->setMimeFilter(UMLViewImageExporterModel::supportedMimeTypes(), defaultMimeType);
 
-/// GC: @todo verify if it should be ported to KDE4 or just removed
-//     imageTypeLayout->addWidget(m_imageType);
+    // Cannot give an object name to the layout when using QtDesigner,
+    // therefore go and use an editor and add it by hand.
+    ui_imageTypeLayout->addWidget(m_imageType);
 
-    imageTypeLabel->setBuddy(m_imageType);
+    ui_imageTypeLabel->setBuddy(m_imageType);
 
     // reload the strings so the m_imageType tooltip is added
     languageChange();
 }
 
-void ExportAllViewsDialog::languageChange() {
+void ExportAllViewsDialog::languageChange()
+{
     //ExportAllViewsDialogBase::languageChange();
     m_imageType->setToolTip(i18n("The format that the images will be exported to"));
 }
 
+
 #include "exportallviewsdialog.moc"
 
--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/exportallviewsdialog.h #829487:829488
@@ -1,14 +1,12 @@
 /***************************************************************************
- *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
  *   the Free Software Foundation; either version 2 of the License, or     *
  *   (at your option) any later version.                                   *
  *                                                                         *
- *   copyright (C) 2006-2007                                               *
+ *   copyright (C) 2006-2008                                               *
  *   Umbrello UML Modeller Authors <uml-devel at uml.sf.net>                  *
  ***************************************************************************/
-
 #ifndef EXPORTALLVIEWSDIALOG_H
 #define EXPORTALLVIEWSDIALOG_H
 
@@ -26,7 +24,8 @@
  * The KFileFilterCombo is declared here instead of in the .ui file because QT
  * Designer and uic don't recognize it.
  */
-class ExportAllViewsDialog : public QDialog,private Ui::ExportAllViewsDialogBase {
+class ExportAllViewsDialog : public QDialog, private Ui::ExportAllViewsDialogBase
+{
   Q_OBJECT
 
 public:
--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/exportallviewsdialogbase.ui #829487:829488
@@ -18,74 +18,67 @@
   <layout class="QVBoxLayout" >
    <item>
     <layout class="QVBoxLayout" >
-     <property name="spacing" >
-      <number>15</number>
-     </property>
      <item>
-      <layout class="QVBoxLayout" >
-       <item>
-        <widget class="QLabel" name="kURLRequesterLabel" >
-         <property name="toolTip" >
-          <string>The base directory used to save the images</string>
-         </property>
-         <property name="text" >
-          <string>&Directory to save the diagrams in:</string>
-         </property>
-         <property name="wordWrap" >
-          <bool>false</bool>
-         </property>
-         <property name="buddy" >
-          <cstring>m_kURL</cstring>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="KUrlRequester" name="m_kURL" >
-         <property name="toolTip" >
-          <string>The base directory used to save the images</string>
-         </property>
-        </widget>
-       </item>
-      </layout>
+      <widget class="QLabel" name="kURLRequesterLabel" >
+       <property name="toolTip" >
+        <string>The base directory used to save the images</string>
+       </property>
+       <property name="text" >
+        <string>&Directory to save the diagrams in:</string>
+       </property>
+       <property name="wordWrap" >
+        <bool>false</bool>
+       </property>
+       <property name="buddy" >
+        <cstring>m_kURL</cstring>
+       </property>
+      </widget>
      </item>
      <item>
-      <layout class="QVBoxLayout" >
-       <item>
-        <widget class="QLabel" name="imageTypeLabel" >
-         <property name="toolTip" >
-          <string>The format that the images will be exported to</string>
-         </property>
-         <property name="text" >
-          <string>&Image type:</string>
-         </property>
-         <property name="wordWrap" >
-          <bool>false</bool>
-         </property>
-         <property name="buddy" >
-          <cstring>m_imageType</cstring>
-         </property>
-        </widget>
-       </item>
-      </layout>
+      <widget class="KUrlRequester" name="m_kURL" >
+       <property name="toolTip" >
+        <string>The base directory used to save the images</string>
+       </property>
+      </widget>
      </item>
+    </layout>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" name="ui_imageTypeLayout">
      <item>
-      <widget class="QCheckBox" name="m_useFolders" >
+      <widget class="QLabel" name="ui_imageTypeLabel" >
        <property name="toolTip" >
-        <string>Create in the target directory the same tree structure used
-in the document to store the views</string>
+        <string>The format that the images will be exported to</string>
        </property>
-       <property name="whatsThis" >
-        <string>The views are stored in folders in the document. The same tree structure used in the document to store the views can be created in the selected base directory with this option.
-Only the folders made by the user are created in the base directory (Logical view, use case view and so on are not created).</string>
-       </property>
        <property name="text" >
-        <string>Use &folders</string>
+        <string>&Image type:</string>
        </property>
+       <property name="wordWrap" >
+        <bool>false</bool>
+       </property>
+       <property name="buddy" >
+        <cstring>m_imageType</cstring>
+       </property>
       </widget>
      </item>
     </layout>
    </item>
    <item>
+    <widget class="QCheckBox" name="m_useFolders" >
+     <property name="toolTip" >
+      <string>Create in the target directory the same tree structure used
+in the document to store the views</string>
+     </property>
+     <property name="whatsThis" >
+      <string>The views are stored in folders in the document. The same tree structure used in the document to store the views can be created in the selected base directory with this option.
+Only the folders made by the user are created in the base directory (Logical view, use case view and so on are not created).</string>
+     </property>
+     <property name="text" >
+      <string>Use &folders</string>
+     </property>
+    </widget>
+   </item>
+   <item>
     <spacer>
      <property name="orientation" >
       <enum>Qt::Vertical</enum>
@@ -96,7 +89,7 @@
      <property name="sizeHint" >
       <size>
        <width>20</width>
-       <height>16</height>
+       <height>10</height>
       </size>
      </property>
     </spacer>




More information about the umbrello-devel mailing list