mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-20 20:53:53 +00:00
Display format settings working.
This commit is contained in:
parent
d9b0c81299
commit
575780ec0d
2 changed files with 100 additions and 50 deletions
|
@ -309,6 +309,17 @@ void CSVSettings::SettingsDialog::setViewValues()
|
|||
|
||||
// status bar
|
||||
cbStatusBar->setChecked(mModel->settingValue("Display/show statusbar") == "true");
|
||||
|
||||
// display format
|
||||
QString recStat = mModel->settingValue("Display Format/Record Status Display");
|
||||
index = cmbRecStatus->findData(recStat, Qt::DisplayRole);
|
||||
if(index != -1)
|
||||
cmbRecStatus->setCurrentIndex(index);
|
||||
|
||||
QString refIdType = mModel->settingValue("Display Format/Referenceable ID Type Display");
|
||||
index = cmbRefIdType->findData(refIdType, Qt::DisplayRole);
|
||||
if(index != -1)
|
||||
cmbRefIdType->setCurrentIndex(index);
|
||||
}
|
||||
|
||||
void CSVSettings::SettingsDialog::saveSettings()
|
||||
|
@ -381,6 +392,12 @@ void CSVSettings::SettingsDialog::saveSettings()
|
|||
else
|
||||
mModel->setDefinitions("Display/show statusbar", QStringList("false"));
|
||||
|
||||
// display format
|
||||
mModel->setDefinitions("Display Format/Record Status Display",
|
||||
QStringList(cmbRecStatus->currentText()));
|
||||
mModel->setDefinitions("Display Format/Referenceable ID Type Display",
|
||||
QStringList(cmbRefIdType->currentText()));
|
||||
|
||||
mModel->saveDefinitions();
|
||||
}
|
||||
|
||||
|
|
|
@ -227,24 +227,88 @@
|
|||
<attribute name="title">
|
||||
<string>Display Settings</string>
|
||||
</attribute>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<widget class="QGroupBox" name="displayGroup_DisplayFormat">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>371</width>
|
||||
<height>71</height>
|
||||
<height>81</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
<string>Display Format</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>20</y>
|
||||
<width>351</width>
|
||||
<height>48</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="labRecStatus">
|
||||
<property name="text">
|
||||
<string>Record Status:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="cmbRecStatus">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Text Only</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Icon Only</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Icon and Text</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="labRefIdType">
|
||||
<property name="text">
|
||||
<string>Referenceable ID Type:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="cmbRefIdType">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Text Only</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Icon Only</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Icon and Text</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<widget class="QGroupBox" name="displayGroup_Subviews">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>9</x>
|
||||
<y>110</y>
|
||||
<y>140</y>
|
||||
<width>371</width>
|
||||
<height>111</height>
|
||||
</rect>
|
||||
|
@ -253,51 +317,11 @@
|
|||
<string>Subviews</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>21</x>
|
||||
<y>20</y>
|
||||
<width>351</width>
|
||||
<height>45</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_ShowIcon">
|
||||
<property name="text">
|
||||
<string>Display Format:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="comboBox_show_icon">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Text Only</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Text + Icon</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="cbStatusBar">
|
||||
<property name="text">
|
||||
<string>Show Status Bar</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="layoutWidget2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>21</x>
|
||||
<y>130</y>
|
||||
<y>160</y>
|
||||
<width>351</width>
|
||||
<height>71</height>
|
||||
</rect>
|
||||
|
@ -349,10 +373,19 @@
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<zorder>groupBox_2</zorder>
|
||||
<zorder>groupBox</zorder>
|
||||
<zorder>layoutWidget</zorder>
|
||||
<zorder>layoutWidget2</zorder>
|
||||
<widget class="QCheckBox" name="cbStatusBar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>110</y>
|
||||
<width>102</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Show Status Bar</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QWidget" name="MiscSettings">
|
||||
<attribute name="title">
|
||||
|
|
Loading…
Reference in a new issue