#endif
#include "ControlTabular.h"
-
+
#include "QTabular.h"
#include "QTabularDialog.h"
#include "tabular.h"
form_->controller().set(LyXTabular::APPEND_COLUMN);
}
-
+
void QTabularDialog::rowAppend_clicked()
{
form_->controller().set(LyXTabular::APPEND_ROW);
}
-
+
void QTabularDialog::columnDelete_clicked()
{
form_->controller().set(LyXTabular::DELETE_COLUMN);
}
-
+
void QTabularDialog::rowDelete_clicked()
{
form_->controller().set(LyXTabular::DELETE_ROW);
}
-
+
void QTabularDialog::borderSet_clicked()
{
form_->controller().set(LyXTabular::SET_ALL_LINES);
form_->update_borders();
form_->changed();
}
-
+
void QTabularDialog::leftBorder_changed()
{
{
string const width =
LyXLength(widthED->text().toDouble(),
- widthUnit->currentLengthItem()).asString();
+ 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: