forked from teamnwah/openmw-tes3coop
Sanitised version. Some settings are only accessible via manually editing the config file.
This commit is contained in:
parent
31fb160376
commit
61bab6b1f1
11 changed files with 118 additions and 702 deletions
|
@ -142,7 +142,6 @@ set (OPENCS_RES ${CMAKE_SOURCE_DIR}/files/opencs/resources.qrc
|
||||||
set (OPENCS_UI
|
set (OPENCS_UI
|
||||||
${CMAKE_SOURCE_DIR}/files/ui/contentselector.ui
|
${CMAKE_SOURCE_DIR}/files/ui/contentselector.ui
|
||||||
${CMAKE_SOURCE_DIR}/files/ui/filedialog.ui
|
${CMAKE_SOURCE_DIR}/files/ui/filedialog.ui
|
||||||
${CMAKE_SOURCE_DIR}/files/ui/settingstab.ui
|
|
||||||
)
|
)
|
||||||
|
|
||||||
source_group (opencs FILES ${OPENCS_SRC} ${OPENCS_HDR})
|
source_group (opencs FILES ${OPENCS_SRC} ${OPENCS_HDR})
|
||||||
|
|
|
@ -314,40 +314,19 @@ std::auto_ptr<sh::Factory> CS::Editor::setupGraphics()
|
||||||
|
|
||||||
factory->loadAllFiles();
|
factory->loadAllFiles();
|
||||||
|
|
||||||
bool shaders = true; // default if setting does not exist
|
bool shaders = mUserSettings.setting("Objects/shaders", (QStringList() << QString("true"))) == "true" ? true : false;
|
||||||
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);
|
sh::Factory::getInstance ().setShadersEnabled (shaders);
|
||||||
|
|
||||||
std::string fog("true");
|
std::string fog = mUserSettings.setting("Shader/fog", (QStringList() << QString("true"))).toStdString();
|
||||||
if(mUserSettings.hasSettingDefinitions("Shader/fog"))
|
|
||||||
fog = mUserSettings.settingValue("Shader/fog").toStdString();
|
|
||||||
else
|
|
||||||
mUserSettings.setDefinitions("Shader/fog", (QStringList() << QString(fog.c_str())));
|
|
||||||
sh::Factory::getInstance().setGlobalSetting ("fog", fog);
|
sh::Factory::getInstance().setGlobalSetting ("fog", fog);
|
||||||
|
|
||||||
std::string shadows("false");
|
std::string shadows = mUserSettings.setting("Shader/shadows", (QStringList() << QString("false"))).toStdString();
|
||||||
if(mUserSettings.hasSettingDefinitions("Shader/shadows"))
|
|
||||||
shadows = shaders? mUserSettings.settingValue("Shader/shadows").toStdString() : "false";
|
|
||||||
else
|
|
||||||
mUserSettings.setDefinitions("Shader/shadows", (QStringList() << QString(shadows.c_str())));
|
|
||||||
sh::Factory::getInstance().setGlobalSetting ("shadows", shadows);
|
sh::Factory::getInstance().setGlobalSetting ("shadows", shadows);
|
||||||
|
|
||||||
std::string shadows_pssm("false");
|
std::string shadows_pssm = mUserSettings.setting("Shader/shadows_pssm", (QStringList() << QString("false"))).toStdString();
|
||||||
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())));
|
|
||||||
sh::Factory::getInstance().setGlobalSetting ("shadows_pssm", shadows_pssm);
|
sh::Factory::getInstance().setGlobalSetting ("shadows_pssm", shadows_pssm);
|
||||||
|
|
||||||
|
std::string render_refraction = mUserSettings.setting("Shader/render_refraction", (QStringList() << QString("false"))).toStdString();
|
||||||
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())));
|
|
||||||
sh::Factory::getInstance ().setGlobalSetting ("render_refraction", render_refraction);
|
sh::Factory::getInstance ().setGlobalSetting ("render_refraction", render_refraction);
|
||||||
|
|
||||||
// internal setting - may be switched on or off by the use of shader configurations
|
// internal setting - may be switched on or off by the use of shader configurations
|
||||||
|
|
|
@ -57,8 +57,6 @@ void UserSettings::buildSettingModelDefaults()
|
||||||
|
|
||||||
page = "Objects";
|
page = "Objects";
|
||||||
{
|
{
|
||||||
QString section = "Group1";
|
|
||||||
|
|
||||||
Setting *numLights = createSetting (Type_SpinBox, page, "num lights");
|
Setting *numLights = createSetting (Type_SpinBox, page, "num lights");
|
||||||
numLights->setDefaultValue(8);
|
numLights->setDefaultValue(8);
|
||||||
numLights->setEditorSetting(true);
|
numLights->setEditorSetting(true);
|
||||||
|
@ -112,7 +110,6 @@ void UserSettings::buildSettingModelDefaults()
|
||||||
timerStart->setViewLocation(3, 2);
|
timerStart->setViewLocation(3, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
page = "Window Size";
|
page = "Window Size";
|
||||||
{
|
{
|
||||||
Setting *width = createSetting (Type_LineEdit, page, "Width");
|
Setting *width = createSetting (Type_LineEdit, page, "Width");
|
||||||
|
@ -151,7 +148,6 @@ void UserSettings::buildSettingModelDefaults()
|
||||||
QStringList() << "480" << "600" << "768" << "900"
|
QStringList() << "480" << "600" << "768" << "900"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
page = "Display Format";
|
page = "Display Format";
|
||||||
{
|
{
|
||||||
|
@ -499,6 +495,20 @@ QStringList UserSettings::getShaderLanguageByRenderer(const QString &renderer)
|
||||||
return result;
|
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
|
bool UserSettings::hasSettingDefinitions (const QString &viewKey) const
|
||||||
{
|
{
|
||||||
return (mSettingDefinitions->contains (viewKey));
|
return (mSettingDefinitions->contains (viewKey));
|
||||||
|
|
|
@ -81,6 +81,7 @@ namespace CSMSettings {
|
||||||
QStringList getShaderLanguageByRenderer(const QString &renderer);
|
QStringList getShaderLanguageByRenderer(const QString &renderer);
|
||||||
QStringList getOgreOptions(const QString &key, const QString &renderer);
|
QStringList getOgreOptions(const QString &key, const QString &renderer);
|
||||||
QStringList getOgreRenderers();
|
QStringList getOgreRenderers();
|
||||||
|
QString setting(const QString &viewKey, const QStringList &list = QStringList());
|
||||||
|
|
||||||
private:
|
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();
|
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)
|
// User setting to reuse sub views (on a per top level view basis)
|
||||||
bool reuse = true;
|
bool reuse =
|
||||||
if(userSettings.hasSettingDefinitions("SubView/reuse"))
|
userSettings.setting("SubView/reuse", (QStringList() << QString("true"))) == "true" ? true : false;
|
||||||
reuse = userSettings.settingValue("SubView/reuse").toStdString() == "true" ? true : false;
|
|
||||||
else
|
|
||||||
userSettings.setDefinitions("SubView/reuse", (QStringList() << QString(reuse ? "true" : "false")));
|
|
||||||
if(reuse)
|
if(reuse)
|
||||||
{
|
{
|
||||||
foreach(SubView *sb, mSubViews)
|
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
|
// 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
|
// text in the main title bar is adjusted accordingly
|
||||||
int maxSubView = 3;
|
int maxSubView =
|
||||||
if(userSettings.hasSettingDefinitions("SubView/max subviews"))
|
userSettings.setting("SubView/max subviews", (QStringList() << QString("3"))).toInt();
|
||||||
maxSubView = userSettings.settingValue("SubView/max subviews").toInt();
|
|
||||||
else
|
|
||||||
userSettings.setDefinitions("SubView/max subviews", (QStringList() << QString(maxSubView)));
|
|
||||||
|
|
||||||
if(mSubViews.size() >= maxSubView) // create a new top level view
|
if(mSubViews.size() >= maxSubView) // create a new top level view
|
||||||
{
|
{
|
||||||
mViewManager.addView(mDocument, id, hint);
|
mViewManager.addView(mDocument, id, hint);
|
||||||
|
@ -506,11 +499,8 @@ void CSVDoc::View::addSubView (const CSMWorld::UniversalId& id, const std::strin
|
||||||
if (!hint.empty())
|
if (!hint.empty())
|
||||||
view->useHint (hint);
|
view->useHint (hint);
|
||||||
|
|
||||||
int minWidth = 325; // default value to use if none found
|
int minWidth =
|
||||||
if(userSettings.hasSettingDefinitions("SubView/minimum width"))
|
userSettings.setting("SubView/minimum width", (QStringList() << QString("325"))).toInt();
|
||||||
minWidth = userSettings.settingValue("SubView/minimum width").toInt();
|
|
||||||
else
|
|
||||||
userSettings.setDefinitions("SubView/minimum width", (QStringList() << QString(minWidth)));
|
|
||||||
view->setMinimumWidth(minWidth);
|
view->setMinimumWidth(minWidth);
|
||||||
|
|
||||||
view->setStatusBar (mShowStatusBar->isChecked());
|
view->setStatusBar (mShowStatusBar->isChecked());
|
||||||
|
|
|
@ -47,17 +47,11 @@ namespace CSVRender
|
||||||
mCamera->setNearClipDistance (0.1);
|
mCamera->setNearClipDistance (0.1);
|
||||||
|
|
||||||
CSMSettings::UserSettings &userSettings = CSMSettings::UserSettings::instance();
|
CSMSettings::UserSettings &userSettings = CSMSettings::UserSettings::instance();
|
||||||
int farClipDist = 300000;
|
|
||||||
if(userSettings.hasSettingDefinitions("Scene/far clip distance"))
|
int farClipDist = userSettings.setting("Scene/far clip distance", (QStringList() << QString("300000"))).toInt();
|
||||||
farClipDist = userSettings.settingValue("Scene/far clip distance").toInt();
|
|
||||||
else
|
|
||||||
userSettings.setDefinitions("Scene/far clip distance", (QStringList() << QString(farClipDist)));
|
|
||||||
mCamera->setFarClipDistance (farClipDist);
|
mCamera->setFarClipDistance (farClipDist);
|
||||||
|
|
||||||
if(userSettings.hasSettingDefinitions("Scene/fast factor"))
|
mFastFactor = userSettings.setting("Scene/fast factor", (QStringList() << QString("4"))).toInt();
|
||||||
mFastFactor = userSettings.settingValue("Scene/fast factor").toInt();
|
|
||||||
else
|
|
||||||
userSettings.setDefinitions("Scene/fast factor", (QStringList() << QString(mFastFactor)));
|
|
||||||
|
|
||||||
mCamera->roll (Ogre::Degree (90));
|
mCamera->roll (Ogre::Degree (90));
|
||||||
|
|
||||||
|
@ -67,11 +61,7 @@ namespace CSVRender
|
||||||
|
|
||||||
connect (timer, SIGNAL (timeout()), this, SLOT (update()));
|
connect (timer, SIGNAL (timeout()), this, SLOT (update()));
|
||||||
|
|
||||||
int timerStart = 20;
|
int timerStart = userSettings.setting("Scene/timer start", (QStringList() << QString("20"))).toInt();
|
||||||
if(userSettings.hasSettingDefinitions("Scene/timer start"))
|
|
||||||
timerStart = userSettings.settingValue("Scene/timer start").toInt();
|
|
||||||
else
|
|
||||||
userSettings.setDefinitions("Scene/timer start", (QStringList() << QString(timerStart)));
|
|
||||||
timer->start (timerStart);
|
timer->start (timerStart);
|
||||||
|
|
||||||
/// \todo make shortcut configurable
|
/// \todo make shortcut configurable
|
||||||
|
|
|
@ -1,273 +1,100 @@
|
||||||
#include "dialog.hpp"
|
#include "dialog.hpp"
|
||||||
|
|
||||||
|
#include <QListWidgetItem>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QDesktopWidget>
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
#include <QStackedWidget>
|
||||||
|
#include <QtGui>
|
||||||
|
|
||||||
#include "../../model/settings/usersettings.hpp"
|
#include "../../model/settings/usersettings.hpp"
|
||||||
|
|
||||||
#include "page.hpp"
|
#include "page.hpp"
|
||||||
|
|
||||||
#include <OgreRoot.h>
|
#include <QApplication>
|
||||||
#include <boost/math/common_factor.hpp>
|
|
||||||
|
|
||||||
namespace {
|
#include <QSplitter>
|
||||||
|
|
||||||
QRect getMaximumResolution()
|
#include <QTreeView>
|
||||||
|
#include <QListView>
|
||||||
|
#include <QTableView>
|
||||||
|
|
||||||
|
#include <QStandardItemModel>
|
||||||
|
#include <QStandardItem>
|
||||||
|
|
||||||
|
CSVSettings::Dialog::Dialog(QMainWindow *parent)
|
||||||
|
: mStackedWidget (0), mDebugMode (false), SettingWindow (parent)
|
||||||
{
|
{
|
||||||
QRect max;
|
setWindowTitle(QString::fromUtf8 ("User Settings"));
|
||||||
int screens = QApplication::desktop()->screenCount();
|
|
||||||
for(int i = 0; i < screens; ++i)
|
setupDialog();
|
||||||
{
|
|
||||||
QRect res = QApplication::desktop()->screenGeometry(i);
|
connect (mPageListWidget,
|
||||||
if(res.width() > max.width())
|
SIGNAL (currentItemChanged(QListWidgetItem*, QListWidgetItem*)),
|
||||||
max.setWidth(res.width());
|
this,
|
||||||
if(res.height() > max.height())
|
SLOT (slotChangePage (QListWidgetItem*, QListWidgetItem*)));
|
||||||
max.setHeight(res.height());
|
|
||||||
}
|
|
||||||
return max;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString getAspect(int x, int y)
|
void CSVSettings::Dialog::slotChangePage
|
||||||
|
(QListWidgetItem *cur, QListWidgetItem *prev)
|
||||||
{
|
{
|
||||||
int gcd = boost::math::gcd (x, y);
|
mStackedWidget->changePage
|
||||||
int xaspect = x / gcd;
|
(mPageListWidget->row (cur), mPageListWidget->row (prev));
|
||||||
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));
|
layout()->activate();
|
||||||
|
setFixedSize(minimumSizeHint());
|
||||||
}
|
}
|
||||||
|
|
||||||
QString getCurrentOgreResolution()
|
void CSVSettings::Dialog::setupDialog()
|
||||||
{
|
{
|
||||||
Ogre::ConfigOptionMap& renderOpt =
|
//create central widget with it's layout and immediate children
|
||||||
Ogre::Root::getSingleton().getRenderSystem()->getConfigOptions();
|
QWidget *centralWidget = new QGroupBox (this);
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
bool customCompare(const QString &s1, const QString &s2)
|
centralWidget->setLayout (new QHBoxLayout());
|
||||||
{
|
centralWidget->setSizePolicy (QSizePolicy::Expanding, QSizePolicy::Preferred);
|
||||||
int x1, x2, y1, y2;
|
setCentralWidget (centralWidget);
|
||||||
QRegExp re("^(\\d+) x (\\d+)");
|
setDockOptions (QMainWindow::AllowNestedDocks);
|
||||||
|
|
||||||
if(re.indexIn(s1) > -1)
|
buildPageListWidget (centralWidget);
|
||||||
{
|
buildStackedWidget (centralWidget);
|
||||||
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();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(x1 == x2)
|
|
||||||
return y1 > y2;
|
|
||||||
else
|
|
||||||
return x1 > x2;
|
|
||||||
}
|
|
||||||
|
|
||||||
QStringList getAvailableResolutions()
|
|
||||||
{
|
|
||||||
// store available rendering devices and available resolutions
|
|
||||||
QStringList result;
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
CSVSettings::Dialog::Dialog(QTabWidget *parent)
|
|
||||||
: mDebugMode (false), SettingWindow (parent)
|
|
||||||
{
|
|
||||||
setObjectName(QString::fromUtf8 ("User Settings"));
|
|
||||||
|
|
||||||
setupUi(this);
|
|
||||||
|
|
||||||
// Set the maximum res we can set in windowed mode
|
|
||||||
QRect res = getMaximumResolution();
|
|
||||||
sbWidth->setMaximum(res.width());
|
|
||||||
sbHeight->setMaximum(res.height());
|
|
||||||
|
|
||||||
connect(cbOverride, SIGNAL(toggled(bool)), this, SLOT(slotOverrideToggled(bool)));
|
|
||||||
connect(cmbRenderSys, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(slotRendererChanged(const QString&)));
|
|
||||||
|
|
||||||
displayGroup_Window->installEventFilter(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return QTabWidget::eventFilter(target, event);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CSVSettings::Dialog::slotRendererChanged(const QString &renderer)
|
|
||||||
{
|
|
||||||
cmbAntiAlias->clear();
|
|
||||||
cmbAntiAlias->addItems(model()->getOgreOptions(QString("FSAA"), renderer));
|
|
||||||
|
|
||||||
cmbShaderLang->clear();
|
|
||||||
cmbShaderLang->addItems(model()->getShaderLanguageByRenderer(renderer));
|
|
||||||
}
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSVSettings::Dialog::buildPages()
|
void CSVSettings::Dialog::buildPages()
|
||||||
{
|
{
|
||||||
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);
|
|
||||||
|
|
||||||
// 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 ();
|
SettingWindow::createPages ();
|
||||||
|
|
||||||
|
QFontMetrics fm (QApplication::font());
|
||||||
|
|
||||||
foreach (Page *page, SettingWindow::pages())
|
foreach (Page *page, SettingWindow::pages())
|
||||||
{
|
{
|
||||||
QString pageName = page->objectName();
|
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
|
int textWidth = fm.width(pageName);
|
||||||
page->showWidgets();
|
|
||||||
|
new QListWidgetItem (pageName, mPageListWidget);
|
||||||
|
mPageListWidget->setFixedWidth (textWidth + 50);
|
||||||
|
|
||||||
|
mStackedWidget->addWidget (&dynamic_cast<QWidget &>(*(page)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resize (mStackedWidget->sizeHint());
|
||||||
|
}
|
||||||
|
|
||||||
|
void CSVSettings::Dialog::buildPageListWidget (QWidget *centralWidget)
|
||||||
|
{
|
||||||
|
mPageListWidget = new QListWidget (centralWidget);
|
||||||
|
mPageListWidget->setMinimumWidth(50);
|
||||||
|
mPageListWidget->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Expanding);
|
||||||
|
|
||||||
|
mPageListWidget->setSelectionBehavior (QAbstractItemView::SelectItems);
|
||||||
|
|
||||||
|
centralWidget->layout()->addWidget(mPageListWidget);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CSVSettings::Dialog::buildStackedWidget (QWidget *centralWidget)
|
||||||
|
{
|
||||||
|
mStackedWidget = new ResizeableStackedWidget (centralWidget);
|
||||||
|
|
||||||
|
centralWidget->layout()->addWidget (mStackedWidget);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSVSettings::Dialog::closeEvent (QCloseEvent *event)
|
void CSVSettings::Dialog::closeEvent (QCloseEvent *event)
|
||||||
|
@ -276,59 +103,6 @@ void CSVSettings::Dialog::closeEvent (QCloseEvent *event)
|
||||||
//model is updated
|
//model is updated
|
||||||
SettingWindow::closeEvent (event);
|
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();
|
saveSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -340,20 +114,8 @@ void CSVSettings::Dialog::show()
|
||||||
setViewValues();
|
setViewValues();
|
||||||
}
|
}
|
||||||
|
|
||||||
QWidget *currView = QApplication::activeWindow();
|
QPoint screenCenter = QApplication::desktop()->screenGeometry().center();
|
||||||
if(currView)
|
|
||||||
{
|
move (screenCenter - geometry().center());
|
||||||
// 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));
|
|
||||||
}
|
|
||||||
QWidget::show();
|
QWidget::show();
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,23 +2,28 @@
|
||||||
#define CSVSETTINGS_DIALOG_H
|
#define CSVSETTINGS_DIALOG_H
|
||||||
|
|
||||||
#include "settingwindow.hpp"
|
#include "settingwindow.hpp"
|
||||||
|
#include "resizeablestackedwidget.hpp"
|
||||||
#include <QStandardItem>
|
#include <QStandardItem>
|
||||||
|
|
||||||
#include "ui_settingstab.h"
|
class QStackedWidget;
|
||||||
|
class QListWidget;
|
||||||
|
class QListWidgetItem;
|
||||||
|
|
||||||
namespace CSVSettings {
|
namespace CSVSettings {
|
||||||
|
|
||||||
class Page;
|
class Page;
|
||||||
|
|
||||||
class Dialog : public SettingWindow, private Ui::TabWidget
|
class Dialog : public SettingWindow
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
QListWidget *mPageListWidget;
|
||||||
|
ResizeableStackedWidget *mStackedWidget;
|
||||||
bool mDebugMode;
|
bool mDebugMode;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
explicit Dialog (QTabWidget *parent = 0);
|
explicit Dialog (QMainWindow *parent = 0);
|
||||||
|
|
||||||
///Enables setting debug mode. When the dialog opens, a page is created
|
///Enables setting debug mode. When the dialog opens, a page is created
|
||||||
///which displays the SettingModel's contents in a Tree view.
|
///which displays the SettingModel's contents in a Tree view.
|
||||||
|
@ -29,11 +34,13 @@ namespace CSVSettings {
|
||||||
/// Settings are written on close
|
/// Settings are written on close
|
||||||
void closeEvent (QCloseEvent *event);
|
void closeEvent (QCloseEvent *event);
|
||||||
|
|
||||||
bool eventFilter(QObject *target, QEvent *event);
|
void setupDialog();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void buildPages();
|
void buildPages();
|
||||||
|
void buildPageListWidget (QWidget *centralWidget);
|
||||||
|
void buildStackedWidget (QWidget *centralWidget);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
|
@ -41,8 +48,7 @@ namespace CSVSettings {
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
void slotOverrideToggled(bool checked);
|
void slotChangePage (QListWidgetItem *, QListWidgetItem *);
|
||||||
void slotRendererChanged(const QString &renderer);
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#endif // CSVSETTINGS_DIALOG_H
|
#endif // CSVSETTINGS_DIALOG_H
|
||||||
|
|
|
@ -1,16 +1,15 @@
|
||||||
#include "settingwindow.hpp"
|
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
#include "../../model/settings/setting.hpp"
|
#include "../../model/settings/setting.hpp"
|
||||||
#include "../../model/settings/connector.hpp"
|
#include "../../model/settings/connector.hpp"
|
||||||
#include "../../model/settings/usersettings.hpp"
|
#include "../../model/settings/usersettings.hpp"
|
||||||
|
#include "settingwindow.hpp"
|
||||||
#include "page.hpp"
|
#include "page.hpp"
|
||||||
#include "view.hpp"
|
#include "view.hpp"
|
||||||
|
|
||||||
CSVSettings::SettingWindow::SettingWindow(QTabWidget *parent)
|
CSVSettings::SettingWindow::SettingWindow(QWidget *parent)
|
||||||
: QTabWidget(parent)
|
: QMainWindow(parent)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
void CSVSettings::SettingWindow::createPages()
|
void CSVSettings::SettingWindow::createPages()
|
||||||
|
@ -20,7 +19,7 @@ void CSVSettings::SettingWindow::createPages()
|
||||||
QList <CSMSettings::Setting *> connectedSettings;
|
QList <CSMSettings::Setting *> connectedSettings;
|
||||||
|
|
||||||
foreach (const QString &pageName, pageMap.keys())
|
foreach (const QString &pageName, pageMap.keys())
|
||||||
{
|
{
|
||||||
QList <CSMSettings::Setting *> pageSettings = pageMap.value (pageName);
|
QList <CSMSettings::Setting *> pageSettings = pageMap.value (pageName);
|
||||||
|
|
||||||
mPages.append (new Page (pageName, pageSettings, this));
|
mPages.append (new Page (pageName, pageSettings, this));
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef CSVSETTINGS_SETTINGWINDOW_HPP
|
#ifndef CSVSETTINGS_SETTINGWINDOW_HPP
|
||||||
#define CSVSETTINGS_SETTINGWINDOW_HPP
|
#define CSVSETTINGS_SETTINGWINDOW_HPP
|
||||||
|
|
||||||
#include <QTabWidget>
|
#include <QMainWindow>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
|
|
||||||
#include "../../model/settings/support.hpp"
|
#include "../../model/settings/support.hpp"
|
||||||
|
@ -18,7 +18,7 @@ namespace CSVSettings {
|
||||||
|
|
||||||
typedef QList <Page *> PageList;
|
typedef QList <Page *> PageList;
|
||||||
|
|
||||||
class SettingWindow : public QTabWidget
|
class SettingWindow : public QMainWindow
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ namespace CSVSettings {
|
||||||
CSMSettings::UserSettings *mModel;
|
CSMSettings::UserSettings *mModel;
|
||||||
|
|
||||||
public:
|
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
|
///retrieve a reference to a view based on it's page and setting name
|
||||||
View *findView (const QString &pageName, const QString &setting);
|
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
|
///sets the defined values for the views that have been created
|
||||||
void setViewValues();
|
void setViewValues();
|
||||||
|
|
||||||
CSMSettings::UserSettings *model() { return mModel; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
///create connections between settings (used for proxy settings)
|
///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…
Reference in a new issue