Further encoding GUI improvements

This commit is contained in:
Juergen Spitzmueller 2019-05-11 12:16:52 +02:00
parent e020a5f341
commit 83a62a6d74
2 changed files with 112 additions and 135 deletions

View File

@ -963,7 +963,7 @@ GuiDocument::GuiDocument(GuiView & lv)
langModule->encodingCO->addItem(qt_("ASCII"), toqstr("ascii")); langModule->encodingCO->addItem(qt_("ASCII"), toqstr("ascii"));
langModule->encodingCO->addItem(qt_("Custom"), toqstr("custom")); langModule->encodingCO->addItem(qt_("Custom"), toqstr("custom"));
// Always put the default encoding in the first position. // Always put the default encoding in the first position.
langModule->customEncodingCO->addItem(qt_("Language Default (no inputenc)"), langModule->customEncodingCO->addItem(qt_("Class Default"),
toqstr("auto-legacy-plain")); toqstr("auto-legacy-plain"));
QMap<QString,QString> encodingmap; QMap<QString,QString> encodingmap;
for (auto const & encvar : encodings) { for (auto const & encvar : encodings) {

View File

@ -7,43 +7,61 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>431</width> <width>431</width>
<height>286</height> <height>253</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string/> <string/>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout_3">
<item row="5" column="1"> <item row="0" column="0">
<spacer> <layout class="QGridLayout" name="gridLayout_2">
<property name="orientation"> <item row="0" column="0">
<enum>Qt::Vertical</enum> <widget class="QLabel" name="languageL">
</property> <property name="text">
<property name="sizeType"> <string>&amp;Language:</string>
<enum>QSizePolicy::Expanding</enum> </property>
</property> <property name="buddy">
<property name="sizeHint" stdset="0"> <cstring>languageCO</cstring>
<size> </property>
<width>71</width> </widget>
<height>171</height> </item>
</size> <item row="0" column="1">
</property> <widget class="QComboBox" name="languageCO">
</spacer> <property name="maxVisibleItems">
<number>20</number>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="typeL">
<property name="text">
<string>&amp;Quote style:</string>
</property>
<property name="buddy">
<cstring>quoteStyleCO</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="quoteStyleCO"/>
</item>
<item row="2" column="0">
<layout class="QHBoxLayout" name="horizontalLayout"/>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="dynamicQuotesCB">
<property name="toolTip">
<string>Output quotation marks that automatically adapt to the style selected above. If this is not selected, the quotation marks will stick with the style they have been inserted with.</string>
</property>
<property name="text">
<string>Use d&amp;ynamic quotation marks</string>
</property>
</widget>
</item>
</layout>
</item> </item>
<item row="4" column="3"> <item row="0" column="1" colspan="2">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>38</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="2">
<spacer> <spacer>
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
@ -59,26 +77,42 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="0" column="1"> <item row="1" column="0" colspan="2">
<widget class="QComboBox" name="languageCO"> <layout class="QGridLayout" name="gridLayout">
<property name="maxVisibleItems"> <item row="0" column="0">
<number>20</number> <widget class="QLabel" name="encodingLA">
</property> <property name="text">
</widget> <string>&amp;Encoding:</string>
</item> </property>
<item row="1" column="0"> <property name="buddy">
<widget class="QLabel" name="typeL"> <cstring>encodingCO</cstring>
<property name="text"> </property>
<string>&amp;Quote style:</string> </widget>
</property> </item>
<property name="buddy"> <item row="0" column="1">
<cstring>quoteStyleCO</cstring> <widget class="QComboBox" name="encodingCO">
</property> <property name="enabled">
</widget> <bool>true</bool>
</item> </property>
<item row="4" column="0" colspan="3"> <property name="toolTip">
<layout class="QHBoxLayout" name="horizontalLayout"> <string>Here you might adjust the output encoding (used for LaTeX files)</string>
<item> </property>
<property name="duplicatesEnabled">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QComboBox" name="customEncodingCO">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>If you selected a custom output encoding to the left, yo can specifiy it here</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="languagePackageLA"> <widget class="QLabel" name="languagePackageLA">
<property name="text"> <property name="text">
<string>Language pa&amp;ckage:</string> <string>Language pa&amp;ckage:</string>
@ -88,14 +122,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="1" column="1">
<widget class="QComboBox" name="languagePackageCO"> <widget class="QComboBox" name="languagePackageCO">
<property name="toolTip"> <property name="toolTip">
<string>Select which language package LyX should use</string> <string>Select which language package LyX should use</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="1" column="2">
<widget class="QLineEdit" name="languagePackageLE"> <widget class="QLineEdit" name="languagePackageLE">
<property name="toolTip"> <property name="toolTip">
<string>Enter the command to load the language package (default: \usepackage{babel})</string> <string>Enter the command to load the language package (default: \usepackage{babel})</string>
@ -104,91 +138,34 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="1" column="1"> <item row="1" column="2">
<widget class="QComboBox" name="quoteStyleCO"/> <spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>38</width>
<height>20</height>
</size>
</property>
</spacer>
</item> </item>
<item row="0" column="0"> <item row="2" column="0">
<widget class="QLabel" name="languageL"> <spacer>
<property name="text"> <property name="orientation">
<string>&amp;Language:</string> <enum>Qt::Vertical</enum>
</property> </property>
<property name="buddy"> <property name="sizeType">
<cstring>languageCO</cstring> <enum>QSizePolicy::Expanding</enum>
</property> </property>
</widget> <property name="sizeHint" stdset="0">
</item> <size>
<item row="3" column="0" colspan="3"> <width>71</width>
<widget class="QGroupBox" name="groupBox"> <height>171</height>
<property name="title"> </size>
<string>&amp;Encoding</string>
</property> </property>
<property name="flat"> </spacer>
<bool>true</bool>
</property>
<layout class="QGridLayout">
<property name="leftMargin">
<number>9</number>
</property>
<property name="topMargin">
<number>9</number>
</property>
<property name="rightMargin">
<number>9</number>
</property>
<property name="bottomMargin">
<number>9</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<item row="0" column="0">
<widget class="QComboBox" name="encodingCO">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip">
<string>Here you might adjust the output encoding (used for LaTeX files)</string>
</property>
<property name="duplicatesEnabled">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="customEncodingCO">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>If you selected a custom output encoding to the left, yo can specifiy it here</string>
</property>
</widget>
</item>
<item row="0" column="2">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="dynamicQuotesCB">
<property name="toolTip">
<string>Output quotation marks that automatically adapt to the style selected above. If this is not selected, the quotation marks will stick with the style they have been inserted with.</string>
</property>
<property name="text">
<string>Use d&amp;ynamic quotation marks</string>
</property>
</widget>
</item> </item>
</layout> </layout>
</widget> </widget>