subsurface/desktop-widgets/preferences/preferences_language.ui
Michael Keller 5d7f294407 Desktop: Rework Setting of Custom Date / Time Formats.
Rework the setting of custom date / time format preferences:
- fix bug causing case changes if custom format case insensitively
  matches a drop down entry;
- fix invalid format examples in tooltip;
- update URL for the format documentation;
- add support for quoted literals to the format validity warning.
From discussion in
https://github.com/subsurface/subsurface/issues/3849#issuecomment-1481239270.

Signed-off-by: Michael Keller <github@ike.ch>
2023-05-30 11:24:37 +02:00

272 lines
7.8 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>PreferencesLanguage</class>
<widget class="QWidget" name="PreferencesLanguage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>621</width>
<height>523</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="language_group">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>UI language</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QCheckBox" name="languageSystemDefault">
<property name="text">
<string>Use system default</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="languageDropdown"/>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>203</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_14">
<property name="text">
<string>Filter</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="languageFilter"/>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="dateformat_group">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Date format</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QCheckBox" name="dateFormatSystemDefault">
<property name="text">
<string>Use UI language default</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="shortDateFormatEntry"/>
</item>
<item row="1" column="3">
<widget class="QLabel" name="label">
<property name="toolTip">
<string>This is used in places where there is less space to show the full date</string>
</property>
<property name="text">
<string>Short format</string>
</property>
</widget>
</item>
<item row="0" column="3">
<spacer name="horizontalSpacer2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>203</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="dateFormatEntry">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Preferred date format. Commonly used fields are&lt;/p&gt;&lt;p&gt;d (day of month)&lt;/p&gt;&lt;p&gt;ddd (abbreviated day name)&lt;/p&gt;&lt;p&gt;M (month number)&lt;/p&gt;&lt;p&gt;MMM (abbreviated month name)&lt;/p&gt;&lt;p&gt;yy/yyyy (2/4 digit year)&lt;/p&gt;&lt;p&gt;See https://doc.qt.io/archives/qt-4.8/qdatetime.html#fromString for full list.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="editable">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="timeformat_group">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Time format</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout3">
<item>
<widget class="QCheckBox" name="timeFormatSystemDefault">
<property name="text">
<string>Use UI language default</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="timeFormatEntry">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Preferred time format&lt;/p&gt;&lt;p&gt;Commonly used format specifiers are&lt;/p&gt;&lt;p&gt;h (hours)&lt;/p&gt;&lt;p&gt;hh (2 digit hours)&lt;/p&gt;&lt;p&gt;mm (2 digit minutes)&lt;/p&gt;&lt;p&gt;ss (2 digit seconds)&lt;/p&gt;&lt;p&gt;AP or ap (AM/PM or am/pm)&lt;/p&gt;&lt;p&gt;See https://doc.qt.io/archives/qt-4.8/qdatetime.html#fromString for full list.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="editable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>203</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>languageSystemDefault</sender>
<signal>toggled(bool)</signal>
<receiver>languageDropdown</receiver>
<slot>setDisabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>73</x>
<y>273</y>
</hint>
<hint type="destinationlabel">
<x>179</x>
<y>273</y>
</hint>
</hints>
</connection>
<connection>
<sender>languageSystemDefault</sender>
<signal>toggled(bool)</signal>
<receiver>languageFilter</receiver>
<slot>setDisabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>73</x>
<y>273</y>
</hint>
<hint type="destinationlabel">
<x>539</x>
<y>273</y>
</hint>
</hints>
</connection>
<connection>
<sender>dateFormatSystemDefault</sender>
<signal>toggled(bool)</signal>
<receiver>shortDateFormatEntry</receiver>
<slot>setDisabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>99</x>
<y>132</y>
</hint>
<hint type="destinationlabel">
<x>293</x>
<y>169</y>
</hint>
</hints>
</connection>
<connection>
<sender>dateFormatSystemDefault</sender>
<signal>toggled(bool)</signal>
<receiver>dateFormatEntry</receiver>
<slot>setDisabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>89</x>
<y>103</y>
</hint>
<hint type="destinationlabel">
<x>273</x>
<y>103</y>
</hint>
</hints>
</connection>
<connection>
<sender>timeFormatSystemDefault</sender>
<signal>toggled(bool)</signal>
<receiver>timeFormatEntry</receiver>
<slot>setDisabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>89</x>
<y>190</y>
</hint>
<hint type="destinationlabel">
<x>273</x>
<y>190</y>
</hint>
</hints>
</connection>
</connections>
</ui>