outputModule->synccustomCB->addItem("\\synctex=-1");
outputModule->synccustomCB->addItem("\\usepackage[active]{srcltx}");
+ outputModule->synccustomCB->setValidator(new NoNewLineValidator(
+ outputModule->synccustomCB));
+
// fonts
fontModule = new UiWidget<Ui::FontUi>;
connect(fontModule->osFontsCB, SIGNAL(clicked()),
connect(fontModule->fontOsfCB, SIGNAL(clicked()),
this, SLOT(change_adaptor()));
+ fontModule->fontencLE->setValidator(new NoNewLineValidator(
+ fontModule->fontencLE));
+ fontModule->cjkFontLE->setValidator(new NoNewLineValidator(
+ fontModule->cjkFontLE));
+
updateFontlist();
fontModule->fontsizeCO->addItem(qt_("Default"));
this, SLOT(change_adaptor()));
connect(langModule->languagePackageCO, SIGNAL(activated(int)),
this, SLOT(change_adaptor()));
- connect(langModule->languagePackageED, SIGNAL(textChanged(QString)),
+ connect(langModule->languagePackageLE, SIGNAL(textChanged(QString)),
this, SLOT(change_adaptor()));
connect(langModule->languagePackageCO, SIGNAL(currentIndexChanged(int)),
this, SLOT(languagePackageChanged(int)));
+ langModule->languagePackageLE->setValidator(new NoNewLineValidator(
+ langModule->languagePackageLE));
+
QAbstractItemModel * language_model = guiApp->languageModel();
// FIXME: it would be nice if sorting was enabled/disabled via a checkbox.
language_model->sort(0);
this, SLOT(change_adaptor()));
connect(biblioModule->bibtexCO, SIGNAL(activated(int)),
this, SLOT(bibtexChanged(int)));
- connect(biblioModule->bibtexOptionsED, SIGNAL(textChanged(QString)),
+ connect(biblioModule->bibtexOptionsLE, SIGNAL(textChanged(QString)),
this, SLOT(change_adaptor()));
+ biblioModule->bibtexOptionsLE->setValidator(new NoNewLineValidator(
+ biblioModule->bibtexOptionsLE));
+
biblioModule->citeStyleCO->addItem(qt_("Author-year"));
biblioModule->citeStyleCO->addItem(qt_("Numerical"));
biblioModule->citeStyleCO->setCurrentIndex(0);
connect(latexModule->refstyleCB, SIGNAL(clicked()),
this, SLOT(change_adaptor()));
+ latexModule->optionsLE->setValidator(new NoNewLineValidator(
+ latexModule->optionsLE));
+ latexModule->childDocLE->setValidator(new NoNewLineValidator(
+ latexModule->childDocLE));
+
// postscript drivers
for (int n = 0; tex_graphics[n][0]; ++n) {
QString enc = qt_(tex_graphics_gui[n]);
connect(pdfSupportModule->optionsLE, SIGNAL(textChanged(QString)),
this, SLOT(change_adaptor()));
+ pdfSupportModule->titleLE->setValidator(new NoNewLineValidator(
+ pdfSupportModule->titleLE));
+ pdfSupportModule->authorLE->setValidator(new NoNewLineValidator(
+ pdfSupportModule->authorLE));
+ pdfSupportModule->subjectLE->setValidator(new NoNewLineValidator(
+ pdfSupportModule->subjectLE));
+ pdfSupportModule->keywordsLE->setValidator(new NoNewLineValidator(
+ pdfSupportModule->keywordsLE));
+ pdfSupportModule->optionsLE->setValidator(new NoNewLineValidator(
+ pdfSupportModule->optionsLE));
+
for (int i = 0; backref_opts[i][0]; ++i)
pdfSupportModule->backrefCO->addItem(qt_(backref_opts_gui[i]));
void GuiDocument::languagePackageChanged(int i)
{
- langModule->languagePackageED->setEnabled(
+ langModule->languagePackageLE->setEnabled(
langModule->languagePackageCO->itemData(i).toString() == "custom");
}
void GuiDocument::bibtexChanged(int n)
{
- biblioModule->bibtexOptionsED->setEnabled(
+ biblioModule->bibtexOptionsLE->setEnabled(
biblioModule->bibtexCO->itemData(n).toString() != "default");
changed();
}
fromqstr(biblioModule->bibtexCO->itemData(
biblioModule->bibtexCO->currentIndex()).toString());
string const bibtex_options =
- fromqstr(biblioModule->bibtexOptionsED->text());
+ fromqstr(biblioModule->bibtexOptionsLE->text());
if (bibtex_command == "default" || bibtex_options.empty())
bp_.bibtex_command = bibtex_command;
else
langModule->languagePackageCO->currentIndex()).toString();
if (pack == "custom")
bp_.lang_package =
- fromqstr(langModule->languagePackageED->text());
+ fromqstr(langModule->languagePackageLE->text());
else
bp_.lang_package = fromqstr(pack);
int const bpos = biblioModule->bibtexCO->findData(toqstr(command));
if (bpos != -1) {
biblioModule->bibtexCO->setCurrentIndex(bpos);
- biblioModule->bibtexOptionsED->setText(toqstr(options).trimmed());
+ biblioModule->bibtexOptionsLE->setText(toqstr(options).trimmed());
} else {
// We reset to default if we do not know the specified compiler
// This is for security reasons
biblioModule->bibtexCO->setCurrentIndex(
biblioModule->bibtexCO->findData(toqstr("default")));
- biblioModule->bibtexOptionsED->clear();
+ biblioModule->bibtexOptionsLE->clear();
}
- biblioModule->bibtexOptionsED->setEnabled(
+ biblioModule->bibtexOptionsLE->setEnabled(
biblioModule->bibtexCO->currentIndex() != 0);
// indices
if (p == -1) {
langModule->languagePackageCO->setCurrentIndex(
langModule->languagePackageCO->findData("custom"));
- langModule->languagePackageED->setText(toqstr(bp_.lang_package));
+ langModule->languagePackageLE->setText(toqstr(bp_.lang_package));
} else {
langModule->languagePackageCO->setCurrentIndex(p);
- langModule->languagePackageED->clear();
+ langModule->languagePackageLE->clear();
}
//color