]> git.lyx.org Git - features.git/commitdiff
UI for XHTML options. I removed the xml line from OutputUi.ui
authorRichard Heck <rgheck@comcast.net>
Wed, 21 Apr 2010 15:20:31 +0000 (15:20 +0000)
committerRichard Heck <rgheck@comcast.net>
Wed, 21 Apr 2010 15:20:31 +0000 (15:20 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34251 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiDocument.cpp
src/frontends/qt4/GuiDocument.h
src/frontends/qt4/ui/OutputUi.ui

index f35b90bae01c1f5be2a40bc5fa24e7b123a62ac7..65f07914a3472dc7f26c77da2a8e9efe0b19a4f5 100644 (file)
@@ -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<BufferParams::MathOutput>(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);
index d5b70c4afedac202fa261bd2ecd24592cd688481..29eaa49a98ba1de0594beb670ff88b8ea716fe1f 100644 (file)
@@ -167,6 +167,7 @@ private:
        void useClassDefaults();
        ///
        void setLayoutComboByIDString(std::string const & idString);
+
        /// available classes
        GuiIdListModel classes_model_;
        /// available modules
index 27c223028c0110a9ab8a5eaead21ae3543b60a8e..6aa665848aef34d795b5fdc5c7b23cbd7898b6f2 100644 (file)
@@ -1,75 +1,75 @@
-<ui version="4.0" >
+<ui version="4.0">
  <class>OutputUi</class>
- <widget class="QWidget" name="OutputUi" >
-  <property name="geometry" >
+ <widget class="QWidget" name="OutputUi">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>271</width>
-    <height>295</height>
+    <width>310</width>
+    <height>386</height>
    </rect>
   </property>
-  <property name="windowTitle" >
+  <property name="windowTitle">
    <string>Form</string>
   </property>
-  <layout class="QGridLayout" >
-   <property name="margin" >
+  <layout class="QGridLayout">
+   <property name="margin">
     <number>9</number>
    </property>
-   <property name="spacing" >
+   <property name="spacing">
     <number>6</number>
    </property>
-   <item row="0" column="0" >
-    <widget class="QGroupBox" name="outputFormatGB" >
-     <property name="title" >
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="outputFormatGB">
+     <property name="title">
       <string>Output Format</string>
      </property>
-     <property name="flat" >
+     <property name="flat">
       <bool>true</bool>
      </property>
-     <layout class="QGridLayout" >
-      <property name="margin" >
+     <layout class="QGridLayout">
+      <property name="margin">
        <number>9</number>
       </property>
-      <property name="spacing" >
+      <property name="spacing">
        <number>6</number>
       </property>
-      <item row="1" column="0" >
-       <layout class="QHBoxLayout" >
-        <property name="margin" >
-         <number>0</number>
-        </property>
-        <property name="spacing" >
+      <item row="1" column="0">
+       <layout class="QHBoxLayout">
+        <property name="spacing">
          <number>6</number>
         </property>
+        <property name="margin">
+         <number>0</number>
+        </property>
         <item>
-         <widget class="QLabel" name="defaultFormatLA" >
-          <property name="toolTip" >
+         <widget class="QLabel" name="defaultFormatLA">
+          <property name="toolTip">
            <string>Specify the default output format (for view/update)</string>
           </property>
-          <property name="text" >
+          <property name="text">
            <string>De&amp;fault Output Format:</string>
           </property>
-          <property name="buddy" >
+          <property name="buddy">
            <cstring>defaultFormatCO</cstring>
           </property>
          </widget>
         </item>
         <item>
-         <widget class="QComboBox" name="defaultFormatCO" >
-          <property name="toolTip" >
+         <widget class="QComboBox" name="defaultFormatCO">
+          <property name="toolTip">
            <string>Specify the default output format (for view/update)</string>
           </property>
          </widget>
         </item>
        </layout>
       </item>
-      <item row="0" column="0" >
-       <widget class="QCheckBox" name="xetexCB" >
-        <property name="toolTip" >
+      <item row="0" column="0">
+       <widget class="QCheckBox" name="xetexCB">
+        <property name="toolTip">
          <string>Use the XeTeX processing engine</string>
         </property>
-        <property name="text" >
+        <property name="text">
          <string>Use &amp;XeTeX</string>
         </property>
        </widget>
      </layout>
     </widget>
    </item>
-   <item row="1" column="0" >
-    <spacer>
-     <property name="orientation" >
+   <item row="1" column="0">
+    <widget class="QGroupBox" name="xhtmlGB">
+     <property name="font">
+      <font>
+       <weight>75</weight>
+       <bold>true</bold>
+      </font>
+     </property>
+     <property name="title">
+      <string>XHTML Output Options</string>
+     </property>
+     <property name="flat">
+      <bool>true</bool>
+     </property>
+     <layout class="QGridLayout" name="outGridLayout">
+      <item row="0" column="0" colspan="2">
+       <widget class="QCheckBox" name="strictCB">
+        <property name="font">
+         <font>
+          <weight>50</weight>
+          <bold>false</bold>
+         </font>
+        </property>
+        <property name="toolTip">
+         <string>Whether to comply strictly with XHTML 1.1.</string>
+        </property>
+        <property name="text">
+         <string>Strict XHTML 1.1</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="mathoutLA">
+        <property name="font">
+         <font>
+          <weight>50</weight>
+          <bold>false</bold>
+         </font>
+        </property>
+        <property name="text">
+         <string>Math Output</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QComboBox" name="mathoutCB">
+        <property name="font">
+         <font>
+          <weight>50</weight>
+          <bold>false</bold>
+         </font>
+        </property>
+        <property name="toolTip">
+         <string>Format to use for math output.</string>
+        </property>
+        <item>
+         <property name="text">
+          <string>MathML</string>
+         </property>
+        </item>
+        <item>
+         <property name="text">
+          <string>HTML</string>
+         </property>
+        </item>
+        <item>
+         <property name="text">
+          <string>Images</string>
+         </property>
+        </item>
+        <item>
+         <property name="text">
+          <string>LaTeX</string>
+         </property>
+        </item>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="mathimgLA">
+        <property name="font">
+         <font>
+          <weight>50</weight>
+          <bold>false</bold>
+         </font>
+        </property>
+        <property name="text">
+         <string>Math Image Scaling</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1">
+       <widget class="QDoubleSpinBox" name="mathimgSB">
+        <property name="font">
+         <font>
+          <weight>50</weight>
+          <bold>false</bold>
+         </font>
+        </property>
+        <property name="toolTip">
+         <string>Scaling factor for images used for math output.</string>
+        </property>
+        <property name="minimum">
+         <double>0.100000000000000</double>
+        </property>
+        <property name="maximum">
+         <double>10.000000000000000</double>
+        </property>
+        <property name="singleStep">
+         <double>0.100000000000000</double>
+        </property>
+        <property name="value">
+         <double>1.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="2" column="0">
+    <spacer name="verticalSpacer">
+     <property name="orientation">
       <enum>Qt::Vertical</enum>
      </property>
-     <property name="sizeHint" >
+     <property name="sizeHint" stdset="0">
       <size>
        <width>20</width>
-       <height>20</height>
+       <height>40</height>
       </size>
      </property>
     </spacer>
   </layout>
  </widget>
  <includes>
-  <include location="local" >qt_i18n.h</include>
+  <include location="local">qt_i18n.h</include>
  </includes>
  <resources/>
  <connections/>