connect(textLayoutModule->justCB, SIGNAL(clicked()),
this, SLOT(change_adaptor()));
+ connect(textLayoutModule->FormulaIndentCB, SIGNAL(toggled(bool)),
+ this, SLOT(change_adaptor()));
+ connect(textLayoutModule->FormulaIndentLE, SIGNAL(textChanged(const QString &)),
+ this, SLOT(change_adaptor()));
+ connect(textLayoutModule->FormulaIndentCO, SIGNAL(activated(int)),
+ this, SLOT(change_adaptor()));
+
+ textLayoutModule->FormulaIndentLE->setValidator(new LengthValidator(
+ textLayoutModule->FormulaIndentLE));
+ // initialize the length validator
+ bc().addCheckedLineEdit(textLayoutModule->FormulaIndentLE);
+
+ // LaTeX's default for FormulaIndent is 30pt
+ textLayoutModule->FormulaIndentCO->setCurrentItem(Length::PT);
+
textLayoutModule->lspacingLE->setValidator(new QDoubleValidator(
textLayoutModule->lspacingLE));
textLayoutModule->indentLE->setValidator(new LengthValidator(
this, SLOT(change_adaptor()));
connect(mathsModule->allPackagesNotPB, SIGNAL(clicked()),
this, SLOT(change_adaptor()));
- connect(mathsModule->FormulaIndentGB, SIGNAL(toggled(bool)),
- this, SLOT(change_adaptor()));
- connect(mathsModule->FormulaIndentLE, SIGNAL(textChanged(const QString &)),
- this, SLOT(change_adaptor()));
- connect(mathsModule->FormulaIndentCO, SIGNAL(activated(int)),
- this, SLOT(change_adaptor()));
-
- mathsModule->FormulaIndentLE->setValidator(new LengthValidator(
- mathsModule->FormulaIndentLE));
- // initialize the length validator
- bc().addCheckedLineEdit(mathsModule->FormulaIndentLE);
-
- // LaTeX's default for FormulaIndent is 30pt
- mathsModule->FormulaIndentCO->setCurrentItem(Length::PT);
// latex class
if (rb->isChecked())
bp_.use_package(it->first, BufferParams::package_off);
}
- bp_.is_formula_indent = mathsModule->FormulaIndentGB->isChecked();
+ bp_.is_formula_indent = textLayoutModule->FormulaIndentCB->isChecked();
// if formulas are indented
if (bp_.is_formula_indent) {
// fill value if empty to avoid LaTeX errors
- if (mathsModule->FormulaIndentLE->text().isEmpty())
- mathsModule->FormulaIndentLE->setText("0");
+ if (textLayoutModule->FormulaIndentLE->text().isEmpty())
+ textLayoutModule->FormulaIndentLE->setText("0");
HSpace FormulaIndentation = HSpace(
- widgetsToLength(mathsModule->FormulaIndentLE,
- mathsModule->FormulaIndentCO)
+ widgetsToLength(textLayoutModule->FormulaIndentLE,
+ textLayoutModule->FormulaIndentCO)
);
bp_.setFormulaIndentation(FormulaIndentation);
}
// math
if (bp_.is_formula_indent) {
- mathsModule->FormulaIndentGB->setChecked(bp_.is_formula_indent);
+ textLayoutModule->FormulaIndentCB->setChecked(bp_.is_formula_indent);
string FormulaIndentation = bp_.getFormulaIndentation().asLyXCommand();
if (!FormulaIndentation.empty()) {
- lengthToWidgets(mathsModule->FormulaIndentLE,
- mathsModule->FormulaIndentCO,
+ lengthToWidgets(textLayoutModule->FormulaIndentLE,
+ textLayoutModule->FormulaIndentCO,
FormulaIndentation, default_unit);
}
}