Code cleanup and revert incorrect settings.

This commit is contained in:
cc9cii 2014-09-24 22:41:49 +10:00
parent fdf375fb4d
commit 66852d5392
9 changed files with 251 additions and 528 deletions

View file

@ -314,7 +314,14 @@ std::auto_ptr<sh::Factory> CS::Editor::setupGraphics()
factory->loadAllFiles(); factory->loadAllFiles();
std::string fog("true"); // default if setting does not exist bool shaders = true; // default if setting does not exist
if(mUserSettings.hasSettingDefinitions("Objects/shaders"))
shaders = mUserSettings.settingValue("Objects/shaders").toStdString() == "true" ? true : false;
else
mUserSettings.setDefinitions("Objects/shaders", (QStringList() << QString(shaders ? "true" : "false")));
sh::Factory::getInstance ().setShadersEnabled (shaders);
std::string fog("true");
if(mUserSettings.hasSettingDefinitions("Shader/fog")) if(mUserSettings.hasSettingDefinitions("Shader/fog"))
fog = mUserSettings.settingValue("Shader/fog").toStdString(); fog = mUserSettings.settingValue("Shader/fog").toStdString();
else else
@ -323,7 +330,7 @@ std::auto_ptr<sh::Factory> CS::Editor::setupGraphics()
std::string shadows("false"); std::string shadows("false");
if(mUserSettings.hasSettingDefinitions("Shader/shadows")) if(mUserSettings.hasSettingDefinitions("Shader/shadows"))
shadows = mUserSettings.settingValue("Shader/shadows").toStdString(); shadows = shaders? mUserSettings.settingValue("Shader/shadows").toStdString() : "false";
else else
mUserSettings.setDefinitions("Shader/shadows", (QStringList() << QString(shadows.c_str()))); mUserSettings.setDefinitions("Shader/shadows", (QStringList() << QString(shadows.c_str())));
sh::Factory::getInstance().setGlobalSetting ("shadows", shadows); sh::Factory::getInstance().setGlobalSetting ("shadows", shadows);
@ -347,7 +354,7 @@ std::auto_ptr<sh::Factory> CS::Editor::setupGraphics()
sh::Factory::getInstance ().setGlobalSetting ("viewproj_fix", "false"); sh::Factory::getInstance ().setGlobalSetting ("viewproj_fix", "false");
sh::Factory::getInstance ().setGlobalSetting ("num_lights", sh::Factory::getInstance ().setGlobalSetting ("num_lights",
mUserSettings.settingValue("shader/num_lights").toStdString()); mUserSettings.settingValue("Objects/num_lights").toStdString());
/// \todo add more configurable shiny settings /// \todo add more configurable shiny settings

View file

@ -55,7 +55,7 @@ void UserSettings::buildSettingModelDefaults()
{ {
QString page; QString page;
page = "Shader"; page = "Objects";
{ {
QString section = "Group1"; QString section = "Group1";
@ -66,96 +66,17 @@ void UserSettings::buildSettingModelDefaults()
numLights->setMinimum (0); numLights->setMinimum (0);
numLights->setMaximum (100); // FIXME: not sure what the max value should be numLights->setMaximum (100); // FIXME: not sure what the max value should be
numLights->setWidgetWidth (10); numLights->setWidgetWidth (10);
numLights->setSpecialValueText ("Nothing!"); // text to display when value is 0
numLights->setViewLocation(1, 2); numLights->setViewLocation(1, 2);
Setting *nlText = createSetting (Type_Undefined, page, "nlText");
nlText->setSpecialValueText("Num Lights"); // hack to place text labels
nlText->setEditorSetting(false);
nlText->setSerializable (false);
nlText->setColumnSpan (1);
nlText->setWidgetWidth (10);
nlText->setViewLocation(1, 1);
Setting *shaders = createSetting (Type_CheckBox, page, "shaders");
Setting *simpleWater = createSetting (Type_CheckBox, page, "simple_water"); shaders->setDeclaredValues(QStringList() << "true" << "false");
simpleWater->setDeclaredValues(QStringList() << "true" << "false"); shaders->setDefaultValue("true");
simpleWater->setDefaultValue("false"); shaders->setEditorSetting(true);
simpleWater->setEditorSetting(true); shaders->setSpecialValueText("Enable Shaders");
simpleWater->setSpecialValueText("Enable Simple Water"); shaders->setWidgetWidth(25);
simpleWater->setWidgetWidth(25); shaders->setColumnSpan (3);
simpleWater->setColumnSpan (3); shaders->setStyleSheet ("QGroupBox { border: 0px; }");
simpleWater->setStyleSheet ("QGroupBox { border: 0px; }"); shaders->setViewLocation(2, 1);
simpleWater->setViewLocation(1, 5);
Setting *waterEnabled = createSetting (Type_DoubleSpinBox, page, "waterEnabled");
waterEnabled->setDefaultValue(0.00);
waterEnabled->setEditorSetting(true);
waterEnabled->setColumnSpan (1);
waterEnabled->setMinimum (0);
waterEnabled->setMaximum (100.00); // FIXME: not sure what the max value should be
waterEnabled->setWidgetWidth (10);
waterEnabled->setViewLocation(2, 6);
Setting *weText = createSetting (Type_Undefined, page, "weText");
weText->setSpecialValueText("Water Enabled");
weText->setEditorSetting(false);
weText->setSerializable (false);
weText->setColumnSpan (1);
weText->setWidgetWidth (10);
weText->setViewLocation(2, 5);
Setting *waterLevel = createSetting (Type_DoubleSpinBox, page, "waterLevel");
waterLevel->setDefaultValue(0.00);
waterLevel->setEditorSetting(true);
waterLevel->setColumnSpan (1);
waterLevel->setMinimum (0);
waterLevel->setMaximum (100.00); // FIXME: not sure what the max value should be
waterLevel->setWidgetWidth (10);
waterLevel->setViewLocation(3, 6);
Setting *wlText = createSetting (Type_Undefined, page, "wlText");
wlText->setSpecialValueText("Water Level");
wlText->setEditorSetting(false);
wlText->setSerializable (false);
wlText->setColumnSpan (1);
wlText->setWidgetWidth (10);
wlText->setViewLocation(3, 5);
Setting *waterTimer = createSetting (Type_DoubleSpinBox, page, "waterTimer");
waterTimer->setDefaultValue(0.00);
waterTimer->setEditorSetting(true);
waterTimer->setColumnSpan (1);
waterTimer->setMinimum (0);
waterTimer->setMaximum (100.00); // FIXME: not sure what the max value should be
waterTimer->setWidgetWidth (10);
waterTimer->setViewLocation(4, 6);
Setting *wtText = createSetting (Type_Undefined, page, "wtText");
wtText->setSpecialValueText("Water Timer");
wtText->setEditorSetting(false);
wtText->setSerializable (false);
wtText->setColumnSpan (1);
wtText->setWidgetWidth (10);
wtText->setViewLocation(4, 5);
Setting *spaceText = createSetting (Type_Undefined, page, "spaceText");
spaceText->setSpecialValueText(" ");
spaceText->setEditorSetting(false);
spaceText->setSerializable (false);
spaceText->setColumnSpan (1);
spaceText->setWidgetWidth (5);
spaceText->setViewLocation(3, 4);
Setting *spaceText2 = createSetting (Type_Undefined, page, "spaceText2");
spaceText2->setSpecialValueText(" ");
spaceText2->setEditorSetting(false);
spaceText2->setSerializable (false);
spaceText2->setColumnSpan (1);
spaceText2->setWidgetWidth (5);
spaceText2->setViewLocation(3, 7);
#if 0
sh::Factory::getInstance ().setSharedParameter ("windDir_windSpeed", sh::makeProperty<sh::Vector3>(new sh::Vector3(0.5, -0.8, 0.2)));
sh::Factory::getInstance ().setSharedParameter ("waterSunFade_sunHeight", sh::makeProperty<sh::Vector2>(new sh::Vector2(1, 0.6)));
sh::Factory::getInstance ().setSharedParameter ("vpRow2Fix", sh::makeProperty<sh::Vector4> (new sh::Vector4(0,0,0,0)));
#endif
} }
page = "Scene"; page = "Scene";
@ -171,13 +92,6 @@ sh::Factory::getInstance ().setSharedParameter ("vpRow2Fix", sh::makeProperty<sh
fastFactor->setMaximum (100); // FIXME: not sure what the max value should be fastFactor->setMaximum (100); // FIXME: not sure what the max value should be
fastFactor->setWidgetWidth (10); fastFactor->setWidgetWidth (10);
fastFactor->setViewLocation(1, 2); fastFactor->setViewLocation(1, 2);
Setting *ffText = createSetting (Type_Undefined, page, "ffText");
ffText->setSpecialValueText("Fast Factor"); // hack to place text labels
ffText->setEditorSetting(false);
ffText->setSerializable (false);
ffText->setColumnSpan (1);
ffText->setWidgetWidth (10);
ffText->setViewLocation(1, 1);
Setting *farClipDist = createSetting (Type_SpinBox, page, "far clip distance"); Setting *farClipDist = createSetting (Type_SpinBox, page, "far clip distance");
farClipDist->setDefaultValue(300000); farClipDist->setDefaultValue(300000);
@ -187,13 +101,6 @@ sh::Factory::getInstance ().setSharedParameter ("vpRow2Fix", sh::makeProperty<sh
farClipDist->setMaximum (1000000); // FIXME: not sure what the max value should be farClipDist->setMaximum (1000000); // FIXME: not sure what the max value should be
farClipDist->setWidgetWidth (10); farClipDist->setWidgetWidth (10);
farClipDist->setViewLocation(2, 2); farClipDist->setViewLocation(2, 2);
Setting *fcText = createSetting (Type_Undefined, page, "fcText");
fcText->setSpecialValueText("Far Clip Distance");
fcText->setEditorSetting(false);
fcText->setSerializable (false);
fcText->setColumnSpan (1);
fcText->setWidgetWidth (10);
fcText->setViewLocation(2, 1);
Setting *timerStart = createSetting (Type_SpinBox, page, "timer start"); Setting *timerStart = createSetting (Type_SpinBox, page, "timer start");
timerStart->setDefaultValue(20); timerStart->setDefaultValue(20);
@ -203,13 +110,6 @@ sh::Factory::getInstance ().setSharedParameter ("vpRow2Fix", sh::makeProperty<sh
timerStart->setMaximum (100); // FIXME: not sure what the max value should be timerStart->setMaximum (100); // FIXME: not sure what the max value should be
timerStart->setWidgetWidth (10); timerStart->setWidgetWidth (10);
timerStart->setViewLocation(3, 2); timerStart->setViewLocation(3, 2);
Setting *tsText = createSetting (Type_Undefined, page, "tsText");
tsText->setSpecialValueText("Timer Start");
tsText->setEditorSetting(false);
tsText->setSerializable (false);
tsText->setColumnSpan (1);
tsText->setWidgetWidth (10);
tsText->setViewLocation(3, 1);
} }
#if 0 #if 0
@ -251,6 +151,7 @@ sh::Factory::getInstance ().setSharedParameter ("vpRow2Fix", sh::makeProperty<sh
QStringList() << "480" << "600" << "768" << "900" QStringList() << "480" << "600" << "768" << "900"
); );
} }
#endif
page = "Display Format"; page = "Display Format";
{ {
@ -271,7 +172,6 @@ sh::Factory::getInstance ().setSharedParameter ("vpRow2Fix", sh::makeProperty<sh
rsd->setEditorSetting (true); rsd->setEditorSetting (true);
ritd->setEditorSetting (true); ritd->setEditorSetting (true);
} }
#endif
page = "Proxy Selection Test"; page = "Proxy Selection Test";
{ {

View file

@ -376,9 +376,6 @@ CSVDoc::View::View (ViewManager& viewManager, CSMDoc::Document *document, int to
hide(); hide();
resize (width.toInt() - (frameGeometry().width() - geometry().width()), resize (width.toInt() - (frameGeometry().width() - geometry().width()),
height.toInt() - (frameGeometry().height() - geometry().height())); height.toInt() - (frameGeometry().height() - geometry().height()));
// start at the centre of the screen
QPoint screenCenter = QApplication::desktop()->screenGeometry().center();
move(screenCenter - QPoint(frameGeometry().width()/2, frameGeometry().height()/2));
mSubViewWindow.setDockOptions (QMainWindow::AllowNestedDocks); mSubViewWindow.setDockOptions (QMainWindow::AllowNestedDocks);
@ -517,14 +514,6 @@ void CSVDoc::View::addSubView (const CSMWorld::UniversalId& id, const std::strin
view->setMinimumWidth(minWidth); view->setMinimumWidth(minWidth);
view->setStatusBar (mShowStatusBar->isChecked()); view->setStatusBar (mShowStatusBar->isChecked());
// NOTE: only required if show status bar setting should be applied to existing
// window
#if 0
std::string showStatusBar =
CSMSettings::UserSettings::instance().settingValue("Display/show statusbar").toStdString();
view->setStatusBar (showStatusBar == "true");
#endif
mSubViewWindow.addDockWidget (Qt::TopDockWidgetArea, view); mSubViewWindow.addDockWidget (Qt::TopDockWidgetArea, view);

View file

@ -401,13 +401,6 @@ bool CSVDoc::ViewManager::removeDocument (CSVDoc::View *view)
return true; return true;
} }
void CSVDoc::ViewManager::toggleStatusBar(bool checked)
{
// NOTE: below only required if status bar change is to be applied to existing
//for (std::vector<View *>::const_iterator iter (mViews.begin()); iter!=mViews.end(); ++iter)
//(*iter)->toggleStatusBar(checked);
}
void CSVDoc::ViewManager::exitApplication (CSVDoc::View *view) void CSVDoc::ViewManager::exitApplication (CSVDoc::View *view)
{ {
if(!removeDocument(view)) // close the current document first if(!removeDocument(view)) // close the current document first

View file

@ -81,8 +81,6 @@ namespace CSVDoc
void exitApplication (CSVDoc::View *view); void exitApplication (CSVDoc::View *view);
void toggleStatusBar(bool checked);
private slots: private slots:
void documentStateChanged (int state, CSMDoc::Document *document); void documentStateChanged (int state, CSMDoc::Document *document);

View file

@ -87,27 +87,12 @@ QStringList getAvailableResolutions()
Ogre::ConfigOptionMap::iterator it = renderOpt.begin(); Ogre::ConfigOptionMap::iterator it = renderOpt.begin();
for(;it != renderOpt.end(); ++it) for(;it != renderOpt.end(); ++it)
{ {
if(it->first == "Rendering Device" )
{
if(it->second.possibleValues.empty())
{
return result; // FIXME: add error message
}
// Store Available Rendering Devices
Ogre::StringVector::iterator iter = it->second.possibleValues.begin();
for(;iter != it->second.possibleValues.end(); ++iter)
{
std::cout << "rd: " << *iter << std::endl; // FIXME: debug
}
}
if(it->first == "Video Mode" ) if(it->first == "Video Mode" )
{ {
if(it->second.possibleValues.empty()) if(it->second.possibleValues.empty())
{ {
return result; // FIXME: add error message return result; // FIXME: add error message
} }
// FIXME: how to default to the current value?
std::cout << "vm current: " << it->second.currentValue << std::endl; // FIXME: debug
// Store Available Resolutions // Store Available Resolutions
Ogre::StringVector::iterator iter = it->second.possibleValues.begin(); Ogre::StringVector::iterator iter = it->second.possibleValues.begin();
for(; iter != it->second.possibleValues.end(); ++iter) for(; iter != it->second.possibleValues.end(); ++iter)
@ -138,7 +123,7 @@ QStringList getAvailableResolutions()
CSVSettings::Dialog::Dialog(QTabWidget *parent) CSVSettings::Dialog::Dialog(QTabWidget *parent)
: /*mStackedWidget (0),*/ mDebugMode (false), SettingWindow (parent) : mDebugMode (false), SettingWindow (parent)
{ {
setObjectName(QString::fromUtf8 ("User Settings")); setObjectName(QString::fromUtf8 ("User Settings"));
@ -151,12 +136,8 @@ CSVSettings::Dialog::Dialog(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&)));
// to update the checkbox on the view menu
connect(cbStatusBar, SIGNAL(toggled(bool)), this, SIGNAL (toggleStatusBar(bool)));
displayGroup_Window->installEventFilter(this); displayGroup_Window->installEventFilter(this);
setupDialog();
} }
bool CSVSettings::Dialog::eventFilter(QObject *target, QEvent *event) bool CSVSettings::Dialog::eventFilter(QObject *target, QEvent *event)
@ -185,19 +166,6 @@ void CSVSettings::Dialog::slotRendererChanged(const QString &renderer)
cmbShaderLang->clear(); cmbShaderLang->clear();
cmbShaderLang->addItems(model()->getShaderLanguageByRenderer(renderer)); cmbShaderLang->addItems(model()->getShaderLanguageByRenderer(renderer));
if(model()->settingValue("Video/use settings.cfg") == "true")
{
labRenderSys->setEnabled(false);
cmbRenderSys->setEnabled(false);
labAntiAlias->setEnabled(false);
cmbAntiAlias->setEnabled(false);
//cbVsync->setEnabled(false);
labShaderLang->setEnabled(false);
cmbShaderLang->setEnabled(false);
}
else
cbOverride->setChecked(false);
} }
void CSVSettings::Dialog::slotOverrideToggled(bool checked) void CSVSettings::Dialog::slotOverrideToggled(bool checked)
@ -208,7 +176,6 @@ void CSVSettings::Dialog::slotOverrideToggled(bool checked)
cmbRenderSys->setEnabled(false); cmbRenderSys->setEnabled(false);
labAntiAlias->setEnabled(false); labAntiAlias->setEnabled(false);
cmbAntiAlias->setEnabled(false); cmbAntiAlias->setEnabled(false);
//cbVsync->setEnabled(false);
labShaderLang->setEnabled(false); labShaderLang->setEnabled(false);
cmbShaderLang->setEnabled(false); cmbShaderLang->setEnabled(false);
} }
@ -218,16 +185,11 @@ void CSVSettings::Dialog::slotOverrideToggled(bool checked)
cmbRenderSys->setEnabled(true); cmbRenderSys->setEnabled(true);
labAntiAlias->setEnabled(true); labAntiAlias->setEnabled(true);
cmbAntiAlias->setEnabled(true); cmbAntiAlias->setEnabled(true);
//cbVsync->setEnabled(true);
labShaderLang->setEnabled(true); labShaderLang->setEnabled(true);
cmbShaderLang->setEnabled(true); cmbShaderLang->setEnabled(true);
} }
} }
void CSVSettings::Dialog::setupDialog()
{
}
void CSVSettings::Dialog::buildPages() void CSVSettings::Dialog::buildPages()
{ {
int index = -1; int index = -1;
@ -238,7 +200,6 @@ void CSVSettings::Dialog::buildPages()
// Ogre renderer // Ogre renderer
cmbRenderSys->clear(); cmbRenderSys->clear();
cmbRenderSys->addItems(model()->getOgreRenderers()); cmbRenderSys->addItems(model()->getOgreRenderers());
//slotRendererChanged(Ogre::Root::getSingleton().getRenderSystem()->getName().c_str());
// antialiasing // antialiasing
QString antialiasing = model()->settingValue("Video/antialiasing"); QString antialiasing = model()->settingValue("Video/antialiasing");
@ -246,11 +207,6 @@ void CSVSettings::Dialog::buildPages()
if(index != -1) if(index != -1)
cmbAntiAlias->setCurrentIndex(index); cmbAntiAlias->setCurrentIndex(index);
// vsync
//cbVsync->setChecked(model()->settingValue("Video/vsync") == "true");
cbVsync->setChecked(false); // disable vsync option for now
cbVsync->setEnabled(false); // disable vsync option for now
// shader lang // shader lang
QString shaderlang = model()->settingValue("General/shader mode"); QString shaderlang = model()->settingValue("General/shader mode");
index = cmbShaderLang->findData(shaderlang, Qt::DisplayRole); index = cmbShaderLang->findData(shaderlang, Qt::DisplayRole);
@ -288,17 +244,6 @@ void CSVSettings::Dialog::buildPages()
// status bar // status bar
cbStatusBar->setChecked(model()->settingValue("Display/show statusbar") == "true"); cbStatusBar->setChecked(model()->settingValue("Display/show statusbar") == "true");
// display format
QString recStat = model()->settingValue("Display Format/Record Status Display");
index = cmbRecStatus->findData(recStat, Qt::DisplayRole);
if(index != -1)
cmbRecStatus->setCurrentIndex(index);
QString refIdType = model()->settingValue("Display Format/Referenceable ID Type Display");
index = cmbRefIdType->findData(refIdType, Qt::DisplayRole);
if(index != -1)
cmbRefIdType->setCurrentIndex(index);
// subview // subview
if(model()->hasSettingDefinitions("SubView/minimum width")) if(model()->hasSettingDefinitions("SubView/minimum width"))
sbMinSubViewWidth->setValue(model()->settingValue("SubView/minimum width").toInt()); sbMinSubViewWidth->setValue(model()->settingValue("SubView/minimum width").toInt());
@ -341,20 +286,9 @@ void CSVSettings::Dialog::closeEvent (QCloseEvent *event)
model()->setDefinitions("Video/render system", model()->setDefinitions("Video/render system",
QStringList(cmbRenderSys->currentText())); QStringList(cmbRenderSys->currentText()));
// vsync
if(cbVsync->isChecked())
model()->setDefinitions("Video/vsync", QStringList("true"));
else
model()->setDefinitions("Video/vsync", QStringList("false"));
// antialiasing // antialiasing
model()->setDefinitions("Video/antialiasing", model()->setDefinitions("Video/antialiasing",
QStringList(cmbAntiAlias->currentText())); QStringList(cmbAntiAlias->currentText()));
#if 0
QRegExp reAA("^\\D*(\\d+)\\D*");
if(reAA.indexIn(cmbAntiAlias->currentText()) > -1)
model()->setDefinitions("Video/antialiasing", QStringList(reAA.cap(1)));
#endif
// shader lang (no group means "General" group) // shader lang (no group means "General" group)
model()->setDefinitions("shader mode", model()->setDefinitions("shader mode",
@ -384,11 +318,6 @@ void CSVSettings::Dialog::closeEvent (QCloseEvent *event)
else else
model()->setDefinitions("Display/show statusbar", QStringList("false")); model()->setDefinitions("Display/show statusbar", QStringList("false"));
// display format
model()->setDefinitions("Display Format/Record Status Display",
QStringList(cmbRecStatus->currentText()));
model()->setDefinitions("Display Format/Referenceable ID Type Display",
QStringList(cmbRefIdType->currentText()));
// subview // subview
model()->setDefinitions("SubView/minimum width", model()->setDefinitions("SubView/minimum width",
QStringList(QString::number(sbMinSubViewWidth->value()))); QStringList(QString::number(sbMinSubViewWidth->value())));

View file

@ -31,8 +31,6 @@ namespace CSVSettings {
/// Settings are written on close /// Settings are written on close
void closeEvent (QCloseEvent *event); void closeEvent (QCloseEvent *event);
void setupDialog();
bool eventFilter(QObject *target, QEvent *event); bool eventFilter(QObject *target, QEvent *event);
private: private:
@ -47,10 +45,6 @@ namespace CSVSettings {
void slotOverrideToggled(bool checked); void slotOverrideToggled(bool checked);
void slotRendererChanged(const QString &renderer); void slotRendererChanged(const QString &renderer);
signals:
void toggleStatusBar(bool checked); // FIXME: maybe not needed
}; };
} }
#endif // CSVSETTINGS_DIALOG_H #endif // CSVSETTINGS_DIALOG_H

View file

@ -3,7 +3,7 @@
#include <QWidget> #include <QWidget>
const QString CSVSettings::Frame::sInvisibleBoxStyle = const QString CSVSettings::Frame::sInvisibleBoxStyle =
QString::fromUtf8("Frame { border:2px; padding 2px; margin: 2px;}"); QString::fromUtf8("Frame { border:2px; padding: 2px; margin: 2px;}");
CSVSettings::Frame::Frame (bool isVisible, const QString &title, CSVSettings::Frame::Frame (bool isVisible, const QString &title,
QWidget *parent) QWidget *parent)
@ -16,8 +16,7 @@ CSVSettings::Frame::Frame (bool isVisible, const QString &title,
if (!isVisible) if (!isVisible)
{ {
// must be Page, not a View // must be Page, not a View
//setStyleSheet (sInvisibleBoxStyle); setStyleSheet (sInvisibleBoxStyle);
setStyleSheet("QGroupBox { border:0px; }");
mLayout->setContentsMargins(10, 15, 10, 15); mLayout->setContentsMargins(10, 15, 10, 15);
} }

View file

@ -20,106 +20,237 @@
<attribute name="title"> <attribute name="title">
<string>Display Settings</string> <string>Display Settings</string>
</attribute> </attribute>
<widget class="QGroupBox" name="displayGroup_DisplayFormat">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>371</width>
<height>81</height>
</rect>
</property>
<property name="title">
<string>Display Format</string>
</property>
<widget class="QWidget" name="layoutWidget_DisplayFormat">
<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="displayGroup_Subviews"> <widget class="QGroupBox" name="displayGroup_Subviews">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>9</x> <x>10</x>
<y>160</y> <y>200</y>
<width>371</width> <width>371</width>
<height>101</height> <height>79</height>
</rect> </rect>
</property> </property>
<property name="title"> <property name="title">
<string>Subviews</string> <string>Subviews</string>
</property> </property>
<widget class="QCheckBox" name="cbStatusBar">
<property name="geometry">
<rect>
<x>240</x>
<y>21</y>
<width>102</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Show Status Bar</string>
</property>
</widget>
<widget class="QCheckBox" name="cbReuseSubView">
<property name="geometry">
<rect>
<x>240</x>
<y>49</y>
<width>101</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Reuse Subviews</string>
</property>
</widget>
</widget> </widget>
<widget class="QWidget" name="layoutWidget_Subviews"> <widget class="QGroupBox" name="displayGroup_Window">
<property name="geometry">
<rect>
<x>10</x>
<y>140</y>
<width>211</width>
<height>51</height>
</rect>
</property>
<property name="title">
<string>Window Size</string>
</property>
<widget class="QStackedWidget" name="stackedWidget">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
<width>191</width>
<height>22</height>
</rect>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="page_1">
<property name="enabled">
<bool>true</bool>
</property>
<widget class="QWidget" name="displayGroup_WindowSize">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>191</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="QWidget" name="page_2">
<property name="enabled">
<bool>true</bool>
</property>
<widget class="QComboBox" name="cmbStdWinSize">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>191</width>
<height>22</height>
</rect>
</property>
</widget>
</widget>
</widget>
</widget>
<widget class="QCheckBox" name="cbOverride">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>21</x> <x>21</x>
<y>180</y> <y>29</y>
<width>351</width> <width>231</width>
<height>71</height> <height>17</height>
</rect> </rect>
</property> </property>
<layout class="QGridLayout" name="gridLayout_3"> <property name="text">
<string>Use Render System Settings from OpenMW</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
<widget class="QGroupBox" name="displayGroup_Render">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>371</width>
<height>125</height>
</rect>
</property>
<property name="title">
<string>Render System</string>
</property>
<widget class="QComboBox" name="cmbRenderSys">
<property name="geometry">
<rect>
<x>172</x>
<y>42</y>
<width>181</width>
<height>20</height>
</rect>
</property>
<property name="editable">
<bool>false</bool>
</property>
</widget>
<widget class="QLabel" name="labAntiAlias">
<property name="geometry">
<rect>
<x>12</x>
<y>94</y>
<width>54</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Antialiasing</string>
</property>
</widget>
<widget class="QLabel" name="labShaderLang">
<property name="geometry">
<rect>
<x>12</x>
<y>68</y>
<width>84</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Shader Language</string>
</property>
</widget>
<widget class="QLabel" name="labRenderSys">
<property name="geometry">
<rect>
<x>12</x>
<y>42</y>
<width>104</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Rendering Subsystem</string>
</property>
</widget>
<widget class="QComboBox" name="cmbShaderLang">
<property name="geometry">
<rect>
<x>172</x>
<y>68</y>
<width>181</width>
<height>20</height>
</rect>
</property>
</widget>
<widget class="QComboBox" name="cmbAntiAlias">
<property name="geometry">
<rect>
<x>172</x>
<y>94</y>
<width>181</width>
<height>20</height>
</rect>
</property>
</widget>
</widget>
<widget class="QWidget" name="layoutWidget_2">
<property name="geometry">
<rect>
<x>20</x>
<y>220</y>
<width>191</width>
<height>48</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label_MaxSubviews"> <widget class="QLabel" name="label_MaxSubviews">
<property name="text"> <property name="text">
@ -160,243 +291,26 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0">
<widget class="QCheckBox" name="cbReuseSubView">
<property name="text">
<string>Reuse Subviews</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
<widget class="QGroupBox" name="displayGroup_Window">
<property name="geometry">
<rect>
<x>10</x>
<y>100</y>
<width>201</width>
<height>51</height>
</rect>
</property>
<property name="title">
<string>Window Size</string>
</property>
<widget class="QStackedWidget" name="stackedWidget">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
<width>181</width>
<height>22</height>
</rect>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="page_1">
<property name="enabled">
<bool>true</bool>
</property>
<widget class="QWidget" name="displayGroup_WindowSize">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>181</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="QWidget" name="page_2">
<property name="enabled">
<bool>true</bool>
</property>
<widget class="QComboBox" name="cmbStdWinSize">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>181</width>
<height>22</height>
</rect>
</property>
</widget>
</widget>
</widget>
</widget>
<widget class="QCheckBox" name="cbStatusBar">
<property name="geometry">
<rect>
<x>240</x>
<y>120</y>
<width>102</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Show Status Bar</string>
</property>
</widget>
<zorder>displayGroup_Subviews</zorder>
<zorder>layoutWidget_Subviews</zorder>
<zorder>displayGroup_Window</zorder>
<zorder>displayGroup_DisplayFormat</zorder>
<zorder>cbStatusBar</zorder>
</widget>
<widget class="QWidget" name="VideoSettings">
<attribute name="title">
<string>Video Settings</string>
</attribute>
<widget class="QWidget" name="layoutWidget_Render">
<property name="geometry">
<rect>
<x>20</x>
<y>26</y>
<width>351</width>
<height>129</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="cbOverride">
<property name="text">
<string>Use Render System Settings from OpenMW</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="labRenderSys">
<property name="text">
<string>Rendering Subsystem</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="cmbRenderSys">
<property name="editable">
<bool>false</bool>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="labAntiAlias">
<property name="text">
<string>Antialiasing</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="cbVsync">
<property name="text">
<string>Vertical Sync</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="labShaderLang">
<property name="text">
<string>Shader Language</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QComboBox" name="cmbShaderLang"/>
</item>
<item row="4" column="1">
<widget class="QComboBox" name="cmbAntiAlias"/>
</item>
<item row="1" column="0" colspan="2">
<widget class="Line" name="line">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>2</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(215, 215, 215);</string>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QGroupBox" name="displayGroup_Render">
<property name="geometry">
<rect>
<x>10</x>
<y>8</y>
<width>371</width>
<height>156</height>
</rect>
</property>
<property name="title">
<string>Render System</string>
</property>
</widget>
<widget class="QGroupBox" name="groupBox">
<property name="geometry">
<rect>
<x>9</x>
<y>169</y>
<width>371</width>
<height>101</height>
</rect>
</property>
<property name="title">
<string>title</string>
</property>
</widget>
<zorder>displayGroup_Render</zorder> <zorder>displayGroup_Render</zorder>
<zorder>layoutWidget_Render</zorder> <zorder>displayGroup_Subviews</zorder>
<zorder>groupBox</zorder> <zorder>displayGroup_Window</zorder>
<zorder>cbOverride</zorder>
<zorder>layoutWidget_2</zorder>
</widget> </widget>
</widget> </widget>
<tabstops> <tabstops>
<tabstop>cmbRecStatus</tabstop>
<tabstop>cmbRefIdType</tabstop>
<tabstop>sbWidth</tabstop>
<tabstop>sbHeight</tabstop>
<tabstop>cbStatusBar</tabstop>
<tabstop>sbMaxSubViews</tabstop>
<tabstop>sbMinSubViewWidth</tabstop>
<tabstop>cbReuseSubView</tabstop>
<tabstop>cbOverride</tabstop> <tabstop>cbOverride</tabstop>
<tabstop>cmbRenderSys</tabstop> <tabstop>cmbRenderSys</tabstop>
<tabstop>cbVsync</tabstop>
<tabstop>cmbAntiAlias</tabstop>
<tabstop>cmbShaderLang</tabstop> <tabstop>cmbShaderLang</tabstop>
<tabstop>cmbAntiAlias</tabstop>
<tabstop>sbWidth</tabstop>
<tabstop>sbHeight</tabstop>
<tabstop>sbMaxSubViews</tabstop>
<tabstop>sbMinSubViewWidth</tabstop>
<tabstop>cbStatusBar</tabstop>
<tabstop>cbReuseSubView</tabstop>
<tabstop>cmbStdWinSize</tabstop> <tabstop>cmbStdWinSize</tabstop>
</tabstops> </tabstops>
<resources/> <resources/>