Georg Baum wrote:
> Am Sonntag, 25. Juni 2006 19:41 schrieb Juergen Spitzmueller:
> > 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).
>
> Only bottom_space makes sense for non booktab tables IMO. I implemented
> the others because it was easier for me than a logic for
> enabling/disabling them. Feel free to change that.

OK. Then I'll disable the setting of the spaces initially. BTW I'd like to 
adapt the spaces UI more to the other spaces UI in LyX, that is instead of 
the check boxes: a combo "none", "default", "custom". Agreed?

> The length fields do use length validators. Why does it not work?

You have used the wrong signal. The attached patch fixes that. I'm currently 
committing. The crash is now fixed AFAICS.

> > 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.
>
> That is indeed difficult. What about adding short lines to the left and
> right of the bottom and top line of the border widget that can be set and
> unset? E.g
>
> - ------ -
>
> whould give \cmidrule{2-2}, and
>
>   ------ -
>
> would give \cmidrule(l){2-2} etc.
>
> rules would be combined if the short lines inbetween are set, e.g.
>
> - ------ -
>
> both in cell 2 and 3 would give \cmidrule{2-3}.

Sounds good! Do you have a go?

> BTW the spaces should ideally be incorporated into the border widget,
> because then it is clear what they do.

Yes, why not. There's enough room.

Jürgen

> Georg
Index: src/frontends/qt4/QTabularDialog.C
===================================================================
--- src/frontends/qt4/QTabularDialog.C	(Revision 14208)
+++ src/frontends/qt4/QTabularDialog.C	(Arbeitskopie)
@@ -41,55 +41,55 @@ QTabularDialog::QTabularDialog(QTabular 
 	bottomspaceED->setValidator(new LengthValidator(bottomspaceED));
 	interlinespaceED->setValidator(new LengthValidator(interlinespaceED));
 
-	connect(topspaceED, SIGNAL(textChanged(const QString &)),
+	connect(topspaceED, SIGNAL(returnPressed()),
 	        this, SLOT(topspace_changed()));
 	connect(topspaceUnit, SIGNAL(selectionChanged(LyXLength::UNIT)),
 	        this, SLOT(topspace_changed()));
 	connect(topspaceCB, SIGNAL(clicked()), this, SLOT(topspace_changed()));
-	connect(bottomspaceED, SIGNAL(textChanged(const QString &)),
+	connect(bottomspaceED, SIGNAL(returnPressed()),
 	        this, SLOT(bottomspace_changed()));
 	connect(bottomspaceUnit, SIGNAL(selectionChanged(LyXLength::UNIT)),
 	        this, SLOT(bottomspace_changed()));
 	connect(bottomspaceCB, SIGNAL(clicked()), this, SLOT(bottomspace_changed()));
-	connect(interlinespaceED, SIGNAL(textChanged(const QString &)),
+	connect(interlinespaceED, SIGNAL(returnPressed()),
 	        this, SLOT(interlinespace_changed()));
 	connect(interlinespaceUnit, SIGNAL(selectionChanged(LyXLength::UNIT)),
 	        this, SLOT(interlinespace_changed()));
 	connect(interlinespaceCB, SIGNAL(clicked()), this, SLOT(interlinespace_changed()));
 	connect(booktabsCB, SIGNAL(clicked()), this, SLOT(on_booktabsCB_stateChanged()));
 	connect( borderSetPB, SIGNAL( clicked() ), this, SLOT( borderSet_clicked() ) );
-    connect( borderUnsetPB, SIGNAL( clicked() ), this, SLOT( borderUnset_clicked() ) );
-    connect( longTabularCB, SIGNAL( toggled(bool) ), longtableGB, SLOT( setEnabled(bool) ) );
-    connect( longTabularCB, SIGNAL( toggled(bool) ), newpageCB, SLOT( setEnabled(bool) ) );
-    connect( hAlignCB, SIGNAL( activated(int) ), this, SLOT( hAlign_changed(int) ) );
-    connect( vAlignCB, SIGNAL( activated(int) ), this, SLOT( vAlign_changed(int) ) );
-    connect( multicolumnCB, SIGNAL( clicked() ), this, SLOT( multicolumn_clicked() ) );
-    connect( newpageCB, SIGNAL( clicked() ), this, SLOT( ltNewpage_clicked() ) );
-    connect( headerStatusCB, SIGNAL( clicked() ), this, SLOT( ltHeaderStatus_clicked() ) );
-    connect( headerBorderAboveCB, SIGNAL( clicked() ), this, SLOT( ltHeaderBorderAbove_clicked() ) );
-    connect( headerBorderBelowCB, SIGNAL( clicked() ), this, SLOT( ltHeaderBorderBelow_clicked() ) );
-    connect( firstheaderStatusCB, SIGNAL( clicked() ), this, SLOT( ltFirstHeaderStatus_clicked() ) );
-    connect( firstheaderBorderAboveCB, SIGNAL( clicked() ), this, SLOT( ltFirstHeaderBorderAbove_clicked() ) );
-    connect( firstheaderBorderBelowCB, SIGNAL( clicked() ), this, SLOT( ltFirstHeaderBorderBelow_clicked() ) );
-    connect( firstheaderNoContentsCB, SIGNAL( clicked() ), this, SLOT( ltFirstHeaderEmpty_clicked() ) );
-    connect( footerStatusCB, SIGNAL( clicked() ), this, SLOT( ltFooterStatus_clicked() ) );
-    connect( footerBorderAboveCB, SIGNAL( clicked() ), this, SLOT( ltFooterBorderAbove_clicked() ) );
-    connect( footerBorderBelowCB, SIGNAL( clicked() ), this, SLOT( ltFooterBorderBelow_clicked() ) );
-    connect( lastfooterStatusCB, SIGNAL( clicked() ), this, SLOT( ltLastFooterStatus_clicked() ) );
-    connect( lastfooterBorderAboveCB, SIGNAL( clicked() ), this, SLOT( ltLastFooterBorderAbove_clicked() ) );
-    connect( lastfooterBorderBelowCB, SIGNAL( clicked() ), this, SLOT( ltLastFooterBorderBelow_clicked() ) );
-    connect( lastfooterNoContentsCB, SIGNAL( clicked() ), this, SLOT( ltLastFooterEmpty_clicked() ) );
-    connect( specialAlignmentED, SIGNAL( returnPressed() ), this, SLOT( specialAlignment_changed() ) );
-    connect( widthED, SIGNAL( returnPressed() ), this, SLOT( width_changed() ) );
-    connect( widthUnit, SIGNAL( selectionChanged(LyXLength::UNIT) ), this, SLOT( width_changed() ) );
-    connect( closePB, SIGNAL( clicked() ), this, SLOT( close_clicked() ) );
-    connect( borders, SIGNAL( topSet(bool) ), this, SLOT( topBorder_changed() ) );
-    connect( borders, SIGNAL( bottomSet(bool) ), this, SLOT( bottomBorder_changed() ) );
-    connect( borders, SIGNAL( rightSet(bool) ), this, SLOT( rightBorder_changed() ) );
-    connect( borders, SIGNAL( leftSet(bool) ), this, SLOT( leftBorder_changed() ) );
-    connect( rotateTabularCB, SIGNAL( clicked() ), this, SLOT( rotateTabular() ) );
-    connect( rotateCellCB, SIGNAL( clicked() ), this, SLOT( rotateCell() ) );
-    connect( longTabularCB, SIGNAL( clicked() ), this, SLOT( longTabular() ) );
+	connect( borderUnsetPB, SIGNAL( clicked() ), this, SLOT( borderUnset_clicked() ) );
+	connect( longTabularCB, SIGNAL( toggled(bool) ), longtableGB, SLOT( setEnabled(bool) ) );
+	connect( longTabularCB, SIGNAL( toggled(bool) ), newpageCB, SLOT( setEnabled(bool) ) );
+	connect( hAlignCB, SIGNAL( activated(int) ), this, SLOT( hAlign_changed(int) ) );
+	connect( vAlignCB, SIGNAL( activated(int) ), this, SLOT( vAlign_changed(int) ) );
+	connect( multicolumnCB, SIGNAL( clicked() ), this, SLOT( multicolumn_clicked() ) );
+	connect( newpageCB, SIGNAL( clicked() ), this, SLOT( ltNewpage_clicked() ) );
+	connect( headerStatusCB, SIGNAL( clicked() ), this, SLOT( ltHeaderStatus_clicked() ) );
+	connect( headerBorderAboveCB, SIGNAL( clicked() ), this, SLOT( ltHeaderBorderAbove_clicked() ) );
+	connect( headerBorderBelowCB, SIGNAL( clicked() ), this, SLOT( ltHeaderBorderBelow_clicked() ) );
+	connect( firstheaderStatusCB, SIGNAL( clicked() ), this, SLOT( ltFirstHeaderStatus_clicked() ) );
+	connect( firstheaderBorderAboveCB, SIGNAL( clicked() ), this, SLOT( ltFirstHeaderBorderAbove_clicked() ) );
+	connect( firstheaderBorderBelowCB, SIGNAL( clicked() ), this, SLOT( ltFirstHeaderBorderBelow_clicked() ) );
+	connect( firstheaderNoContentsCB, SIGNAL( clicked() ), this, SLOT( ltFirstHeaderEmpty_clicked() ) );
+	connect( footerStatusCB, SIGNAL( clicked() ), this, SLOT( ltFooterStatus_clicked() ) );
+	connect( footerBorderAboveCB, SIGNAL( clicked() ), this, SLOT( ltFooterBorderAbove_clicked() ) );
+	connect( footerBorderBelowCB, SIGNAL( clicked() ), this, SLOT( ltFooterBorderBelow_clicked() ) );
+	connect( lastfooterStatusCB, SIGNAL( clicked() ), this, SLOT( ltLastFooterStatus_clicked() ) );
+	connect( lastfooterBorderAboveCB, SIGNAL( clicked() ), this, SLOT( ltLastFooterBorderAbove_clicked() ) );
+	connect( lastfooterBorderBelowCB, SIGNAL( clicked() ), this, SLOT( ltLastFooterBorderBelow_clicked() ) );
+	connect( lastfooterNoContentsCB, SIGNAL( clicked() ), this, SLOT( ltLastFooterEmpty_clicked() ) );
+	connect( specialAlignmentED, SIGNAL( returnPressed() ), this, SLOT( specialAlignment_changed() ) );
+	connect( widthED, SIGNAL( returnPressed() ), this, SLOT( width_changed() ) );
+	connect( widthUnit, SIGNAL( selectionChanged(LyXLength::UNIT) ), this, SLOT( width_changed() ) );
+	connect( closePB, SIGNAL( clicked() ), this, SLOT( close_clicked() ) );
+	connect( borders, SIGNAL( topSet(bool) ), this, SLOT( topBorder_changed() ) );
+	connect( borders, SIGNAL( bottomSet(bool) ), this, SLOT( bottomBorder_changed() ) );
+	connect( borders, SIGNAL( rightSet(bool) ), this, SLOT( rightBorder_changed() ) );
+	connect( borders, SIGNAL( leftSet(bool) ), this, SLOT( leftBorder_changed() ) );
+	connect( rotateTabularCB, SIGNAL( clicked() ), this, SLOT( rotateTabular() ) );
+	connect( rotateCellCB, SIGNAL( clicked() ), this, SLOT( rotateCell() ) );
+	connect( longTabularCB, SIGNAL( clicked() ), this, SLOT( longTabular() ) );
 }
 
 

Reply via email to