Sanitised version. Some settings are only accessible via manually editing the config file.

deque
cc9cii 10 years ago
parent 31fb160376
commit 61bab6b1f1

@ -142,7 +142,6 @@ set (OPENCS_RES ${CMAKE_SOURCE_DIR}/files/opencs/resources.qrc
set (OPENCS_UI
${CMAKE_SOURCE_DIR}/files/ui/contentselector.ui
${CMAKE_SOURCE_DIR}/files/ui/filedialog.ui
${CMAKE_SOURCE_DIR}/files/ui/settingstab.ui
)
source_group (opencs FILES ${OPENCS_SRC} ${OPENCS_HDR})

@ -314,40 +314,19 @@ std::auto_ptr<sh::Factory> CS::Editor::setupGraphics()
factory->loadAllFiles();
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")));
bool shaders = mUserSettings.setting("Objects/shaders", (QStringList() << QString("true"))) == "true" ? true : false;
sh::Factory::getInstance ().setShadersEnabled (shaders);
std::string fog("true");
if(mUserSettings.hasSettingDefinitions("Shader/fog"))
fog = mUserSettings.settingValue("Shader/fog").toStdString();
else
mUserSettings.setDefinitions("Shader/fog", (QStringList() << QString(fog.c_str())));
std::string fog = mUserSettings.setting("Shader/fog", (QStringList() << QString("true"))).toStdString();
sh::Factory::getInstance().setGlobalSetting ("fog", fog);
std::string shadows("false");
if(mUserSettings.hasSettingDefinitions("Shader/shadows"))
shadows = shaders? mUserSettings.settingValue("Shader/shadows").toStdString() : "false";
else
mUserSettings.setDefinitions("Shader/shadows", (QStringList() << QString(shadows.c_str())));
std::string shadows = mUserSettings.setting("Shader/shadows", (QStringList() << QString("false"))).toStdString();
sh::Factory::getInstance().setGlobalSetting ("shadows", shadows);
std::string shadows_pssm("false");
if(mUserSettings.hasSettingDefinitions("Shader/shadows_pssm"))
shadows_pssm = mUserSettings.settingValue("Shader/shadows_pssm").toStdString();
else
mUserSettings.setDefinitions("Shader/shadows_pssm", (QStringList() << QString(shadows_pssm.c_str())));
std::string shadows_pssm = mUserSettings.setting("Shader/shadows_pssm", (QStringList() << QString("false"))).toStdString();
sh::Factory::getInstance().setGlobalSetting ("shadows_pssm", shadows_pssm);
std::string render_refraction("false");
if(mUserSettings.hasSettingDefinitions("Shader/render_refraction"))
render_refraction = mUserSettings.settingValue("Shader/render_refraction").toStdString();
else
mUserSettings.setDefinitions("Shader/render_refraction", (QStringList() << QString(render_refraction.c_str())));
std::string render_refraction = mUserSettings.setting("Shader/render_refraction", (QStringList() << QString("false"))).toStdString();
sh::Factory::getInstance ().setGlobalSetting ("render_refraction", render_refraction);
// internal setting - may be switched on or off by the use of shader configurations

@ -57,8 +57,6 @@ void UserSettings::buildSettingModelDefaults()
page = "Objects";
{
QString section = "Group1";
Setting *numLights = createSetting (Type_SpinBox, page, "num lights");
numLights->setDefaultValue(8);
numLights->setEditorSetting(true);
@ -112,7 +110,6 @@ void UserSettings::buildSettingModelDefaults()
timerStart->setViewLocation(3, 2);
}
#if 0
page = "Window Size";
{
Setting *width = createSetting (Type_LineEdit, page, "Width");
@ -151,7 +148,6 @@ void UserSettings::buildSettingModelDefaults()
QStringList() << "480" << "600" << "768" << "900"
);
}
#endif
page = "Display Format";
{
@ -499,6 +495,20 @@ QStringList UserSettings::getShaderLanguageByRenderer(const QString &renderer)
return result;
}
// if the key is not found create one with a defaut value
QString UserSettings::setting(const QString &viewKey, const QStringList &list)
{
if(mSettingDefinitions->contains(viewKey))
return settingValue(viewKey);
else if(!list.empty())
{
mSettingDefinitions->setValue (viewKey, list);
return list.at(0);
}
return QString();
}
bool UserSettings::hasSettingDefinitions (const QString &viewKey) const
{
return (mSettingDefinitions->contains (viewKey));

@ -81,6 +81,7 @@ namespace CSMSettings {
QStringList getShaderLanguageByRenderer(const QString &renderer);
QStringList getOgreOptions(const QString &key, const QString &renderer);
QStringList getOgreRenderers();
QString setting(const QString &viewKey, const QStringList &list = QStringList());
private:

@ -455,11 +455,8 @@ void CSVDoc::View::addSubView (const CSMWorld::UniversalId& id, const std::strin
bool isReferenceable = std::find(referenceables.begin(), referenceables.end(), id.getType()) != referenceables.end();
// User setting to reuse sub views (on a per top level view basis)
bool reuse = true;
if(userSettings.hasSettingDefinitions("SubView/reuse"))
reuse = userSettings.settingValue("SubView/reuse").toStdString() == "true" ? true : false;
else
userSettings.setDefinitions("SubView/reuse", (QStringList() << QString(reuse ? "true" : "false")));
bool reuse =
userSettings.setting("SubView/reuse", (QStringList() << QString("true"))) == "true" ? true : false;
if(reuse)
{
foreach(SubView *sb, mSubViews)
@ -478,12 +475,8 @@ void CSVDoc::View::addSubView (const CSMWorld::UniversalId& id, const std::strin
//
// If the sub view limit setting is one, the sub view title bar is hidden and the
// text in the main title bar is adjusted accordingly
int maxSubView = 3;
if(userSettings.hasSettingDefinitions("SubView/max subviews"))
maxSubView = userSettings.settingValue("SubView/max subviews").toInt();
else
userSettings.setDefinitions("SubView/max subviews", (QStringList() << QString(maxSubView)));
int maxSubView =
userSettings.setting("SubView/max subviews", (QStringList() << QString("3"))).toInt();
if(mSubViews.size() >= maxSubView) // create a new top level view
{
mViewManager.addView(mDocument, id, hint);
@ -506,11 +499,8 @@ void CSVDoc::View::addSubView (const CSMWorld::UniversalId& id, const std::strin
if (!hint.empty())
view->useHint (hint);
int minWidth = 325; // default value to use if none found
if(userSettings.hasSettingDefinitions("SubView/minimum width"))
minWidth = userSettings.settingValue("SubView/minimum width").toInt();
else
userSettings.setDefinitions("SubView/minimum width", (QStringList() << QString(minWidth)));
int minWidth =
userSettings.setting("SubView/minimum width", (QStringList() << QString("325"))).toInt();
view->setMinimumWidth(minWidth);
view->setStatusBar (mShowStatusBar->isChecked());

@ -47,17 +47,11 @@ namespace CSVRender
mCamera->setNearClipDistance (0.1);
CSMSettings::UserSettings &userSettings = CSMSettings::UserSettings::instance();
int farClipDist = 300000;
if(userSettings.hasSettingDefinitions("Scene/far clip distance"))
farClipDist = userSettings.settingValue("Scene/far clip distance").toInt();
else
userSettings.setDefinitions("Scene/far clip distance", (QStringList() << QString(farClipDist)));
int farClipDist = userSettings.setting("Scene/far clip distance", (QStringList() << QString("300000"))).toInt();
mCamera->setFarClipDistance (farClipDist);
if(userSettings.hasSettingDefinitions("Scene/fast factor"))
mFastFactor = userSettings.settingValue("Scene/fast factor").toInt();
else
userSettings.setDefinitions("Scene/fast factor", (QStringList() << QString(mFastFactor)));
mFastFactor = userSettings.setting("Scene/fast factor", (QStringList() << QString("4"))).toInt();
mCamera->roll (Ogre::Degree (90));
@ -67,11 +61,7 @@ namespace CSVRender
connect (timer, SIGNAL (timeout()), this, SLOT (update()));
int timerStart = 20;
if(userSettings.hasSettingDefinitions("Scene/timer start"))
timerStart = userSettings.settingValue("Scene/timer start").toInt();
else
userSettings.setDefinitions("Scene/timer start", (QStringList() << QString(timerStart)));
int timerStart = userSettings.setting("Scene/timer start", (QStringList() << QString("20"))).toInt();
timer->start (timerStart);
/// \todo make shortcut configurable

@ -1,273 +1,100 @@
#include "dialog.hpp"
#include <QListWidgetItem>
#include <QApplication>
#include <QDesktopWidget>
#include <QWidget>
#include <QStackedWidget>
#include <QtGui>
#include "../../model/settings/usersettings.hpp"
#include "page.hpp"
#include <OgreRoot.h>
#include <boost/math/common_factor.hpp>
#include <QApplication>
namespace {
#include <QSplitter>
QRect getMaximumResolution()
{
QRect max;
int screens = QApplication::desktop()->screenCount();
for(int i = 0; i < screens; ++i)
{
QRect res = QApplication::desktop()->screenGeometry(i);
if(res.width() > max.width())
max.setWidth(res.width());
if(res.height() > max.height())
max.setHeight(res.height());
}
return max;
}
#include <QTreeView>
#include <QListView>
#include <QTableView>
QString getAspect(int x, int y)
{
int gcd = boost::math::gcd (x, y);
int xaspect = x / gcd;
int yaspect = y / gcd;
// special case: 8 : 5 is usually referred to as 16:10
if (xaspect == 8 && yaspect == 5)
return QString("16:10");
return QString(QString::number(xaspect) + ":" + QString::number(yaspect));
}
#include <QStandardItemModel>
#include <QStandardItem>
QString getCurrentOgreResolution()
CSVSettings::Dialog::Dialog(QMainWindow *parent)
: mStackedWidget (0), mDebugMode (false), SettingWindow (parent)
{
Ogre::ConfigOptionMap& renderOpt =
Ogre::Root::getSingleton().getRenderSystem()->getConfigOptions();
Ogre::ConfigOptionMap::iterator it = renderOpt.begin();
for(; it != renderOpt.end(); ++it)
{
if(it->first == "Video Mode" )
{
QRegExp re("^(\\d+ x \\d+)");
if (re.indexIn(it->second.currentValue.c_str(), 0) > -1)
return re.cap(1);
}
}
return QString(); // found nothing
setWindowTitle(QString::fromUtf8 ("User Settings"));
setupDialog();
connect (mPageListWidget,
SIGNAL (currentItemChanged(QListWidgetItem*, QListWidgetItem*)),
this,
SLOT (slotChangePage (QListWidgetItem*, QListWidgetItem*)));
}
bool customCompare(const QString &s1, const QString &s2)
void CSVSettings::Dialog::slotChangePage
(QListWidgetItem *cur, QListWidgetItem *prev)
{
int x1, x2, y1, y2;
QRegExp re("^(\\d+) x (\\d+)");
if(re.indexIn(s1) > -1)
{
x1 = re.cap(1).toInt();
y1 = re.cap(2).toInt();
}
if(re.indexIn(s2) > -1)
{
x2 = re.cap(1).toInt();
y2 = re.cap(2).toInt();
}
mStackedWidget->changePage
(mPageListWidget->row (cur), mPageListWidget->row (prev));
if(x1 == x2)
return y1 > y2;
else
return x1 > x2;
layout()->activate();
setFixedSize(minimumSizeHint());
}
QStringList getAvailableResolutions()
void CSVSettings::Dialog::setupDialog()
{
// store available rendering devices and available resolutions
QStringList result;
//create central widget with it's layout and immediate children
QWidget *centralWidget = new QGroupBox (this);
Ogre::ConfigOptionMap& renderOpt = Ogre::Root::getSingleton().getRenderSystem()->getConfigOptions();
Ogre::ConfigOptionMap::iterator it = renderOpt.begin();
for(;it != renderOpt.end(); ++it)
{
if(it->first == "Video Mode" )
{
if(it->second.possibleValues.empty())
{
return result; // FIXME: add error message
}
// Store Available Resolutions
Ogre::StringVector::iterator iter = it->second.possibleValues.begin();
for(; iter != it->second.possibleValues.end(); ++iter)
{
// extract x and y values
QRegExp re("^(\\d+) x (\\d+)");
if(re.indexIn((*iter).c_str(), 0) > -1)
{
QString aspect = getAspect(re.cap(1).toInt(), re.cap(2).toInt());
QString resolution = re.cap(1) + QString(" x ") + re.cap(2);
if (aspect == QLatin1String("16:9") || aspect == QLatin1String("16:10")) {
resolution.append(QObject::tr("\t(Wide ") + aspect + ")");
} else if (aspect == QLatin1String("4:3")) {
resolution.append(QObject::tr("\t(Standard 4:3)"));
}
result.append(resolution);
}
}
}
}
result.removeDuplicates();
qStableSort(result.begin(), result.end(), customCompare);
return result;
}
centralWidget->setLayout (new QHBoxLayout());
centralWidget->setSizePolicy (QSizePolicy::Expanding, QSizePolicy::Preferred);
setCentralWidget (centralWidget);
setDockOptions (QMainWindow::AllowNestedDocks);
buildPageListWidget (centralWidget);
buildStackedWidget (centralWidget);
}
CSVSettings::Dialog::Dialog(QTabWidget *parent)
: mDebugMode (false), SettingWindow (parent)
void CSVSettings::Dialog::buildPages()
{
setObjectName(QString::fromUtf8 ("User Settings"));
SettingWindow::createPages ();
setupUi(this);
QFontMetrics fm (QApplication::font());
// Set the maximum res we can set in windowed mode
QRect res = getMaximumResolution();
sbWidth->setMaximum(res.width());
sbHeight->setMaximum(res.height());
foreach (Page *page, SettingWindow::pages())
{
QString pageName = page->objectName();
connect(cbOverride, SIGNAL(toggled(bool)), this, SLOT(slotOverrideToggled(bool)));
connect(cmbRenderSys, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(slotRendererChanged(const QString&)));
int textWidth = fm.width(pageName);
displayGroup_Window->installEventFilter(this);
}
new QListWidgetItem (pageName, mPageListWidget);
mPageListWidget->setFixedWidth (textWidth + 50);
bool CSVSettings::Dialog::eventFilter(QObject *target, QEvent *event)
{
if (event->type() == QEvent::MouseButtonDblClick)
{
if(stackedWidget->currentWidget() == page_1)
{
stackedWidget->setCurrentWidget(page_2);
return false;
}
else if(stackedWidget->currentWidget() == page_2)
{
stackedWidget->setCurrentWidget(page_1);
return false;
}
mStackedWidget->addWidget (&dynamic_cast<QWidget &>(*(page)));
}
return QTabWidget::eventFilter(target, event);
resize (mStackedWidget->sizeHint());
}
void CSVSettings::Dialog::slotRendererChanged(const QString &renderer)
void CSVSettings::Dialog::buildPageListWidget (QWidget *centralWidget)
{
cmbAntiAlias->clear();
cmbAntiAlias->addItems(model()->getOgreOptions(QString("FSAA"), renderer));
mPageListWidget = new QListWidget (centralWidget);
mPageListWidget->setMinimumWidth(50);
mPageListWidget->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Expanding);
cmbShaderLang->clear();
cmbShaderLang->addItems(model()->getShaderLanguageByRenderer(renderer));
}
mPageListWidget->setSelectionBehavior (QAbstractItemView::SelectItems);
void CSVSettings::Dialog::slotOverrideToggled(bool checked)
{
if(checked)
{
labRenderSys->setEnabled(false);
cmbRenderSys->setEnabled(false);
labAntiAlias->setEnabled(false);
cmbAntiAlias->setEnabled(false);
labShaderLang->setEnabled(false);
cmbShaderLang->setEnabled(false);
}
else
{
labRenderSys->setEnabled(true);
cmbRenderSys->setEnabled(true);
labAntiAlias->setEnabled(true);
cmbAntiAlias->setEnabled(true);
labShaderLang->setEnabled(true);
cmbShaderLang->setEnabled(true);
}
centralWidget->layout()->addWidget(mPageListWidget);
}
void CSVSettings::Dialog::buildPages()
void CSVSettings::Dialog::buildStackedWidget (QWidget *centralWidget)
{
int index = -1;
// initialised in the constructor
slotOverrideToggled(cbOverride->isChecked());
// Ogre renderer
cmbRenderSys->clear();
cmbRenderSys->addItems(model()->getOgreRenderers());
// antialiasing
QString antialiasing = model()->settingValue("Video/antialiasing");
index = cmbAntiAlias->findData(antialiasing, Qt::DisplayRole);
if(index != -1)
cmbAntiAlias->setCurrentIndex(index);
mStackedWidget = new ResizeableStackedWidget (centralWidget);
// shader lang
QString shaderlang = model()->settingValue("General/shader mode");
index = cmbShaderLang->findData(shaderlang, Qt::DisplayRole);
if(index != -1)
cmbShaderLang->setCurrentIndex(index);
if(model()->settingValue("Window Size/Width") != "")
sbWidth->setValue(model()->settingValue("Window Size/Width").toInt());
if(model()->settingValue("Window Size/Height") != "")
sbHeight->setValue(model()->settingValue("Window Size/Height").toInt());
// update display resolution combo box
cmbStdWinSize->clear();
cmbStdWinSize->addItems(getAvailableResolutions());
QString currRes = model()->settingValue("Window Size/Width") + " x " +
model()->settingValue("Window Size/Height");
index = cmbStdWinSize->findData(currRes, Qt::DisplayRole, Qt::MatchStartsWith);
if(index != -1)
{
// show the values in ini file
cmbStdWinSize->setCurrentIndex(index);
}
else
{
// show what's in Ogre instead
index = cmbStdWinSize->findData(getCurrentOgreResolution(),
Qt::DisplayRole, Qt::MatchStartsWith);
if(index != -1)
cmbStdWinSize->setCurrentIndex(index);
}
// status bar
cbStatusBar->setChecked(model()->settingValue("Display/show statusbar") == "true");
// subview
if(model()->hasSettingDefinitions("SubView/minimum width"))
sbMinSubViewWidth->setValue(model()->settingValue("SubView/minimum width").toInt());
else
sbMinSubViewWidth->setValue(325);
if(model()->hasSettingDefinitions("SubView/max subviews"))
sbMaxSubViews->setValue(model()->settingValue("SubView/max subviews").toInt());
else
sbMaxSubViews->setValue(3);
cbReuseSubView->setChecked(model()->settingValue("SubView/reuse") == "true");
SettingWindow::createPages ();
foreach (Page *page, SettingWindow::pages())
{
QString pageName = page->objectName();
// each page is added as a tab to Ui::TabWiget
addTab(page, page->objectName());
// add section and views to the page
page->showWidgets();
}
centralWidget->layout()->addWidget (mStackedWidget);
}
void CSVSettings::Dialog::closeEvent (QCloseEvent *event)
@ -276,59 +103,6 @@ void CSVSettings::Dialog::closeEvent (QCloseEvent *event)
//model is updated
SettingWindow::closeEvent (event);
// override
if(cbOverride->isChecked())
model()->setDefinitions("Video/use settings.cfg", QStringList("true"));
else
model()->setDefinitions("Video/use settings.cfg", QStringList("false"));
// render system
model()->setDefinitions("Video/render system",
QStringList(cmbRenderSys->currentText()));
// antialiasing
model()->setDefinitions("Video/antialiasing",
QStringList(cmbAntiAlias->currentText()));
// shader lang (no group means "General" group)
model()->setDefinitions("shader mode",
QStringList(cmbShaderLang->currentText().toLower()));
// window size
if(page_2->isEnabled())
{
QRegExp re("^(\\d+) x (\\d+)");
if(re.indexIn(cmbStdWinSize->currentText()) > -1)
{
model()->setDefinitions("Window Size/Width", QStringList(re.cap(1)));
model()->setDefinitions("Window Size/Height", QStringList(re.cap(2)));
}
}
else
{
model()->setDefinitions("Window Size/Width",
QStringList(QString::number(sbWidth->value())));
model()->setDefinitions("Window Size/Height",
QStringList(QString::number(sbHeight->value())));
}
// status bar
if(cbStatusBar->isChecked())
model()->setDefinitions("Display/show statusbar", QStringList("true"));
else
model()->setDefinitions("Display/show statusbar", QStringList("false"));
// subview
model()->setDefinitions("SubView/minimum width",
QStringList(QString::number(sbMinSubViewWidth->value())));
model()->setDefinitions("SubView/max subviews",
QStringList(QString::number(sbMaxSubViews->value())));
if(cbReuseSubView->isChecked())
model()->setDefinitions("SubView/reuse", QStringList("true"));
else
model()->setDefinitions("SubView/reuse", QStringList("false"));
saveSettings();
}
@ -340,20 +114,8 @@ void CSVSettings::Dialog::show()
setViewValues();
}
QWidget *currView = QApplication::activeWindow();
if(currView)
{
// place at the center of the window with focus
QSize size = currView->size();
move(currView->geometry().x()+(size.width() - frameGeometry().width())/2,
currView->geometry().y()+(size.height() - frameGeometry().height())/2);
}
else
{
// something's gone wrong, place at the center of the screen
QPoint screenCenter = QApplication::desktop()->screenGeometry().center();
move(screenCenter - QPoint(frameGeometry().width()/2,
frameGeometry().height()/2));
}
QPoint screenCenter = QApplication::desktop()->screenGeometry().center();
move (screenCenter - geometry().center());
QWidget::show();
}

@ -2,23 +2,28 @@
#define CSVSETTINGS_DIALOG_H
#include "settingwindow.hpp"
#include "resizeablestackedwidget.hpp"
#include <QStandardItem>
#include "ui_settingstab.h"
class QStackedWidget;
class QListWidget;
class QListWidgetItem;
namespace CSVSettings {
class Page;
class Dialog : public SettingWindow, private Ui::TabWidget
class Dialog : public SettingWindow
{
Q_OBJECT
QListWidget *mPageListWidget;
ResizeableStackedWidget *mStackedWidget;
bool mDebugMode;
public:
explicit Dialog (QTabWidget *parent = 0);
explicit Dialog (QMainWindow *parent = 0);
///Enables setting debug mode. When the dialog opens, a page is created
///which displays the SettingModel's contents in a Tree view.
@ -29,11 +34,13 @@ namespace CSVSettings {
/// Settings are written on close
void closeEvent (QCloseEvent *event);
bool eventFilter(QObject *target, QEvent *event);
void setupDialog();
private:
void buildPages();
void buildPageListWidget (QWidget *centralWidget);
void buildStackedWidget (QWidget *centralWidget);
public slots:
@ -41,8 +48,7 @@ namespace CSVSettings {
private slots:
void slotOverrideToggled(bool checked);
void slotRendererChanged(const QString &renderer);
void slotChangePage (QListWidgetItem *, QListWidgetItem *);
};
}
#endif // CSVSETTINGS_DIALOG_H

@ -1,16 +1,15 @@
#include "settingwindow.hpp"
#include <QApplication>
#include <QDebug>
#include "../../model/settings/setting.hpp"
#include "../../model/settings/connector.hpp"
#include "../../model/settings/usersettings.hpp"
#include "settingwindow.hpp"
#include "page.hpp"
#include "view.hpp"
CSVSettings::SettingWindow::SettingWindow(QTabWidget *parent)
: QTabWidget(parent)
CSVSettings::SettingWindow::SettingWindow(QWidget *parent)
: QMainWindow(parent)
{}
void CSVSettings::SettingWindow::createPages()
@ -20,7 +19,7 @@ void CSVSettings::SettingWindow::createPages()
QList <CSMSettings::Setting *> connectedSettings;
foreach (const QString &pageName, pageMap.keys())
{
{
QList <CSMSettings::Setting *> pageSettings = pageMap.value (pageName);
mPages.append (new Page (pageName, pageSettings, this));

@ -1,7 +1,7 @@
#ifndef CSVSETTINGS_SETTINGWINDOW_HPP
#define CSVSETTINGS_SETTINGWINDOW_HPP
#include <QTabWidget>
#include <QMainWindow>
#include <QList>
#include "../../model/settings/support.hpp"
@ -18,7 +18,7 @@ namespace CSVSettings {
typedef QList <Page *> PageList;
class SettingWindow : public QTabWidget
class SettingWindow : public QMainWindow
{
Q_OBJECT
@ -26,7 +26,7 @@ namespace CSVSettings {
CSMSettings::UserSettings *mModel;
public:
explicit SettingWindow(QTabWidget *parent = 0);
explicit SettingWindow(QWidget *parent = 0);
///retrieve a reference to a view based on it's page and setting name
View *findView (const QString &pageName, const QString &setting);
@ -50,8 +50,6 @@ namespace CSVSettings {
///sets the defined values for the views that have been created
void setViewValues();
CSMSettings::UserSettings *model() { return mModel; }
private:
///create connections between settings (used for proxy settings)

@ -1,318 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>TabWidget</class>
<widget class="QTabWidget" name="TabWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>313</height>
</rect>
</property>
<property name="windowTitle">
<string>User Settings</string>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="DisplaySetttings">
<attribute name="title">
<string>Display Settings</string>
</attribute>
<widget class="QGroupBox" name="displayGroup_Subviews">
<property name="geometry">
<rect>
<x>10</x>
<y>200</y>
<width>371</width>
<height>79</height>
</rect>
</property>
<property name="title">
<string>Subviews</string>
</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 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">
<rect>
<x>21</x>
<y>29</y>
<width>231</width>
<height>17</height>
</rect>
</property>
<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">
<widget class="QLabel" name="label_MaxSubviews">
<property name="text">
<string>Max Number of Subviews:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="sbMaxSubViews">
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="minimum">
<number>1</number>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_MinSubviewWidth">
<property name="text">
<string>Min Subview Width:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="sbMinSubViewWidth">
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="minimum">
<number>50</number>
</property>
<property name="maximum">
<number>20000</number>
</property>
<property name="singleStep">
<number>5</number>
</property>
</widget>
</item>
</layout>
</widget>
<zorder>displayGroup_Render</zorder>
<zorder>displayGroup_Subviews</zorder>
<zorder>displayGroup_Window</zorder>
<zorder>cbOverride</zorder>
<zorder>layoutWidget_2</zorder>
</widget>
</widget>
<tabstops>
<tabstop>cbOverride</tabstop>
<tabstop>cmbRenderSys</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>
</tabstops>
<resources/>
<connections/>
</ui>
Loading…
Cancel
Save