forked from mirror/openmw-tes3mp
Removed standard window size combobox. Rearranged widgets.
This commit is contained in:
parent
52354b14fc
commit
5dfcd2ed01
4 changed files with 98 additions and 119 deletions
|
@ -371,21 +371,22 @@ void CSMSettings::UserSettings::loadSettings (const QString &fileName)
|
||||||
|
|
||||||
QStringList CSMSettings::UserSettings::getOgreRenderers()
|
QStringList CSMSettings::UserSettings::getOgreRenderers()
|
||||||
{
|
{
|
||||||
QStringList result;
|
if(mOgreRenderers.empty())
|
||||||
|
{
|
||||||
|
Ogre::RenderSystemList renderers = Ogre::Root::getSingleton().getAvailableRenderers();
|
||||||
|
Ogre::RenderSystemList::iterator it = renderers.begin();
|
||||||
|
for(; it != renderers.end(); ++it)
|
||||||
|
mOgreRenderers.append((*it)->getName().c_str());
|
||||||
|
}
|
||||||
|
|
||||||
Ogre::RenderSystemList renderers = Ogre::Root::getSingleton().getAvailableRenderers();
|
return mOgreRenderers;
|
||||||
Ogre::RenderSystemList::iterator it = renderers.begin();
|
|
||||||
for(; it != renderers.end(); ++it)
|
|
||||||
result.append((*it)->getName().c_str());
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList CSMSettings::UserSettings::getOgreOptions(const QString &key, const QString &renderer)
|
QStringList CSMSettings::UserSettings::getOgreOptions(const QString &key, const QString &renderer)
|
||||||
{
|
{
|
||||||
QStringList result;
|
QStringList result;
|
||||||
|
|
||||||
Ogre::RenderSystem *rend = Ogre::Root::getSingleton().getRenderSystem();
|
Ogre::RenderSystem *rend = Ogre::Root::getSingleton().getRenderSystemByName(renderer.toStdString());
|
||||||
if(!rend)
|
if(!rend)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,8 @@ namespace CSMSettings {
|
||||||
QSettings *mSettingDefinitions;
|
QSettings *mSettingDefinitions;
|
||||||
QSettings *mSettingCfgDefinitions;
|
QSettings *mSettingCfgDefinitions;
|
||||||
QList <Setting *> mSettings;
|
QList <Setting *> mSettings;
|
||||||
|
QStringList mOgreRenderers;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
|
@ -154,7 +154,7 @@ CSVSettings::SettingsDialog::SettingsDialog(QTabWidget *parent)
|
||||||
|
|
||||||
connect(cbOverride, SIGNAL(toggled(bool)), this, SLOT(slotOverrideToggled(bool)));
|
connect(cbOverride, SIGNAL(toggled(bool)), this, SLOT(slotOverrideToggled(bool)));
|
||||||
connect(cmbRenderSys, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(slotRendererChanged(const QString&)));
|
connect(cmbRenderSys, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(slotRendererChanged(const QString&)));
|
||||||
connect(rbStdWinSize, SIGNAL(toggled(bool)), this, SLOT(slotStandardToggled(bool)));
|
//connect(rbStdWinSize, SIGNAL(toggled(bool)), this, SLOT(slotStandardToggled(bool)));
|
||||||
|
|
||||||
// to update the checkbox on the view menu
|
// to update the checkbox on the view menu
|
||||||
connect(cbStatusBar, SIGNAL(toggled(bool)), this, SIGNAL (toggleStatusBar(bool)));
|
connect(cbStatusBar, SIGNAL(toggled(bool)), this, SIGNAL (toggleStatusBar(bool)));
|
||||||
|
@ -167,9 +167,9 @@ bool CSVSettings::SettingsDialog::eventFilter(QObject *target, QEvent *event)
|
||||||
{
|
{
|
||||||
if (!item->isEnabled() && (event->type() == QEvent::MouseButtonRelease))
|
if (!item->isEnabled() && (event->type() == QEvent::MouseButtonRelease))
|
||||||
{
|
{
|
||||||
rbCustWinSize->setChecked(false);
|
//rbCustWinSize->setChecked(false);
|
||||||
rbStdWinSize->setChecked(true);
|
//rbStdWinSize->setChecked(true);
|
||||||
slotStandardToggled(true);
|
//slotStandardToggled(true);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -178,9 +178,9 @@ bool CSVSettings::SettingsDialog::eventFilter(QObject *target, QEvent *event)
|
||||||
{
|
{
|
||||||
if (!item->isEnabled() && (event->type() == QEvent::MouseButtonPress))
|
if (!item->isEnabled() && (event->type() == QEvent::MouseButtonPress))
|
||||||
{
|
{
|
||||||
rbStdWinSize->setChecked(false);
|
//rbStdWinSize->setChecked(false);
|
||||||
rbCustWinSize->setChecked(true);
|
//rbCustWinSize->setChecked(true);
|
||||||
slotStandardToggled(false);
|
//slotStandardToggled(false);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -307,7 +307,7 @@ void CSVSettings::SettingsDialog::setViewValues()
|
||||||
if(index != -1)
|
if(index != -1)
|
||||||
cmbStdWinSize->setCurrentIndex(index);
|
cmbStdWinSize->setCurrentIndex(index);
|
||||||
|
|
||||||
rbCustWinSize->setChecked(true);
|
//rbCustWinSize->setChecked(true);
|
||||||
slotStandardToggled(false);
|
slotStandardToggled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -369,11 +369,11 @@ void CSVSettings::SettingsDialog::saveSettings()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// shader lang
|
// shader lang
|
||||||
mModel->setDefinitions("Shader/language",
|
mModel->setDefinitions("General/shader mode",
|
||||||
QStringList(cmbShaderLang->currentText().toLower()));
|
QStringList(cmbShaderLang->currentText().toLower()));
|
||||||
|
|
||||||
// window size
|
// window size
|
||||||
if(rbStdWinSize->isChecked())
|
if(0) //rbStdWinSize->isChecked())
|
||||||
{
|
{
|
||||||
QRegExp re("^(\\d+) x (\\d+)");
|
QRegExp re("^(\\d+) x (\\d+)");
|
||||||
if(re.indexIn(cmbStdWinSize->currentText()) > -1)
|
if(re.indexIn(cmbStdWinSize->currentText()) > -1)
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<string>User Settings</string>
|
<string>User Settings</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="VideoSettings">
|
<widget class="QWidget" name="VideoSettings">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
@ -76,18 +76,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="1">
|
<item row="5" column="1">
|
||||||
<widget class="QComboBox" name="cmbShaderLang">
|
<widget class="QComboBox" name="cmbShaderLang"/>
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>GLSL</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>CG</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1">
|
<item row="4" column="1">
|
||||||
<widget class="QComboBox" name="cmbAntiAlias"/>
|
<widget class="QComboBox" name="cmbAntiAlias"/>
|
||||||
|
@ -110,78 +99,6 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="layoutWidget_Window">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>20</x>
|
|
||||||
<y>188</y>
|
|
||||||
<width>351</width>
|
|
||||||
<height>51</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_Window">
|
|
||||||
<item row="1" column="3">
|
|
||||||
<widget class="QSpinBox" name="sbHeight">
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2">
|
|
||||||
<widget class="QSpinBox" name="sbWidth">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>186</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2" colspan="2">
|
|
||||||
<widget class="QComboBox" name="cmbStdWinSize">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>180</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QRadioButton" name="rbCustWinSize">
|
|
||||||
<property name="text">
|
|
||||||
<string>Custom:</string>
|
|
||||||
</property>
|
|
||||||
<attribute name="buttonGroup">
|
|
||||||
<string notr="true">buttonGroup</string>
|
|
||||||
</attribute>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QLabel" name="label_Resolution">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QRadioButton" name="rbStdWinSize">
|
|
||||||
<property name="text">
|
|
||||||
<string>Standard:</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<attribute name="buttonGroup">
|
|
||||||
<string notr="true">buttonGroup</string>
|
|
||||||
</attribute>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QGroupBox" name="displayGroup_Render">
|
<widget class="QGroupBox" name="displayGroup_Render">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
|
@ -195,23 +112,22 @@
|
||||||
<string>Render System</string>
|
<string>Render System</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QGroupBox" name="displayGroup_Window">
|
<widget class="QGroupBox" name="groupBox">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>9</x>
|
||||||
<y>170</y>
|
<y>169</y>
|
||||||
<width>371</width>
|
<width>371</width>
|
||||||
<height>81</height>
|
<height>101</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Window Size</string>
|
<string>Shader</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<zorder>displayGroup_Render</zorder>
|
<zorder>displayGroup_Render</zorder>
|
||||||
<zorder>layoutWidget_Render</zorder>
|
<zorder>layoutWidget_Render</zorder>
|
||||||
<zorder>displayGroup_Window</zorder>
|
<zorder>groupBox</zorder>
|
||||||
<zorder>layoutWidget_Window</zorder>
|
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="DisplaySetttings">
|
<widget class="QWidget" name="DisplaySetttings">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
@ -229,7 +145,7 @@
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Display Format</string>
|
<string>Display Format</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="">
|
<widget class="QWidget" name="layoutWidget">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
|
@ -298,9 +214,9 @@
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>9</x>
|
<x>9</x>
|
||||||
<y>140</y>
|
<y>160</y>
|
||||||
<width>371</width>
|
<width>371</width>
|
||||||
<height>111</height>
|
<height>101</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
|
@ -311,7 +227,7 @@
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>21</x>
|
<x>21</x>
|
||||||
<y>160</y>
|
<y>180</y>
|
||||||
<width>351</width>
|
<width>351</width>
|
||||||
<height>71</height>
|
<height>71</height>
|
||||||
</rect>
|
</rect>
|
||||||
|
@ -363,11 +279,56 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QGroupBox" name="displayGroup_Window">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>100</y>
|
||||||
|
<width>191</width>
|
||||||
|
<height>51</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Window Size</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="layoutWidget">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>171</width>
|
||||||
|
<height>22</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_4">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QSpinBox" name="sbWidth">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>186</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QSpinBox" name="sbHeight">
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
<widget class="QCheckBox" name="cbStatusBar">
|
<widget class="QCheckBox" name="cbStatusBar">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>20</x>
|
<x>240</x>
|
||||||
<y>110</y>
|
<y>120</y>
|
||||||
<width>102</width>
|
<width>102</width>
|
||||||
<height>17</height>
|
<height>17</height>
|
||||||
</rect>
|
</rect>
|
||||||
|
@ -376,16 +337,31 @@
|
||||||
<string>Show Status Bar</string>
|
<string>Show Status Bar</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
<zorder>displayGroup_Window</zorder>
|
||||||
|
<zorder>displayGroup_DisplayFormat</zorder>
|
||||||
|
<zorder>displayGroup_Subviews</zorder>
|
||||||
|
<zorder>layoutWidget2</zorder>
|
||||||
|
<zorder>cbStatusBar</zorder>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="MiscSettings">
|
<widget class="QWidget" name="MiscSettings">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Misc Settings</string>
|
<string>Misc Settings</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
<widget class="QComboBox" name="cmbStdWinSize">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>70</x>
|
||||||
|
<y>100</y>
|
||||||
|
<width>69</width>
|
||||||
|
<height>22</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
<buttongroups>
|
|
||||||
<buttongroup name="buttonGroup"/>
|
|
||||||
</buttongroups>
|
|
||||||
</ui>
|
</ui>
|
||||||
|
|
Loading…
Reference in a new issue