dialog_->widthED->setEnabled(!isReadonly);
dialog_->widthUnit->setEnabled(!isReadonly);
+ dialog_->hAlignCB->clear();
+ dialog_->hAlignCB->insertItem(_("Left"));
+ dialog_->hAlignCB->insertItem(_("Center"));
+ dialog_->hAlignCB->insertItem(_("Right"));
+ if (!multicol && !pwidth.zero())
+ dialog_->hAlignCB->insertItem(_("Block"));
+
int align = 0;
switch (tabular->GetAlignment(cell)) {
case LYX_ALIGN_LEFT:
- align = 1;
+ align = 0;
break;
case LYX_ALIGN_CENTER:
- align = 2;
+ align = 1;
break;
case LYX_ALIGN_RIGHT:
- align = 3;
+ align = 2;
break;
+ case LYX_ALIGN_BLOCK:
+ {
+ if (!multicol && !pwidth.zero())
+ align = 3;
+ break;
+ }
default:
align = 0;
break;
form_->controller().set(LyXTabular::SET_ALL_LINES);
form_->update_borders();
form_->changed();
+ //FIXME: qsetborder widget not updated
}
void QTabularDialog::borderUnset_clicked()
form_->controller().set(LyXTabular::UNSET_ALL_LINES);
form_->update_borders();
form_->changed();
+ //FIXME: qsetborder widget not updated
}
void QTabularDialog::width_changed()
{
- string const width =
- LyXLength(widthED->text().toDouble(),
- widthUnit->currentLengthItem()).asString();
+ string const width =
+ LyXLength(widthED->text().toDouble(),
+ widthUnit->currentLengthItem()).asString();
if (form_->controller().isMulticolumnCell())
form_->controller().set(LyXTabular::SET_MPWIDTH, width);
else
form_->controller().set(LyXTabular::SET_PWIDTH, width);
+ form_->changed();
+ form_->update_contents();
}
{
form_->controller().set(LyXTabular::MULTICOLUMN);
form_->changed();
+ form_->update_contents();
}
void QTabularDialog::hAlign_changed(int align)
{
- LyXTabular::Feature num = LyXTabular::ALIGN_BLOCK;
+ LyXTabular::Feature num = LyXTabular::ALIGN_LEFT;
LyXTabular::Feature multi_num = LyXTabular::M_ALIGN_LEFT;
switch (align) {
case 0:
- {
- num = LyXTabular::ALIGN_BLOCK;
- //FIXME: multi_num no equivalent
- break;
- }
- case 1:
{
num = LyXTabular::ALIGN_LEFT;
multi_num = LyXTabular::M_ALIGN_LEFT;
break;
}
- case 2:
+ case 1:
{
num = LyXTabular::ALIGN_CENTER;
multi_num = LyXTabular::M_ALIGN_CENTER;
break;
}
- case 3:
+ case 2:
{
num = LyXTabular::ALIGN_RIGHT;
multi_num = LyXTabular::M_ALIGN_RIGHT;
break;
+ case 3:
+ {
+ num = LyXTabular::ALIGN_BLOCK;
+ //multi_num: no equivalent
+ break;
+ }
}
}
if (form_->controller().isMulticolumnCell())
void QTabularDialog::vAlign_changed(int align)
{
- LyXTabular::Feature num = LyXTabular::ALIGN_BLOCK;
- LyXTabular::Feature multi_num = LyXTabular::M_ALIGN_LEFT;
+ LyXTabular::Feature num = LyXTabular::VALIGN_CENTER;
+ LyXTabular::Feature multi_num = LyXTabular::M_VALIGN_CENTER;
switch (align) {
case 0:
<name>text</name>
<string>A&dd</string>
</property>
+ <property stdset="1">
+ <name>autoDefault</name>
+ <bool>false</bool>
+ </property>
<property>
<name>toolTip</name>
<string>Append column (right)</string>
<name>text</name>
<string>De&lete</string>
</property>
+ <property stdset="1">
+ <name>autoDefault</name>
+ <bool>false</bool>
+ </property>
<property>
<name>toolTip</name>
<string>Delete current column</string>
<name>text</name>
<string>&Add</string>
</property>
+ <property stdset="1">
+ <name>autoDefault</name>
+ <bool>false</bool>
+ </property>
<property>
<name>toolTip</name>
<string>Append row (below)</string>
<name>text</name>
<string>Dele&te</string>
</property>
+ <property stdset="1">
+ <name>autoDefault</name>
+ <bool>false</bool>
+ </property>
<property>
<name>toolTip</name>
<string>Delete this row</string>