#include "insets/InsetTabular.h"
+#include "support/convert.h"
#include "support/debug.h"
#include <QCheckBox>
this, SLOT(checkEnabled()));
connect(rotateCellCB, SIGNAL(clicked()),
this, SLOT(checkEnabled()));
+ connect(rotateCellAngleSB, SIGNAL(valueChanged(int)),
+ this, SLOT(checkEnabled()));
connect(TableAlignCO, SIGNAL(activated(int)),
this, SLOT(checkEnabled()));
connect(longTabularCB, SIGNAL(clicked()),
bool const is_tabular_star = !tabularWidthED->text().isEmpty();
rotateTabularCB->setDisabled(is_tabular_star);
+ rotateCellAngleSB->setEnabled(rotateCellCB->isChecked());
+
bool const enable_valign =
!multirowCB->isChecked()
&& !widgetsToLength(columnWidthED, columnWidthUnitLC).empty()
setParam(param_str, Tabular::SET_ROTATE_TABULAR);
else
setParam(param_str, Tabular::UNSET_ROTATE_TABULAR);
- //
+ // store the cell rotation angle
+ string angle = convert<string>(rotateCellAngleSB->value());
if (rotateCellCB->isChecked())
- setParam(param_str, Tabular::SET_ROTATE_CELL);
+ setParam(param_str, Tabular::SET_ROTATE_CELL, angle);
else
- setParam(param_str, Tabular::UNSET_ROTATE_CELL);
+ setParam(param_str, Tabular::UNSET_ROTATE_CELL, angle);
//
if (longTabularCB->isChecked())
setParam(param_str, Tabular::SET_LONGTABULAR);
bool const multirow = tabular.isMultiRow(cell);
multirowCB->setChecked(multirow);
- rotateCellCB->setChecked(tabular.getRotateCell(cell));
+ rotateCellCB->setChecked(tabular.getRotateCell(cell) != 0);
+ if (tabular.getRotateCell(cell) != 0)
+ rotateCellAngleSB->setValue(tabular.getRotateCell(cell));
+ else
+ rotateCellAngleSB->setValue(90);
rotateTabularCB->setChecked(tabular.rotate);
longTabularCB->setChecked(tabular.is_long_tabular);