From d01dec6dfefe3757196ff9c628cbd25a02fe3cb4 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Wed, 21 Apr 2010 15:20:31 +0000 Subject: [PATCH] UI for XHTML options. I removed the xml line from OutputUi.ui git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34251 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiDocument.cpp | 19 +++ src/frontends/qt4/GuiDocument.h | 1 + src/frontends/qt4/ui/OutputUi.ui | 194 ++++++++++++++++++++++++------ 3 files changed, 176 insertions(+), 38 deletions(-) diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index f35b90bae0..65f07914a3 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -655,6 +655,12 @@ GuiDocument::GuiDocument(GuiView & lv) this, SLOT(xetexChanged(bool))); connect(outputModule->defaultFormatCO, SIGNAL(activated(int)), this, SLOT(change_adaptor())); + connect(outputModule->mathimgSB, SIGNAL(valueChanged(double)), + this, SLOT(change_adaptor())); + connect(outputModule->strictCB, SIGNAL(stateChanged(int)), + this, SLOT(change_adaptor())); + connect(outputModule->mathoutCB, SIGNAL(currentIndexChanged(int)), + this, SLOT(change_adaptor())); // fonts @@ -2255,6 +2261,15 @@ void GuiDocument::applyView() bool const xetex = outputModule->xetexCB->isChecked(); bp_.useXetex = xetex; + int mathfmt = outputModule->mathoutCB->currentIndex(); + if (mathfmt == -1) + mathfmt = 0; + BufferParams::MathOutput const mo = + static_cast(mathfmt); + bp_.html_math_output = mo; + bp_.html_be_strict = outputModule->strictCB->isChecked(); + bp_.html_math_img_scale = outputModule->mathimgSB->value(); + // fonts if (xetex) { if (fontModule->fontsRomanCO->currentIndex() == 0) @@ -2681,6 +2696,10 @@ void GuiDocument::paramsToDialog() outputModule->xetexCB->setChecked( bp_.baseClass()->outputType() == lyx::LATEX && bp_.useXetex); + outputModule->mathimgSB->setValue(bp_.html_math_img_scale); + outputModule->mathoutCB->setCurrentIndex(bp_.html_math_output); + outputModule->strictCB->setChecked(bp_.html_be_strict); + // Fonts updateFontsize(documentClass().opt_fontsize(), bp_.fontsize); diff --git a/src/frontends/qt4/GuiDocument.h b/src/frontends/qt4/GuiDocument.h index d5b70c4afe..29eaa49a98 100644 --- a/src/frontends/qt4/GuiDocument.h +++ b/src/frontends/qt4/GuiDocument.h @@ -167,6 +167,7 @@ private: void useClassDefaults(); /// void setLayoutComboByIDString(std::string const & idString); + /// available classes GuiIdListModel classes_model_; /// available modules diff --git a/src/frontends/qt4/ui/OutputUi.ui b/src/frontends/qt4/ui/OutputUi.ui index 27c223028c..6aa665848a 100644 --- a/src/frontends/qt4/ui/OutputUi.ui +++ b/src/frontends/qt4/ui/OutputUi.ui @@ -1,75 +1,75 @@ - + OutputUi - - + + 0 0 - 271 - 295 + 310 + 386 - + Form - - + + 9 - + 6 - - - + + + Output Format - + true - - + + 9 - + 6 - - - - 0 - - + + + 6 + + 0 + - - + + Specify the default output format (for view/update) - + De&fault Output Format: - + defaultFormatCO - - + + Specify the default output format (for view/update) - - - + + + Use the XeTeX processing engine - + Use &XeTeX @@ -77,15 +77,133 @@ - - - + + + + + 75 + true + + + + XHTML Output Options + + + true + + + + + + + 50 + false + + + + Whether to comply strictly with XHTML 1.1. + + + Strict XHTML 1.1 + + + + + + + + 50 + false + + + + Math Output + + + + + + + + 50 + false + + + + Format to use for math output. + + + + MathML + + + + + HTML + + + + + Images + + + + + LaTeX + + + + + + + + + 50 + false + + + + Math Image Scaling + + + + + + + + 50 + false + + + + Scaling factor for images used for math output. + + + 0.100000000000000 + + + 10.000000000000000 + + + 0.100000000000000 + + + 1.000000000000000 + + + + + + + + + Qt::Vertical - + 20 - 20 + 40 @@ -93,7 +211,7 @@ - qt_i18n.h + qt_i18n.h -- 2.39.2