forked from teamnwah/openmw-tes3coop
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
|
// status bar
|
||||||
cbStatusBar->setChecked(mModel->settingValue("Display/show statusbar") == "true");
|
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()
|
void CSVSettings::SettingsDialog::saveSettings()
|
||||||
|
@ -381,6 +392,12 @@ void CSVSettings::SettingsDialog::saveSettings()
|
||||||
else
|
else
|
||||||
mModel->setDefinitions("Display/show statusbar", QStringList("false"));
|
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();
|
mModel->saveDefinitions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -227,24 +227,88 @@
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Display Settings</string>
|
<string>Display Settings</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<widget class="QGroupBox" name="groupBox">
|
<widget class="QGroupBox" name="displayGroup_DisplayFormat">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>10</y>
|
<y>10</y>
|
||||||
<width>371</width>
|
<width>371</width>
|
||||||
<height>71</height>
|
<height>81</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="title">
|
<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>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QGroupBox" name="groupBox_2">
|
</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="displayGroup_Subviews">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>9</x>
|
<x>9</x>
|
||||||
<y>110</y>
|
<y>140</y>
|
||||||
<width>371</width>
|
<width>371</width>
|
||||||
<height>111</height>
|
<height>111</height>
|
||||||
</rect>
|
</rect>
|
||||||
|
@ -253,51 +317,11 @@
|
||||||
<string>Subviews</string>
|
<string>Subviews</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</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">
|
<widget class="QWidget" name="layoutWidget2">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>21</x>
|
<x>21</x>
|
||||||
<y>130</y>
|
<y>160</y>
|
||||||
<width>351</width>
|
<width>351</width>
|
||||||
<height>71</height>
|
<height>71</height>
|
||||||
</rect>
|
</rect>
|
||||||
|
@ -349,10 +373,19 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<zorder>groupBox_2</zorder>
|
<widget class="QCheckBox" name="cbStatusBar">
|
||||||
<zorder>groupBox</zorder>
|
<property name="geometry">
|
||||||
<zorder>layoutWidget</zorder>
|
<rect>
|
||||||
<zorder>layoutWidget2</zorder>
|
<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>
|
||||||
<widget class="QWidget" name="MiscSettings">
|
<widget class="QWidget" name="MiscSettings">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
|
Loading…
Reference in a new issue