Georg Baum wrote: > Am Montag, 12. Juni 2006 15:13 schrieb Juergen Spitzmueller: > > I had a quick look. It looks good. However, it should be possible to use > > \addlinespace (without optional argument). I guess most of the time > > you'll > > > need the same linespace, which is then globally defined. > > This patch adds that. It goes in now, please test.
Very good, thanks. However, I think the "default" switches should be disabled initially at least for non-booktabs tables. It looks rather odd for those (on screen and output). Also there are accelerators missing for the default checks (and some duplicated accelerators for _T_op Space/_T_able Settings and _B_ottom Space/_B_orders). Attached is a patch for the gui issues issues, which I'll shove in. > Known problems: qt4 crashes if you want to change the spaces, I don't know > why. There's a cut'n'paste error in QDialog.C (see attached patch). That was obviously one cause. Now it only crashes if you insert bogus data (like "r") to the fields. I guess it needs a proper input validator. > I have no further plans for the booktabs branch. Is anything missing? Well, for my usual work with booktabs, one important feature would be missing: Proper support for \cmidrule (i.e. ability to use something like \cmidrule(l){2-3}\cmidrule(lr){4-4}\cmidrule(r){5-6} ). I'm not sure how the UI for this might look like, though. Jürgen > Edwin, could you please have a look at the qt4 problem? After that is > fixed the branch could be merged. > > > Georg
Index: src/frontends/qt3/ui/QTabularDialogBase.ui =================================================================== --- src/frontends/qt3/ui/QTabularDialogBase.ui (Revision 14208) +++ src/frontends/qt3/ui/QTabularDialogBase.ui (Arbeitskopie) @@ -306,7 +306,6 @@ </widget> </grid> </widget> - <widget class="QWidget"> <property name="name"> <cstring>tab</cstring> @@ -324,7 +323,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="LengthCombo" row="0" column="2" > + <widget class="LengthCombo" row="0" column="2"> <property name="name"> <cstring>topspaceUnit</cstring> </property> @@ -340,12 +339,8 @@ <property name="focusPolicy"> <enum>StrongFocus</enum> </property> - <property> - <name>toolTip</name> - <string>Topspace unit</string> - </property> </widget> - <widget class="QLineEdit" row="0" column="1" > + <widget class="QLineEdit" row="0" column="1"> <property name="name"> <cstring>topspaceED</cstring> </property> @@ -355,17 +350,15 @@ <property name="text"> <string></string> </property> - <property> - <name>toolTip</name> - <string>Extra space above the row</string> + <property name="" stdset="0"> </property> </widget> - <widget class="QLabel" row="0" column="0" > + <widget class="QLabel" row="0" column="0"> <property name="name"> <cstring>topspaceLA</cstring> </property> <property name="text"> - <string>&Top space:</string> + <string>T&op space:</string> </property> <property name="buddy" stdset="0"> <cstring>topspaceED</cstring> @@ -376,13 +369,16 @@ <cstring>topspaceCB</cstring> </property> <property name="text"> - <string>Default</string> + <string>&Default</string> + </property> + <property name="accel"> + <string>Alt+D</string> </property> <property name="toolTip" stdset="0"> <string>Use the default top space amount</string> </property> </widget> - <widget class="LengthCombo" row="1" column="2" > + <widget class="LengthCombo" row="1" column="2"> <property name="name"> <cstring>bottomspaceUnit</cstring> </property> @@ -398,12 +394,8 @@ <property name="focusPolicy"> <enum>StrongFocus</enum> </property> - <property> - <name>toolTip</name> - <string>Bottomspace unit</string> - </property> </widget> - <widget class="QLineEdit" row="1" column="1" > + <widget class="QLineEdit" row="1" column="1"> <property name="name"> <cstring>bottomspaceED</cstring> </property> @@ -413,17 +405,15 @@ <property name="text"> <string></string> </property> - <property> - <name>toolTip</name> - <string>Extra space below the row</string> + <property name="" stdset="0"> </property> </widget> - <widget class="QLabel" row="1" column="0" > + <widget class="QLabel" row="1" column="0"> <property name="name"> <cstring>bottomspaceLA</cstring> </property> <property name="text"> - <string>&Bottom space:</string> + <string>Botto&m space:</string> </property> <property name="buddy" stdset="0"> <cstring>bottomspaceED</cstring> @@ -434,13 +424,16 @@ <cstring>bottomspaceCB</cstring> </property> <property name="text"> - <string>Default</string> + <string>D&efault</string> + </property> + <property name="accel"> + <string>Alt+E</string> </property> <property name="toolTip" stdset="0"> <string>Use the default bottom space amount</string> </property> </widget> - <widget class="LengthCombo" row="2" column="2" > + <widget class="LengthCombo" row="2" column="2"> <property name="name"> <cstring>interlinespaceUnit</cstring> </property> @@ -456,12 +449,8 @@ <property name="focusPolicy"> <enum>StrongFocus</enum> </property> - <property> - <name>toolTip</name> - <string>Interlinespace unit</string> - </property> </widget> - <widget class="QLineEdit" row="2" column="1" > + <widget class="QLineEdit" row="2" column="1"> <property name="name"> <cstring>interlinespaceED</cstring> </property> @@ -471,12 +460,10 @@ <property name="text"> <string></string> </property> - <property> - <name>toolTip</name> - <string>Extra space below the bottom line</string> + <property name="" stdset="0"> </property> </widget> - <widget class="QLabel" row="2" column="0" > + <widget class="QLabel" row="2" column="0"> <property name="name"> <cstring>interlinespaceLA</cstring> </property> @@ -492,13 +479,16 @@ <cstring>interlinespaceCB</cstring> </property> <property name="text"> - <string>Default</string> + <string>De&fault</string> + </property> + <property name="accel"> + <string>Alt+F</string> </property> <property name="toolTip" stdset="0"> <string>Use the default interline space amount</string> </property> </widget> - <spacer row="3" column="0" > + <spacer row="3" column="0"> <property name="name"> <cstring>Spacer8</cstring> </property> @@ -508,18 +498,17 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property> - <name>sizeHint</name> + <property name="sizeHint"> <size> <width>20</width> <height>20</height> </size> </property> + <property name="" stdset="0"> + </property> </spacer> </grid> </widget> - - <widget class="QWidget"> <property name="name"> <cstring>tab</cstring> @@ -1356,7 +1345,7 @@ </customwidgets> <images> <image name="image0"> - <data format="PNG" length="256">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000000c749444154388dad55db1184200c4c180bb81a28c73aad811228c356f42b3792db3cc0db2fc724bb7901dc7b270f27ed17fa5fa9b117b7cd90211f4ba0ac906a7f1453b4d30ca917bb590681552af23f69bfc4ffa71519d2c8f62546ea5ea03738b1c18c33a4d156f0d13f43b61952e4af6d6e8fb3a408f080448419a433d6486d85052fdba892a295f5d45785cd8c51a9d6de6a814a8d2131da51f98e7a3b64ec9da04a8db53d43be3c3c0b22cacf17e4cdb5a931649ceddf34b190cf0aa019f03f1fd3e7457f03b5a66c9ed26e86130000000049454e44ae426082</data> + <data format="PNG" length="256">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000000c749444154388dad55db1184200c4c180bb005eab1cd6b8112b40d4bf1bee2486ef3006fbf1c93ece605f07eece4e1a4ed42ff2b35f6e2961132e46309941952ed8f628a761a21f56217cb20b04a45fe276d97f8ffb422431ad96e62a4ee057a83131bcc38431a6d057f8eb5cb36438afcb5cded719614011e9088308374c61aa9adb0e0651b5552b4b29efaacb099312ad5da5b2d50a93124463b2adf516fbb8cbd1354a9b1b667c8a787674144f9f982bcb93635ba8cb3fd1b2616f251013403fee763fabce8bff0aa6c98500331e50000000049454e44ae426082</data> </image> </images> <connections> @@ -1702,6 +1691,9 @@ <layoutdefaults spacing="6" margin="11"/> <includehints> <includehint>lengthcombo.h</includehint> + <includehint>lengthcombo.h</includehint> + <includehint>lengthcombo.h</includehint> + <includehint>lengthcombo.h</includehint> <includehint>qsetborder.h</includehint> </includehints> </UI> Index: src/frontends/qt4/ui/QTabularUi.ui =================================================================== --- src/frontends/qt4/ui/QTabularUi.ui (Revision 14208) +++ src/frontends/qt4/ui/QTabularUi.ui (Arbeitskopie) @@ -34,7 +34,7 @@ <enum>QTabWidget::Rounded</enum> </property> <property name="currentIndex" > - <number>2</number> + <number>1</number> </property> <widget class="QWidget" name="Settings" > <attribute name="title" > @@ -271,7 +271,7 @@ <item row="1" column="0" > <widget class="QLabel" name="bottomspaceLA" > <property name="text" > - <string>&Bottom space</string> + <string>Botto&m space</string> </property> <property name="buddy" > <cstring>bottomspaceED</cstring> @@ -281,7 +281,7 @@ <item row="0" column="0" > <widget class="QLabel" name="topspaceLA" > <property name="text" > - <string>&Top space</string> + <string>T&op space</string> </property> <property name="buddy" > <cstring>topspaceED</cstring> @@ -303,7 +303,7 @@ <string>Use the default top space amount</string> </property> <property name="text" > - <string>Default</string> + <string>&Default</string> </property> </widget> </item> @@ -313,7 +313,7 @@ <string>Use the default bottom space amount</string> </property> <property name="text" > - <string>Default</string> + <string>D&efault</string> </property> </widget> </item> @@ -323,7 +323,7 @@ <string>Use the default interline space amount</string> </property> <property name="text" > - <string>Default</string> + <string>De&fault</string> </property> </widget> </item> @@ -1091,16 +1091,16 @@ <pixmapfunction></pixmapfunction> <customwidgets> <customwidget> - <class>QSetBorder</class> - <extends>QWidget</extends> - <header>qsetborder.h</header> + <class>LengthCombo</class> + <extends>QComboBox</extends> + <header>lengthcombo.h</header> <container>0</container> <pixmap></pixmap> </customwidget> <customwidget> - <class>LengthCombo</class> - <extends>QComboBox</extends> - <header>lengthcombo.h</header> + <class>QSetBorder</class> + <extends>QWidget</extends> + <header>qsetborder.h</header> <container>0</container> <pixmap></pixmap> </customwidget> @@ -1118,13 +1118,10 @@ <tabstop>TabWidget</tabstop> <tabstop>topspaceED</tabstop> <tabstop>topspaceUnit</tabstop> - <tabstop>topspaceeCB</tabstop> <tabstop>bottomspaceED</tabstop> <tabstop>bottomspaceUnit</tabstop> - <tabstop>bottomspaceeCB</tabstop> <tabstop>interlinespaceED</tabstop> <tabstop>interlinespaceUnit</tabstop> - <tabstop>interlinespaceeCB</tabstop> <tabstop>hAlignCB</tabstop> <tabstop>borderSetPB</tabstop> <tabstop>borderUnsetPB</tabstop> Index: src/frontends/qt4/QTabular.C =================================================================== --- src/frontends/qt4/QTabular.C (Revision 14208) +++ src/frontends/qt4/QTabular.C (Arbeitskopie) @@ -214,7 +214,7 @@ void QTabular::update_contents() } dialog_->bottomspaceCB->setEnabled(!isReadonly); - lengthToWidgets(dialog_->bottomspaceED, dialog_->interlinespaceUnit, + lengthToWidgets(dialog_->interlinespaceED, dialog_->interlinespaceUnit, tabular.row_info[row].interline_space.asString(), default_unit); if (tabular.row_info[row].interline_space_default) { dialog_->interlinespaceCB->setChecked(true);