r17017 by fschmid - Fixed Bug 1348: "Dockable dialogs" for all dialogs for which it makes sense.

scribus-commit scribus-commit at lists.scribus.net
Thu Nov 24 10:12:10 UTC 2011


Author: fschmid
Date: Thu Nov 24 10:12:10 2011
New Revision: 17017

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17017
Log:
Fixed Bug 1348: "Dockable dialogs" for all dialogs for which it makes sense.

Modified:
    trunk/Scribus/scribus/ui/aligndistribute.cpp
    trunk/Scribus/scribus/ui/aligndistribute.h
    trunk/Scribus/scribus/ui/aligndistribute.ui
    trunk/Scribus/scribus/ui/bookmarkpalette.cpp
    trunk/Scribus/scribus/ui/bookmarkpalette.h
    trunk/Scribus/scribus/ui/layers.cpp
    trunk/Scribus/scribus/ui/layers.h

Modified: trunk/Scribus/scribus/ui/aligndistribute.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17017&path=/trunk/Scribus/scribus/ui/aligndistribute.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/aligndistribute.cpp (original)
+++ trunk/Scribus/scribus/ui/aligndistribute.cpp Thu Nov 24 10:12:10 2011
@@ -50,10 +50,12 @@
 //TODO Distribute with 
 
 AlignDistributePalette::AlignDistributePalette( QWidget* parent, const char* name, bool /*modal*/, Qt::WFlags /*fl*/ )
-	: ScrPaletteBase( parent, name )
+	: ScDockPalette( parent, name, 0 )
 {
 	setupUi(this);
+	setSizePolicy( QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));
 	currDoc=NULL;
+	setObjectName(name);
 	
 	//hide spare controls 
 	toolButtonDummy1->hide();
@@ -84,7 +86,7 @@
 		languageChange();
 	}
 	else
-		QWidget::changeEvent(e);
+		ScDockPalette::changeEvent(e);
 }
 
 void AlignDistributePalette::languageChange()

Modified: trunk/Scribus/scribus/ui/aligndistribute.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17017&path=/trunk/Scribus/scribus/ui/aligndistribute.h
==============================================================================
--- trunk/Scribus/scribus/ui/aligndistribute.h (original)
+++ trunk/Scribus/scribus/ui/aligndistribute.h Thu Nov 24 10:12:10 2011
@@ -34,7 +34,7 @@
 
 #include "scribusapi.h"
 #include "scribusview.h"
-#include "ui/scrpalettebase.h"
+#include "ui/scdockpalette.h"
 
 class QSpacerItem;
 class QLabel;
@@ -51,7 +51,7 @@
 
 /*! \brief Align/Distribute palette.
 */
-class SCRIBUS_API AlignDistributePalette : public ScrPaletteBase, Ui::AlignDistribute
+class SCRIBUS_API AlignDistributePalette : public ScDockPalette, Ui::AlignDistribute
 {
 	Q_OBJECT
 

Modified: trunk/Scribus/scribus/ui/aligndistribute.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17017&path=/trunk/Scribus/scribus/ui/aligndistribute.ui
==============================================================================
--- trunk/Scribus/scribus/ui/aligndistribute.ui (original)
+++ trunk/Scribus/scribus/ui/aligndistribute.ui Thu Nov 24 10:12:10 2011
@@ -1,625 +1,614 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <ui version="4.0">
  <class>AlignDistribute</class>
- <widget class="ScrPaletteBase" name="AlignDistribute">
-  <property name="enabled">
-   <bool>true</bool>
-  </property>
+ <widget class="ScDockPalette" name="AlignDistribute">
   <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
     <width>253</width>
-    <height>272</height>
+    <height>281</height>
    </rect>
   </property>
-  <property name="minimumSize">
-   <size>
-    <width>0</width>
-    <height>0</height>
-   </size>
+  <property name="windowTitle">
+   <string>DockWidget</string>
   </property>
-  <layout class="QVBoxLayout">
-   <property name="spacing">
-    <number>5</number>
-   </property>
-   <property name="margin">
-    <number>6</number>
-   </property>
-   <item>
-    <widget class="QTabWidget" name="tabWidget">
-     <property name="currentIndex">
-      <number>0</number>
-     </property>
-     <widget class="QWidget" name="tabAlign">
-      <attribute name="title">
-       <string>Align</string>
-      </attribute>
-      <layout class="QVBoxLayout">
-       <property name="margin">
-        <number>0</number>
-       </property>
-       <item>
-        <layout class="QHBoxLayout">
-         <item>
-          <spacer>
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeType">
-            <enum>QSizePolicy::Expanding</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>40</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-         <item>
-          <layout class="QGridLayout">
-           <item row="1" column="0">
-            <widget class="QLabel" name="alignGuideLabel">
-             <property name="text">
-              <string>&Selected Guide:</string>
-             </property>
-             <property name="wordWrap">
-              <bool>false</bool>
-             </property>
-             <property name="buddy">
-              <cstring>alignGuideLineEdit</cstring>
-             </property>
-            </widget>
-           </item>
-           <item row="0" column="0">
-            <widget class="QLabel" name="alignRelativeToLabel">
-             <property name="text">
-              <string>&Relative To:</string>
-             </property>
-             <property name="wordWrap">
-              <bool>false</bool>
-             </property>
-             <property name="buddy">
-              <cstring>alignRelativeToCombo</cstring>
-             </property>
-            </widget>
-           </item>
-           <item row="1" column="1">
-            <widget class="QLineEdit" name="alignGuideLineEdit"/>
-           </item>
-           <item row="0" column="1">
-            <widget class="QComboBox" name="alignRelativeToCombo"/>
-           </item>
-           <item row="2" column="0">
-            <widget class="QLabel" name="alignMoveOrResizeLabel">
-             <property name="text">
-              <string>&Align Sides By:</string>
-             </property>
-             <property name="wordWrap">
-              <bool>false</bool>
-             </property>
-             <property name="buddy">
-              <cstring>alignMoveOrResizeCombo</cstring>
-             </property>
-            </widget>
-           </item>
-           <item row="2" column="1">
-            <widget class="QComboBox" name="alignMoveOrResizeCombo"/>
-           </item>
-          </layout>
-         </item>
-         <item>
-          <spacer>
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeType">
-            <enum>QSizePolicy::Expanding</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>40</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-        </layout>
-       </item>
-       <item>
-        <layout class="QHBoxLayout">
-         <item>
-          <spacer>
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeType">
-            <enum>QSizePolicy::Expanding</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>40</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-         <item>
-          <layout class="QGridLayout">
-           <item row="1" column="3">
-            <widget class="QToolButton" name="alignBottomInToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="1" column="1">
-            <widget class="QToolButton" name="alignTopInToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="0" column="1">
-            <widget class="QToolButton" name="alignLeftInToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="0" column="3">
-            <widget class="QToolButton" name="alignRightInToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="1" column="4">
-            <widget class="QToolButton" name="alignBottomOutToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="1" column="0">
-            <widget class="QToolButton" name="alignTopOutToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="1" column="2">
-            <widget class="QToolButton" name="alignCenterVerToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="0" column="0">
-            <widget class="QToolButton" name="alignLeftOutToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="0" column="4">
-            <widget class="QToolButton" name="alignRightOutToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="0" column="2">
-            <widget class="QToolButton" name="alignCenterHorToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-          </layout>
-         </item>
-         <item>
-          <spacer>
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeType">
-            <enum>QSizePolicy::Expanding</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>40</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-        </layout>
-       </item>
-       <item>
-        <spacer>
-         <property name="orientation">
-          <enum>Qt::Vertical</enum>
-         </property>
-         <property name="sizeType">
-          <enum>QSizePolicy::Expanding</enum>
-         </property>
-         <property name="sizeHint" stdset="0">
-          <size>
-           <width>20</width>
-           <height>0</height>
-          </size>
-         </property>
-        </spacer>
-       </item>
-      </layout>
+  <widget class="QWidget" name="dockWidgetContents">
+   <layout class="QVBoxLayout" name="verticalLayout_3">
+    <item>
+     <widget class="QTabWidget" name="tabWidget">
+      <property name="currentIndex">
+       <number>0</number>
+      </property>
+      <widget class="QWidget" name="tabAlign">
+       <attribute name="title">
+        <string>Align</string>
+       </attribute>
+       <layout class="QVBoxLayout">
+        <property name="margin">
+         <number>0</number>
+        </property>
+        <item>
+         <layout class="QHBoxLayout" name="_2">
+          <item>
+           <spacer>
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType">
+             <enum>QSizePolicy::Expanding</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>40</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+          <item>
+           <layout class="QGridLayout" name="_3">
+            <item row="1" column="0">
+             <widget class="QLabel" name="alignGuideLabel">
+              <property name="text">
+               <string>&Selected Guide:</string>
+              </property>
+              <property name="wordWrap">
+               <bool>false</bool>
+              </property>
+              <property name="buddy">
+               <cstring>alignGuideLineEdit</cstring>
+              </property>
+             </widget>
+            </item>
+            <item row="0" column="0">
+             <widget class="QLabel" name="alignRelativeToLabel">
+              <property name="text">
+               <string>&Relative To:</string>
+              </property>
+              <property name="wordWrap">
+               <bool>false</bool>
+              </property>
+              <property name="buddy">
+               <cstring>alignRelativeToCombo</cstring>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="1">
+             <widget class="QLineEdit" name="alignGuideLineEdit"/>
+            </item>
+            <item row="0" column="1">
+             <widget class="QComboBox" name="alignRelativeToCombo"/>
+            </item>
+            <item row="2" column="0">
+             <widget class="QLabel" name="alignMoveOrResizeLabel">
+              <property name="text">
+               <string>&Align Sides By:</string>
+              </property>
+              <property name="wordWrap">
+               <bool>false</bool>
+              </property>
+              <property name="buddy">
+               <cstring>alignMoveOrResizeCombo</cstring>
+              </property>
+             </widget>
+            </item>
+            <item row="2" column="1">
+             <widget class="QComboBox" name="alignMoveOrResizeCombo"/>
+            </item>
+           </layout>
+          </item>
+          <item>
+           <spacer>
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType">
+             <enum>QSizePolicy::Expanding</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>40</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+         </layout>
+        </item>
+        <item>
+         <layout class="QHBoxLayout" name="_4">
+          <item>
+           <spacer>
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType">
+             <enum>QSizePolicy::Expanding</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>40</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+          <item>
+           <layout class="QGridLayout" name="_5">
+            <item row="1" column="3">
+             <widget class="QToolButton" name="alignBottomInToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="1">
+             <widget class="QToolButton" name="alignTopInToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="0" column="1">
+             <widget class="QToolButton" name="alignLeftInToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="0" column="3">
+             <widget class="QToolButton" name="alignRightInToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="4">
+             <widget class="QToolButton" name="alignBottomOutToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="0">
+             <widget class="QToolButton" name="alignTopOutToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="2">
+             <widget class="QToolButton" name="alignCenterVerToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="0" column="0">
+             <widget class="QToolButton" name="alignLeftOutToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="0" column="4">
+             <widget class="QToolButton" name="alignRightOutToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="0" column="2">
+             <widget class="QToolButton" name="alignCenterHorToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </item>
+          <item>
+           <spacer>
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType">
+             <enum>QSizePolicy::Expanding</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>40</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+         </layout>
+        </item>
+        <item>
+         <spacer>
+          <property name="orientation">
+           <enum>Qt::Vertical</enum>
+          </property>
+          <property name="sizeType">
+           <enum>QSizePolicy::Expanding</enum>
+          </property>
+          <property name="sizeHint" stdset="0">
+           <size>
+            <width>20</width>
+            <height>0</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+       </layout>
+      </widget>
+      <widget class="QWidget" name="tabDistribute">
+       <attribute name="title">
+        <string>Distribute</string>
+       </attribute>
+       <layout class="QVBoxLayout" name="verticalLayout_2">
+        <item>
+         <layout class="QHBoxLayout" name="_6">
+          <item>
+           <spacer>
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType">
+             <enum>QSizePolicy::Expanding</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>63</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+          <item>
+           <layout class="QGridLayout" name="_7">
+            <item row="0" column="3">
+             <widget class="QToolButton" name="distributeDistHToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="2">
+             <widget class="QToolButton" name="distributeTopToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="1">
+             <widget class="QToolButton" name="distributeCenterVToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="0" column="2">
+             <widget class="QToolButton" name="distributeRightToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="3" column="0">
+             <widget class="QToolButton" name="toolButtonDummy1">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="2" column="2">
+             <widget class="QToolButton" name="distributeAcrossMarginsToolButton">
+              <property name="enabled">
+               <bool>true</bool>
+              </property>
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="0" column="0">
+             <widget class="QToolButton" name="distributeLeftToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="2" column="0">
+             <widget class="QToolButton" name="distributeAcrossPageToolButton">
+              <property name="enabled">
+               <bool>true</bool>
+              </property>
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="3" column="1">
+             <widget class="QToolButton" name="distributeDistValueHToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="2" column="3">
+             <widget class="QToolButton" name="distributeDownMarginsToolButton">
+              <property name="enabled">
+               <bool>true</bool>
+              </property>
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="0" column="1">
+             <widget class="QToolButton" name="distributeCenterHToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="3" column="3">
+             <widget class="QToolButton" name="toolButtonDummy2">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="2" column="1">
+             <widget class="QToolButton" name="distributeDownPageToolButton">
+              <property name="enabled">
+               <bool>true</bool>
+              </property>
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="3" column="2">
+             <widget class="QToolButton" name="distributeDistValueVToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="3">
+             <widget class="QToolButton" name="distributeDistVToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="0">
+             <widget class="QToolButton" name="distributeBottomToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </item>
+          <item>
+           <spacer>
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType">
+             <enum>QSizePolicy::Expanding</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>62</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+         </layout>
+        </item>
+        <item>
+         <layout class="QHBoxLayout" name="_8">
+          <item>
+           <spacer>
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType">
+             <enum>QSizePolicy::Expanding</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>40</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+          <item>
+           <layout class="QHBoxLayout" name="_9">
+            <item>
+             <widget class="QLabel" name="distributeDistLabel">
+              <property name="text">
+               <string>&Distance:</string>
+              </property>
+              <property name="wordWrap">
+               <bool>false</bool>
+              </property>
+              <property name="indent">
+               <number>-1</number>
+              </property>
+              <property name="buddy">
+               <cstring>distributeDistSpinBox</cstring>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="ScrSpinBox" name="distributeDistSpinBox">
+              <property name="minimumSize">
+               <size>
+                <width>50</width>
+                <height>24</height>
+               </size>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </item>
+          <item>
+           <spacer>
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType">
+             <enum>QSizePolicy::Expanding</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>40</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+         </layout>
+        </item>
+        <item>
+         <layout class="QHBoxLayout" name="horizontalLayout_2">
+          <item>
+           <spacer name="spacer">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType">
+             <enum>QSizePolicy::Expanding</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>40</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+          <item>
+           <widget class="QCheckBox" name="reverseDistributionCheckBox">
+            <property name="text">
+             <string>Reverse Distribution</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <spacer name="spacer_2">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType">
+             <enum>QSizePolicy::Expanding</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>40</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+         </layout>
+        </item>
+        <item>
+         <spacer>
+          <property name="orientation">
+           <enum>Qt::Vertical</enum>
+          </property>
+          <property name="sizeType">
+           <enum>QSizePolicy::Expanding</enum>
+          </property>
+          <property name="sizeHint" stdset="0">
+           <size>
+            <width>20</width>
+            <height>0</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+       </layout>
+      </widget>
+      <widget class="QWidget" name="tabSwap">
+       <attribute name="title">
+        <string>Swap</string>
+       </attribute>
+       <layout class="QVBoxLayout" name="verticalLayout">
+        <item>
+         <layout class="QHBoxLayout" name="horizontalLayout">
+          <item>
+           <spacer name="horizontalSpacer">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>40</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+          <item>
+           <widget class="QToolButton" name="swapLeftToolButton">
+            <property name="text">
+             <string>...</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QToolButton" name="swapRightToolButton">
+            <property name="text">
+             <string>...</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <spacer name="horizontalSpacer_2">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>40</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+         </layout>
+        </item>
+        <item>
+         <spacer name="verticalSpacer">
+          <property name="orientation">
+           <enum>Qt::Vertical</enum>
+          </property>
+          <property name="sizeHint" stdset="0">
+           <size>
+            <width>20</width>
+            <height>0</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+       </layout>
+      </widget>
      </widget>
-     <widget class="QWidget" name="tabDistribute">
-      <attribute name="title">
-       <string>Distribute</string>
-      </attribute>
-      <layout class="QVBoxLayout" name="verticalLayout_2">
-       <item>
-        <layout class="QHBoxLayout">
-         <item>
-          <spacer>
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeType">
-            <enum>QSizePolicy::Expanding</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>63</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-         <item>
-          <layout class="QGridLayout">
-           <item row="0" column="3">
-            <widget class="QToolButton" name="distributeDistHToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="1" column="2">
-            <widget class="QToolButton" name="distributeTopToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="1" column="1">
-            <widget class="QToolButton" name="distributeCenterVToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="0" column="2">
-            <widget class="QToolButton" name="distributeRightToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="3" column="0">
-            <widget class="QToolButton" name="toolButtonDummy1">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="2" column="2">
-            <widget class="QToolButton" name="distributeAcrossMarginsToolButton">
-             <property name="enabled">
-              <bool>true</bool>
-             </property>
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="0" column="0">
-            <widget class="QToolButton" name="distributeLeftToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="2" column="0">
-            <widget class="QToolButton" name="distributeAcrossPageToolButton">
-             <property name="enabled">
-              <bool>true</bool>
-             </property>
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="3" column="1">
-            <widget class="QToolButton" name="distributeDistValueHToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="2" column="3">
-            <widget class="QToolButton" name="distributeDownMarginsToolButton">
-             <property name="enabled">
-              <bool>true</bool>
-             </property>
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="0" column="1">
-            <widget class="QToolButton" name="distributeCenterHToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="3" column="3">
-            <widget class="QToolButton" name="toolButtonDummy2">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="2" column="1">
-            <widget class="QToolButton" name="distributeDownPageToolButton">
-             <property name="enabled">
-              <bool>true</bool>
-             </property>
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="3" column="2">
-            <widget class="QToolButton" name="distributeDistValueVToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="1" column="3">
-            <widget class="QToolButton" name="distributeDistVToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="1" column="0">
-            <widget class="QToolButton" name="distributeBottomToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-          </layout>
-         </item>
-         <item>
-          <spacer>
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeType">
-            <enum>QSizePolicy::Expanding</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>62</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-        </layout>
-       </item>
-       <item>
-        <layout class="QHBoxLayout">
-         <item>
-          <spacer>
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeType">
-            <enum>QSizePolicy::Expanding</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>40</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-         <item>
-          <layout class="QHBoxLayout">
-           <item>
-            <widget class="QLabel" name="distributeDistLabel">
-             <property name="text">
-              <string>&Distance:</string>
-             </property>
-             <property name="wordWrap">
-              <bool>false</bool>
-             </property>
-             <property name="indent">
-              <number>-1</number>
-             </property>
-             <property name="buddy">
-              <cstring>distributeDistSpinBox</cstring>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="ScrSpinBox" name="distributeDistSpinBox">
-             <property name="minimumSize">
-              <size>
-               <width>50</width>
-               <height>24</height>
-              </size>
-             </property>
-            </widget>
-           </item>
-          </layout>
-         </item>
-         <item>
-          <spacer>
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeType">
-            <enum>QSizePolicy::Expanding</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>40</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-        </layout>
-       </item>
-       <item>
-        <layout class="QHBoxLayout" name="horizontalLayout_2">
-         <item>
-          <spacer name="spacer">
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeType">
-            <enum>QSizePolicy::Expanding</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>40</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-         <item>
-          <widget class="QCheckBox" name="reverseDistributionCheckBox">
-           <property name="text">
-            <string>Reverse Distribution</string>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <spacer name="spacer_2">
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeType">
-            <enum>QSizePolicy::Expanding</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>40</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-        </layout>
-       </item>
-       <item>
-        <spacer>
-         <property name="orientation">
-          <enum>Qt::Vertical</enum>
-         </property>
-         <property name="sizeType">
-          <enum>QSizePolicy::Expanding</enum>
-         </property>
-         <property name="sizeHint" stdset="0">
-          <size>
-           <width>20</width>
-           <height>0</height>
-          </size>
-         </property>
-        </spacer>
-       </item>
-      </layout>
-     </widget>
-     <widget class="QWidget" name="tabSwap">
-      <attribute name="title">
-       <string>Swap</string>
-      </attribute>
-      <layout class="QVBoxLayout" name="verticalLayout">
-       <item>
-        <layout class="QHBoxLayout" name="horizontalLayout">
-         <item>
-          <spacer name="horizontalSpacer">
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>40</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-         <item>
-          <widget class="QToolButton" name="swapLeftToolButton">
-           <property name="text">
-            <string>...</string>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <widget class="QToolButton" name="swapRightToolButton">
-           <property name="text">
-            <string>...</string>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <spacer name="horizontalSpacer_2">
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>40</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-        </layout>
-       </item>
-       <item>
-        <spacer name="verticalSpacer">
-         <property name="orientation">
-          <enum>Qt::Vertical</enum>
-         </property>
-         <property name="sizeHint" stdset="0">
-          <size>
-           <width>20</width>
-           <height>0</height>
-          </size>
-         </property>
-        </spacer>
-       </item>
-      </layout>
-     </widget>
-    </widget>
-   </item>
-  </layout>
+    </item>
+   </layout>
+  </widget>
  </widget>
- <layoutdefault spacing="6" margin="11"/>
  <customwidgets>
   <customwidget>
    <class>ScrSpinBox</class>
@@ -627,16 +616,15 @@
    <header>ui/scrspinbox.h</header>
   </customwidget>
   <customwidget>
-   <class>ScrPaletteBase</class>
-   <extends>QWidget</extends>
-   <header>ui/scrpalettebase.h</header>
+   <class>ScDockPalette</class>
+   <extends>QDockWidget</extends>
+   <header>ui/scdockpalette.h</header>
    <container>1</container>
   </customwidget>
  </customwidgets>
  <includes>
-  <include location="local">ui/scrpalettebase.h</include>
-  <include location="local">ui/scrpalettebase.h</include>
   <include location="local">ui/scrspinbox.h</include>
+  <include location="local">ui/scdockpalette.h</include>
  </includes>
  <resources/>
  <connections/>

Modified: trunk/Scribus/scribus/ui/bookmarkpalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17017&path=/trunk/Scribus/scribus/ui/bookmarkpalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/bookmarkpalette.cpp (original)
+++ trunk/Scribus/scribus/ui/bookmarkpalette.cpp Thu Nov 24 10:12:10 2011
@@ -25,25 +25,22 @@
 
 #include "bookmarkpalette.h"
 
-BookPalette::BookPalette(QWidget* parent) : ScrPaletteBase( parent, "Books", false, 0 )
+BookPalette::BookPalette(QWidget* parent) : ScDockPalette( parent, "Books", 0 )
 {
-	PaletteLayout = new QVBoxLayout( this );
-	PaletteLayout->setMargin(0);
-	PaletteLayout->setSpacing(0);
+	setObjectName(QString::fromLocal8Bit("Books"));
+	setSizePolicy( QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));
 	BView = new BookMView(this);
 	BView->setMinimumSize(QSize(100,150));
-	PaletteLayout->addWidget( BView );
+	setWidget( BView );
 	languageChange();
 }
 
 void BookPalette::changeEvent(QEvent *e)
 {
 	if (e->type() == QEvent::LanguageChange)
-	{
 		languageChange();
-	}
 	else
-		QWidget::changeEvent(e);
+		ScDockPalette::changeEvent(e);
 }
 
 void BookPalette::languageChange()

Modified: trunk/Scribus/scribus/ui/bookmarkpalette.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17017&path=/trunk/Scribus/scribus/ui/bookmarkpalette.h
==============================================================================
--- trunk/Scribus/scribus/ui/bookmarkpalette.h (original)
+++ trunk/Scribus/scribus/ui/bookmarkpalette.h Thu Nov 24 10:12:10 2011
@@ -29,14 +29,14 @@
 class QEvent;
 
 #include "scribusapi.h"
-#include "scrpalettebase.h"
+#include "scdockpalette.h"
 #include "bookmwin.h"
 /**
   *@author Franz Schmid
   */
 
 /*! \brief A Bookmark Palette */
-class SCRIBUS_API BookPalette : public ScrPaletteBase
+class SCRIBUS_API BookPalette : public ScDockPalette
 {
 	Q_OBJECT
 
@@ -58,9 +58,6 @@
 	
 public slots:
 	void languageChange();
-
-protected:
-	QVBoxLayout* PaletteLayout;
 };
 
 #endif

Modified: trunk/Scribus/scribus/ui/layers.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17017&path=/trunk/Scribus/scribus/ui/layers.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/layers.cpp (original)
+++ trunk/Scribus/scribus/ui/layers.cpp Thu Nov 24 10:12:10 2011
@@ -37,9 +37,12 @@
 #include "undomanager.h"
 #include "util_icon.h"
 
-LayerPalette::LayerPalette(QWidget* parent) : ScrPaletteBase( parent, "Layers", false, 0 ), m_Doc(0)
-{
-	LayerPaletteLayout = new QVBoxLayout( this );
+LayerPalette::LayerPalette(QWidget* parent) : ScDockPalette( parent, "Layers", 0 ), m_Doc(0)
+{
+	setObjectName(QString::fromLocal8Bit("Layers"));
+	setSizePolicy( QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));
+	containerWidget = new QWidget(this);
+	LayerPaletteLayout = new QVBoxLayout();
 	LayerPaletteLayout->setMargin(2);
 	LayerPaletteLayout->setSpacing(2);
 
@@ -134,6 +137,8 @@
 	Layout1->addWidget( lowerLayerButton );
 
 	LayerPaletteLayout->addLayout( Layout1 );
+	containerWidget->setLayout( LayerPaletteLayout );
+	setWidget( containerWidget );
 	ClearInhalt();
 	languageChange();
 
@@ -560,7 +565,7 @@
 		languageChange();
 	}
 	else
-		QWidget::changeEvent(e);
+		ScDockPalette::changeEvent(e);
 }
 
 void LayerPalette::languageChange()

Modified: trunk/Scribus/scribus/ui/layers.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17017&path=/trunk/Scribus/scribus/ui/layers.h
==============================================================================
--- trunk/Scribus/scribus/ui/layers.h (original)
+++ trunk/Scribus/scribus/ui/layers.h Thu Nov 24 10:12:10 2011
@@ -10,7 +10,7 @@
 #include <QList>
 
 #include "scribusapi.h"
-#include "ui/scrpalettebase.h"
+#include "ui/scdockpalette.h"
 #include "scribusstructs.h"
 #include "sclayer.h"
 
@@ -28,7 +28,7 @@
 class ScComboBox;
 class ScribusDoc;
 
-class SCRIBUS_API LayerPalette : public ScrPaletteBase
+class SCRIBUS_API LayerPalette : public ScDockPalette
 {
 	Q_OBJECT
 
@@ -70,6 +70,7 @@
 	void LayerActivated(int);
 
 protected:
+	QWidget* containerWidget;
 	ScribusDoc* m_Doc;
 	QVBoxLayout* LayerPaletteLayout;
 	QHBoxLayout* Layout1;




More information about the scribus-commit mailing list