]> git.lyx.org Git - lyx.git/commitdiff
cleanup dialog
authorEdwin Leuven <e.leuven@gmail.com>
Thu, 4 Oct 2007 07:48:26 +0000 (07:48 +0000)
committerEdwin Leuven <e.leuven@gmail.com>
Thu, 4 Oct 2007 07:48:26 +0000 (07:48 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20727 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiWrap.cpp
src/frontends/qt4/GuiWrap.h
src/frontends/qt4/ui/WrapUi.ui

index c6171078f6de1036a3694e647fb638e71115e5db..c86f870343c9531483c08b4a163921af8252ab36 100644 (file)
@@ -60,9 +60,6 @@ GuiWrapDialog::GuiWrapDialog(LyXView & lv)
        connect(linesSB, SIGNAL(valueChanged(int)),
                this, SLOT(change_adaptor()));
 
-       connect(overhangCB, SIGNAL(stateChanged(int)), this, SLOT(overhangChecked(int)));
-       connect(linesCB, SIGNAL(stateChanged(int)), this, SLOT(linesChecked(int)));
-
        widthED->setValidator(unsignedLengthValidator(widthED));
        // FIXME:
        // overhang can be negative, but the unsignedLengthValidator allows this
@@ -108,26 +105,6 @@ void GuiWrapDialog::change_adaptor()
 }
 
 
-void GuiWrapDialog::overhangChecked(int checkState)
-{
-       if (checkState == Qt::Checked) {
-               overhangED->setEnabled(true);
-               overhangUnitLC->setEnabled(true);
-       } else { 
-               overhangED->setEnabled(false);
-               overhangUnitLC->setEnabled(false);
-       }
-}
-
-void GuiWrapDialog::linesChecked(int checkState)
-{
-       if (checkState == Qt::Checked)
-               linesSB->setEnabled(true);
-       else 
-               linesSB->setEnabled(false);
-}
-
-
 void GuiWrapDialog::applyView()
 {
        double const width_value = widthED->text().toDouble();
index 7fc097b396f40c4778f7c646ad6662a8a2ec92ef..9fa79f2e5b1467b15b1b349268ece8d53ab6babf 100644 (file)
@@ -28,10 +28,6 @@ public:
 
 private Q_SLOTS:
        void change_adaptor();
-       /// overhang checkbox
-       void overhangChecked(int);
-       /// lines checkbox
-       void linesChecked(int);
 
 private:
        void closeEvent(QCloseEvent * e);
index c2eecb2f631a821bb349ac814ffc7bf5c7e07035..48723ed7fbd7d9e2482de9248508ab55ef3f4d7f 100644 (file)
@@ -5,8 +5,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>411</width>
-    <height>199</height>
+    <width>359</width>
+    <height>152</height>
    </rect>
   </property>
   <property name="windowTitle" >
   <property name="sizeGripEnabled" >
    <bool>true</bool>
   </property>
-  <widget class="QWidget" name="layoutWidget_2" >
-   <property name="geometry" >
-    <rect>
-     <x>10</x>
-     <y>10</y>
-     <width>281</width>
-     <height>42</height>
-    </rect>
+  <layout class="QGridLayout" >
+   <property name="margin" >
+    <number>9</number>
    </property>
-   <layout class="QGridLayout" >
-    <property name="margin" >
-     <number>0</number>
-    </property>
-    <property name="spacing" >
-     <number>6</number>
-    </property>
-    <item row="1" column="0" >
-     <widget class="QLineEdit" name="widthED" >
-      <property name="sizePolicy" >
-       <sizepolicy>
-        <hsizetype>1</hsizetype>
-        <vsizetype>0</vsizetype>
-        <horstretch>0</horstretch>
-        <verstretch>0</verstretch>
-       </sizepolicy>
-      </property>
-      <property name="toolTip" >
-       <string>Width value</string>
-      </property>
-     </widget>
-    </item>
-    <item row="0" column="1" >
-     <widget class="QLabel" name="widthUnitLA" >
-      <property name="text" >
-       <string>&amp;Unit:</string>
-      </property>
-      <property name="buddy" >
-       <cstring>widthUnitLC</cstring>
-      </property>
-     </widget>
-    </item>
-    <item row="1" column="1" >
-     <widget class="LengthCombo" name="widthUnitLC" >
-      <property name="sizePolicy" >
-       <sizepolicy>
-        <hsizetype>3</hsizetype>
-        <vsizetype>0</vsizetype>
-        <horstretch>0</horstretch>
-        <verstretch>0</verstretch>
-       </sizepolicy>
-      </property>
-      <property name="minimumSize" >
-       <size>
-        <width>40</width>
-        <height>22</height>
-       </size>
-      </property>
-      <property name="focusPolicy" >
-       <enum>Qt::StrongFocus</enum>
-      </property>
-      <property name="toolTip" >
-       <string>Unit of width value</string>
-      </property>
-     </widget>
-    </item>
-    <item row="0" column="0" >
-     <widget class="QLabel" name="widthLA" >
-      <property name="text" >
-       <string>&amp;Width:</string>
-      </property>
-      <property name="buddy" >
-       <cstring>widthED</cstring>
-      </property>
-     </widget>
-    </item>
-   </layout>
-  </widget>
-  <widget class="QWidget" name="layoutWidget_4" >
-   <property name="geometry" >
-    <rect>
-     <x>10</x>
-     <y>120</y>
-     <width>242</width>
-     <height>22</height>
-    </rect>
+   <property name="spacing" >
+    <number>6</number>
    </property>
-   <layout class="QGridLayout" >
-    <property name="margin" >
-     <number>0</number>
-    </property>
-    <property name="spacing" >
-     <number>6</number>
-    </property>
-    <item row="0" column="1" >
-     <widget class="QSpinBox" name="linesSB" >
-      <property name="enabled" >
-       <bool>false</bool>
-      </property>
-      <property name="toolTip" >
-       <string>number of needed lines</string>
-      </property>
-     </widget>
-    </item>
-    <item row="0" column="0" >
-     <widget class="QCheckBox" name="linesCB" >
-      <property name="toolTip" >
-       <string>use number of lines</string>
-      </property>
-      <property name="text" >
-       <string>&amp;Number of needed lines (optional):</string>
-      </property>
-     </widget>
-    </item>
-   </layout>
-  </widget>
-  <widget class="QWidget" name="layoutWidget_3" >
-   <property name="geometry" >
-    <rect>
-     <x>303</x>
-     <y>11</y>
-     <width>100</width>
-     <height>41</height>
-    </rect>
-   </property>
-   <layout class="QVBoxLayout" >
-    <property name="margin" >
-     <number>0</number>
-    </property>
-    <property name="spacing" >
-     <number>6</number>
-    </property>
-    <item>
-     <widget class="QLabel" name="valignLA" >
-      <property name="text" >
-       <string>&amp;Placement:</string>
-      </property>
-      <property name="buddy" >
-       <cstring>valignCO</cstring>
-      </property>
-     </widget>
-    </item>
-    <item>
-     <widget class="QComboBox" name="valignCO" >
-      <property name="toolTip" >
-       <string>Vertical alignment</string>
-      </property>
-      <item>
+   <item row="3" column="2" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>40</width>
+       <height>20</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="3" column="1" >
+    <widget class="QSpinBox" name="linesSB" >
+     <property name="enabled" >
+      <bool>false</bool>
+     </property>
+     <property name="toolTip" >
+      <string>number of needed lines</string>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="0" >
+    <widget class="QCheckBox" name="linesCB" >
+     <property name="toolTip" >
+      <string>use number of lines</string>
+     </property>
+     <property name="text" >
+      <string>&amp;Line span:</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="3" >
+    <widget class="LengthCombo" name="widthUnitLC" >
+     <property name="sizePolicy" >
+      <sizepolicy>
+       <hsizetype>3</hsizetype>
+       <vsizetype>0</vsizetype>
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="minimumSize" >
+      <size>
+       <width>40</width>
+       <height>22</height>
+      </size>
+     </property>
+     <property name="focusPolicy" >
+      <enum>Qt::StrongFocus</enum>
+     </property>
+     <property name="toolTip" >
+      <string>Unit of width value</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0" >
+    <widget class="QLabel" name="widthLA" >
+     <property name="text" >
+      <string>&amp;Width:</string>
+     </property>
+     <property name="buddy" >
+      <cstring>widthED</cstring>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="1" colspan="2" >
+    <widget class="QLineEdit" name="widthED" >
+     <property name="sizePolicy" >
+      <sizepolicy>
+       <hsizetype>1</hsizetype>
+       <vsizetype>0</vsizetype>
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="toolTip" >
+      <string>Width value</string>
+     </property>
+    </widget>
+   </item>
+   <item row="4" column="0" colspan="4" >
+    <layout class="QHBoxLayout" >
+     <property name="margin" >
+      <number>0</number>
+     </property>
+     <property name="spacing" >
+      <number>6</number>
+     </property>
+     <item>
+      <widget class="QPushButton" name="restorePB" >
+       <property name="toolTip" >
+        <string/>
+       </property>
        <property name="text" >
-        <string>Outer (default)</string>
+        <string>&amp;Restore</string>
+       </property>
+       <property name="default" >
+        <bool>false</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeType" >
+        <enum>QSizePolicy::Expanding</enum>
+       </property>
+       <property name="sizeHint" >
+        <size>
+         <width>20</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="okPB" >
+       <property name="toolTip" >
+        <string/>
        </property>
-      </item>
-      <item>
        <property name="text" >
-        <string>Inner</string>
+        <string>&amp;OK</string>
+       </property>
+       <property name="default" >
+        <bool>false</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="applyPB" >
+       <property name="toolTip" >
+        <string/>
        </property>
-      </item>
-      <item>
        <property name="text" >
-        <string>Left</string>
+        <string>&amp;Apply</string>
+       </property>
+       <property name="default" >
+        <bool>false</bool>
        </property>
-      </item>
-      <item>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="closePB" >
        <property name="text" >
-        <string>Right</string>
+        <string>&amp;Close</string>
        </property>
-      </item>
-     </widget>
-    </item>
-   </layout>
-  </widget>
-  <widget class="QWidget" name="" >
-   <property name="geometry" >
-    <rect>
-     <x>10</x>
-     <y>60</y>
-     <width>261</width>
-     <height>48</height>
-    </rect>
-   </property>
-   <layout class="QGridLayout" >
-    <property name="margin" >
-     <number>0</number>
-    </property>
-    <property name="spacing" >
-     <number>6</number>
-    </property>
-    <item row="0" column="1" >
-     <layout class="QVBoxLayout" >
-      <property name="margin" >
-       <number>0</number>
-      </property>
-      <property name="spacing" >
-       <number>6</number>
-      </property>
-      <item>
-       <widget class="QLabel" name="overhangUnitLA" >
-        <property name="text" >
-         <string>&amp;Unit:</string>
-        </property>
-        <property name="buddy" >
-         <cstring>widthUnitLC</cstring>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="LengthCombo" name="overhangUnitLC" >
-        <property name="enabled" >
-         <bool>false</bool>
-        </property>
-        <property name="sizePolicy" >
-         <sizepolicy>
-          <hsizetype>13</hsizetype>
-          <vsizetype>13</vsizetype>
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="minimumSize" >
-         <size>
-          <width>0</width>
-          <height>0</height>
-         </size>
-        </property>
-        <property name="focusPolicy" >
-         <enum>Qt::StrongFocus</enum>
-        </property>
-        <property name="toolTip" >
-         <string>Unit of overhang value</string>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </item>
-    <item row="0" column="0" >
-     <layout class="QVBoxLayout" >
-      <property name="margin" >
-       <number>0</number>
-      </property>
-      <property name="spacing" >
-       <number>6</number>
-      </property>
-      <item>
-       <widget class="QCheckBox" name="overhangCB" >
-        <property name="toolTip" >
-         <string>use overhang</string>
-        </property>
-        <property name="text" >
-         <string>&amp;Overhang (optional):</string>
-        </property>
-        <property name="checked" >
-         <bool>false</bool>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QLineEdit" name="overhangED" >
-        <property name="enabled" >
-         <bool>false</bool>
-        </property>
-        <property name="sizePolicy" >
-         <sizepolicy>
-          <hsizetype>1</hsizetype>
-          <vsizetype>0</vsizetype>
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="toolTip" >
-         <string>Overhang value</string>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </item>
-   </layout>
-  </widget>
-  <widget class="QWidget" name="layoutWidget_1" >
-   <property name="geometry" >
-    <rect>
-     <x>10</x>
-     <y>150</y>
-     <width>392</width>
-     <height>45</height>
-    </rect>
-   </property>
-   <layout class="QVBoxLayout" >
-    <property name="margin" >
-     <number>0</number>
-    </property>
-    <property name="spacing" >
-     <number>6</number>
-    </property>
-    <item>
-     <spacer>
-      <property name="orientation" >
-       <enum>Qt::Vertical</enum>
-      </property>
-      <property name="sizeType" >
-       <enum>QSizePolicy::Expanding</enum>
+       <property name="default" >
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="0" column="0" >
+    <widget class="QLabel" name="valignLA" >
+     <property name="text" >
+      <string>&amp;Placement:</string>
+     </property>
+     <property name="buddy" >
+      <cstring>valignCO</cstring>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1" colspan="2" >
+    <widget class="QComboBox" name="valignCO" >
+     <property name="toolTip" >
+      <string>Vertical alignment</string>
+     </property>
+     <item>
+      <property name="text" >
+       <string>Outer (default)</string>
       </property>
-      <property name="sizeHint" >
-       <size>
-        <width>390</width>
-        <height>10</height>
-       </size>
+     </item>
+     <item>
+      <property name="text" >
+       <string>Inner</string>
       </property>
-     </spacer>
-    </item>
-    <item>
-     <layout class="QHBoxLayout" >
-      <property name="margin" >
-       <number>0</number>
+     </item>
+     <item>
+      <property name="text" >
+       <string>Left</string>
       </property>
-      <property name="spacing" >
-       <number>6</number>
+     </item>
+     <item>
+      <property name="text" >
+       <string>Right</string>
       </property>
-      <item>
-       <widget class="QPushButton" name="restorePB" >
-        <property name="toolTip" >
-         <string/>
-        </property>
-        <property name="text" >
-         <string>&amp;Restore</string>
-        </property>
-        <property name="default" >
-         <bool>false</bool>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <spacer>
-        <property name="orientation" >
-         <enum>Qt::Horizontal</enum>
-        </property>
-        <property name="sizeType" >
-         <enum>QSizePolicy::Expanding</enum>
-        </property>
-        <property name="sizeHint" >
-         <size>
-          <width>20</width>
-          <height>20</height>
-         </size>
-        </property>
-       </spacer>
-      </item>
-      <item>
-       <widget class="QPushButton" name="okPB" >
-        <property name="toolTip" >
-         <string/>
-        </property>
-        <property name="text" >
-         <string>&amp;OK</string>
-        </property>
-        <property name="default" >
-         <bool>false</bool>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QPushButton" name="applyPB" >
-        <property name="toolTip" >
-         <string/>
-        </property>
-        <property name="text" >
-         <string>&amp;Apply</string>
-        </property>
-        <property name="default" >
-         <bool>false</bool>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QPushButton" name="closePB" >
-        <property name="text" >
-         <string>&amp;Close</string>
-        </property>
-        <property name="default" >
-         <bool>true</bool>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </item>
-   </layout>
-  </widget>
+     </item>
+    </widget>
+   </item>
+   <item row="2" column="0" >
+    <widget class="QCheckBox" name="overhangCB" >
+     <property name="toolTip" >
+      <string>use overhang</string>
+     </property>
+     <property name="text" >
+      <string>Over&amp;hang:</string>
+     </property>
+     <property name="checked" >
+      <bool>false</bool>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="1" colspan="2" >
+    <widget class="QLineEdit" name="overhangED" >
+     <property name="enabled" >
+      <bool>false</bool>
+     </property>
+     <property name="sizePolicy" >
+      <sizepolicy>
+       <hsizetype>1</hsizetype>
+       <vsizetype>0</vsizetype>
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="toolTip" >
+      <string>Overhang value</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="3" >
+    <widget class="LengthCombo" name="overhangUnitLC" >
+     <property name="enabled" >
+      <bool>false</bool>
+     </property>
+     <property name="sizePolicy" >
+      <sizepolicy>
+       <hsizetype>13</hsizetype>
+       <vsizetype>13</vsizetype>
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="minimumSize" >
+      <size>
+       <width>0</width>
+       <height>0</height>
+      </size>
+     </property>
+     <property name="focusPolicy" >
+      <enum>Qt::StrongFocus</enum>
+     </property>
+     <property name="toolTip" >
+      <string>Unit of overhang value</string>
+     </property>
+    </widget>
+   </item>
+  </layout>
  </widget>
  <customwidgets>
   <customwidget>
   </customwidget>
  </customwidgets>
  <tabstops>
+  <tabstop>valignCO</tabstop>
   <tabstop>widthED</tabstop>
   <tabstop>widthUnitLC</tabstop>
-  <tabstop>valignCO</tabstop>
   <tabstop>overhangCB</tabstop>
   <tabstop>overhangED</tabstop>
   <tabstop>overhangUnitLC</tabstop>
   <include location="local" >qt_helpers.h</include>
  </includes>
  <resources/>
- <connections/>
+ <connections>
+  <connection>
+   <sender>overhangCB</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>overhangED</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>52</x>
+     <y>71</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>124</x>
+     <y>70</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>overhangCB</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>overhangUnitLC</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>54</x>
+     <y>80</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>259</x>
+     <y>80</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>linesCB</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>linesSB</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>13</x>
+     <y>93</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>164</x>
+     <y>101</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
 </ui>