Add labels to encoding variant combo

This commit is contained in:
Juergen Spitzmueller 2023-05-13 18:38:33 +02:00
parent 75f628aec0
commit 90d40eb95e
2 changed files with 133 additions and 87 deletions

View File

@ -2536,6 +2536,18 @@ void GuiDocument::encodingSwitched(int i)
langModule->unicodeEncodingCO->setVisible(i == EncodingSets::unicode);
langModule->autoEncodingCO->setVisible(i == EncodingSets::legacy);
langModule->customEncodingCO->setVisible(i == EncodingSets::custom);
switch (i) {
case EncodingSets::unicode:
langModule->encodingVariantLA->setBuddy(langModule->unicodeEncodingCO);
break;
case EncodingSets::legacy:
langModule->encodingVariantLA->setBuddy(langModule->autoEncodingCO);
break;
case EncodingSets::custom:
langModule->encodingVariantLA->setBuddy(langModule->customEncodingCO);
break;
}
if (tex_fonts)
langModule->unicodeEncodingCO->setItemText(1, qt_("Direct (No inputenc)"));
else

View File

@ -7,13 +7,13 @@
<x>0</x>
<y>0</y>
<width>472</width>
<height>253</height>
<height>316</height>
</rect>
</property>
<property name="windowTitle">
<string/>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
@ -65,7 +65,7 @@
</item>
</layout>
</item>
<item row="0" column="1" colspan="2">
<item row="0" column="1">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
@ -81,88 +81,83 @@
</property>
</spacer>
</item>
<item row="1" column="0" colspan="2">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="encodingLA">
<property name="text">
<string>&amp;Encoding:</string>
</property>
<property name="buddy">
<cstring>encodingCO</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="encodingCO">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip">
<string>Select encoding of the generated LaTeX source (LaTeX input encoding).</string>
</property>
<property name="duplicatesEnabled">
<bool>false</bool>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="unicodeEncodingCO">
<property name="visible">
<bool>true</bool>
</property>
<property name="toolTip">
<string>Select Unicode encoding variant.</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="autoEncodingCO">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Specify whether to load the 'inputenc' package.</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="customEncodingCO">
<property name="visible">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Select custom encoding.</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="languagePackageLA">
<property name="text">
<string>Language pa&amp;ckage:</string>
</property>
<property name="buddy">
<cstring>languagePackageCO</cstring>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QComboBox" name="languagePackageCO">
<property name="toolTip">
<string>Select which language package LyX should use</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLineEdit" name="languagePackageLE">
<property name="toolTip">
<string>Enter the command to load the language package (default: \usepackage{babel})</string>
</property>
</widget>
</item>
</layout>
<item row="1" column="0">
<widget class="QGroupBox" name="encodingGB">
<property name="title">
<string>Encoding</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="encodingLA">
<property name="text">
<string>&amp;Type:</string>
</property>
<property name="buddy">
<cstring>encodingCO</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="encodingCO">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip">
<string>Select encoding of the generated LaTeX source (LaTeX input encoding).</string>
</property>
<property name="duplicatesEnabled">
<bool>false</bool>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="unicodeEncodingCO">
<property name="visible">
<bool>true</bool>
</property>
<property name="toolTip">
<string>Select Unicode encoding variant.</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="autoEncodingCO">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Specify whether to load the 'inputenc' package.</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="customEncodingCO">
<property name="visible">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Select custom encoding.</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="encodingVariantLA">
<property name="text">
<string>&amp;Variant:</string>
</property>
<property name="buddy">
<cstring>autoEncodingCO</cstring>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item row="1" column="2">
<item row="1" column="1">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
@ -175,7 +170,48 @@
</property>
</spacer>
</item>
<item row="2" column="0">
<item row="2" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="languagePackageLA">
<property name="text">
<string>Language pa&amp;ckage:</string>
</property>
<property name="buddy">
<cstring>languagePackageCO</cstring>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="languagePackageCO">
<property name="toolTip">
<string>Select which language package LyX should use</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="languagePackageLE">
<property name="toolTip">
<string>Enter the command to load the language package (default: \usepackage{babel})</string>
</property>
</widget>
</item>
<item>
<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>
</item>
<item row="3" column="0">
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
@ -196,8 +232,6 @@
<tabstops>
<tabstop>languageCO</tabstop>
<tabstop>quoteStyleCO</tabstop>
<tabstop>languagePackageCO</tabstop>
<tabstop>languagePackageLE</tabstop>
</tabstops>
<includes>
<include location="local">qt_i18n.h</include>