|
|
|
@ -30,183 +30,127 @@ namespace boost
|
|
|
|
|
} /* namespace boost */
|
|
|
|
|
#endif /* (BOOST_VERSION <= 104600) */
|
|
|
|
|
|
|
|
|
|
CSMSettings::UserSettings *CSMSettings::UserSettings::mUserSettingsInstance = 0;
|
|
|
|
|
CSMSettings::UserSettings *CSMSettings::UserSettings::sUserSettingsInstance = 0;
|
|
|
|
|
|
|
|
|
|
CSMSettings::UserSettings::UserSettings (const Files::ConfigurationManager& configurationManager)
|
|
|
|
|
: mCfgMgr (configurationManager)
|
|
|
|
|
, mSettingDefinitions(NULL)
|
|
|
|
|
, mSettingCfgDefinitions(NULL)
|
|
|
|
|
{
|
|
|
|
|
assert(!mUserSettingsInstance);
|
|
|
|
|
mUserSettingsInstance = this;
|
|
|
|
|
assert(!sUserSettingsInstance);
|
|
|
|
|
sUserSettingsInstance = this;
|
|
|
|
|
|
|
|
|
|
buildSettingModelDefaults();
|
|
|
|
|
|
|
|
|
|
// for overriding opencs.ini settings with those from settings.cfg
|
|
|
|
|
mSettingCfgDefinitions = new QSettings(QSettings::IniFormat, QSettings::UserScope, "", QString(), this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CSMSettings::UserSettings::buildSettingModelDefaults()
|
|
|
|
|
{
|
|
|
|
|
QString section;
|
|
|
|
|
|
|
|
|
|
section = "Objects";
|
|
|
|
|
declareSection ("3d-render", "3D Rendering");
|
|
|
|
|
{
|
|
|
|
|
Setting *numLights = createSetting (Type_SpinBox, section, "num_lights");
|
|
|
|
|
numLights->setDefaultValue(8);
|
|
|
|
|
numLights->setEditorSetting(true);
|
|
|
|
|
numLights->setColumnSpan (1);
|
|
|
|
|
numLights->setMinimum (0);
|
|
|
|
|
numLights->setMaximum (100); // FIXME: not sure what the max value should be
|
|
|
|
|
numLights->setWidgetWidth (10);
|
|
|
|
|
numLights->setViewLocation(1, 2);
|
|
|
|
|
|
|
|
|
|
Setting *shaders = createSetting (Type_CheckBox, section, "shaders");
|
|
|
|
|
shaders->setDeclaredValues(QStringList() << "true" << "false");
|
|
|
|
|
shaders->setDefaultValue("true");
|
|
|
|
|
shaders->setEditorSetting(true);
|
|
|
|
|
shaders->setSpecialValueText("Enable Shaders");
|
|
|
|
|
shaders->setWidgetWidth(25);
|
|
|
|
|
shaders->setColumnSpan (3);
|
|
|
|
|
shaders->setStyleSheet ("QGroupBox { border: 0px; }");
|
|
|
|
|
shaders->setViewLocation(2, 1);
|
|
|
|
|
Setting *shaders = createSetting (Type_CheckBox, "shaders", "Enable Shaders");
|
|
|
|
|
shaders->setDefaultValue ("true");
|
|
|
|
|
|
|
|
|
|
Setting *farClipDist = createSetting (Type_DoubleSpinBox, "far-clip-distance", "Far clipping distance");
|
|
|
|
|
farClipDist->setDefaultValue (300000);
|
|
|
|
|
farClipDist->setRange (0, 1000000);
|
|
|
|
|
farClipDist->setToolTip ("The maximum distance objects are still rendered at.");
|
|
|
|
|
|
|
|
|
|
QString defaultValue = "None";
|
|
|
|
|
Setting *antialiasing = createSetting (Type_ComboBox, "antialiasing", "Antialiasing");
|
|
|
|
|
antialiasing->setDeclaredValues (QStringList()
|
|
|
|
|
<< defaultValue << "MSAA 2" << "MSAA 4" << "MSAA 8" << "MSAA 16");
|
|
|
|
|
antialiasing->setDefaultValue (defaultValue);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
section = "Scene";
|
|
|
|
|
declareSection ("3d-render-adv", "3D Rendering (Advanced)");
|
|
|
|
|
{
|
|
|
|
|
Setting *fastFactor = createSetting (Type_SpinBox, section, "fast factor");
|
|
|
|
|
fastFactor->setDefaultValue(4);
|
|
|
|
|
fastFactor->setEditorSetting(true);
|
|
|
|
|
fastFactor->setColumnSpan (1);
|
|
|
|
|
fastFactor->setMinimum (1);
|
|
|
|
|
fastFactor->setSpecialValueText ("1"); // FIXME: workaround
|
|
|
|
|
fastFactor->setMaximum (100); // FIXME: not sure what the max value should be
|
|
|
|
|
fastFactor->setWidgetWidth (10);
|
|
|
|
|
fastFactor->setViewLocation(1, 2);
|
|
|
|
|
|
|
|
|
|
Setting *farClipDist = createSetting (Type_DoubleSpinBox, section, "far clip distance");
|
|
|
|
|
farClipDist->setDefaultValue(300000);
|
|
|
|
|
farClipDist->setEditorSetting(true);
|
|
|
|
|
farClipDist->setColumnSpan (1);
|
|
|
|
|
farClipDist->setMinimum (0);
|
|
|
|
|
farClipDist->setMaximum (1000000); // FIXME: not sure what the max value should be
|
|
|
|
|
farClipDist->setWidgetWidth (10);
|
|
|
|
|
farClipDist->setViewLocation(2, 2);
|
|
|
|
|
|
|
|
|
|
Setting *timerStart = createSetting (Type_SpinBox, section, "timer start");
|
|
|
|
|
timerStart->setDefaultValue(20);
|
|
|
|
|
timerStart->setEditorSetting(true);
|
|
|
|
|
timerStart->setColumnSpan (1);
|
|
|
|
|
timerStart->setMinimum (0);
|
|
|
|
|
timerStart->setMaximum (100); // FIXME: not sure what the max value should be
|
|
|
|
|
timerStart->setWidgetWidth (10);
|
|
|
|
|
timerStart->setViewLocation(3, 2);
|
|
|
|
|
Setting *numLights = createSetting (Type_SpinBox, "num_lights",
|
|
|
|
|
"Number of lights per pass");
|
|
|
|
|
numLights->setDefaultValue (8);
|
|
|
|
|
numLights->setRange (1, 100);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
section = "SubView";
|
|
|
|
|
declareSection ("scene-input", "Scene Input");
|
|
|
|
|
{
|
|
|
|
|
Setting *maxSubView = createSetting (Type_SpinBox, section, "max subviews");
|
|
|
|
|
maxSubView->setDefaultValue(256);
|
|
|
|
|
maxSubView->setEditorSetting(true);
|
|
|
|
|
maxSubView->setColumnSpan (1);
|
|
|
|
|
maxSubView->setMinimum (1);
|
|
|
|
|
maxSubView->setSpecialValueText ("1");
|
|
|
|
|
maxSubView->setMaximum (256); // FIXME: not sure what the max value should be
|
|
|
|
|
maxSubView->setWidgetWidth (10);
|
|
|
|
|
maxSubView->setViewLocation(1, 2);
|
|
|
|
|
|
|
|
|
|
Setting *minWidth = createSetting (Type_SpinBox, section, "minimum width");
|
|
|
|
|
minWidth->setDefaultValue(325);
|
|
|
|
|
minWidth->setEditorSetting(true);
|
|
|
|
|
minWidth->setColumnSpan (1);
|
|
|
|
|
minWidth->setMinimum (50);
|
|
|
|
|
minWidth->setSpecialValueText ("50");
|
|
|
|
|
minWidth->setMaximum (10000); // FIXME: not sure what the max value should be
|
|
|
|
|
minWidth->setWidgetWidth (10);
|
|
|
|
|
minWidth->setViewLocation(2, 2);
|
|
|
|
|
|
|
|
|
|
Setting *reuse = createSetting (Type_CheckBox, section, "reuse");
|
|
|
|
|
reuse->setDeclaredValues(QStringList() << "true" << "false");
|
|
|
|
|
reuse->setDefaultValue("true");
|
|
|
|
|
reuse->setEditorSetting(true);
|
|
|
|
|
reuse->setSpecialValueText("Reuse SubView");
|
|
|
|
|
reuse->setWidgetWidth(25);
|
|
|
|
|
reuse->setColumnSpan (3);
|
|
|
|
|
reuse->setStyleSheet ("QGroupBox { border: 0px; }");
|
|
|
|
|
reuse->setViewLocation(3, 2);
|
|
|
|
|
Setting *timer = createSetting (Type_SpinBox, "timer", "Input responsiveness");
|
|
|
|
|
timer->setDefaultValue (20);
|
|
|
|
|
timer->setRange (1, 100);
|
|
|
|
|
timer->setToolTip ("The time between two checks for user input in milliseconds.<p>"
|
|
|
|
|
"Lower value result in higher responsiveness.");
|
|
|
|
|
|
|
|
|
|
Setting *fastFactor = createSetting (Type_SpinBox, "fast-factor",
|
|
|
|
|
"Fast movement factor");
|
|
|
|
|
fastFactor->setDefaultValue (4);
|
|
|
|
|
fastFactor->setRange (1, 100);
|
|
|
|
|
fastFactor->setToolTip (
|
|
|
|
|
"Factor by which movement is speed up while the shift key is held down.");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
section = "Window Size";
|
|
|
|
|
declareSection ("window", "Window");
|
|
|
|
|
{
|
|
|
|
|
Setting *width = createSetting (Type_LineEdit, section, "Width");
|
|
|
|
|
Setting *height = createSetting (Type_LineEdit, section, "Height");
|
|
|
|
|
|
|
|
|
|
width->setWidgetWidth (5);
|
|
|
|
|
height->setWidgetWidth (8);
|
|
|
|
|
|
|
|
|
|
width->setDefaultValues (QStringList() << "1024");
|
|
|
|
|
height->setDefaultValues (QStringList() << "768");
|
|
|
|
|
|
|
|
|
|
width->setEditorSetting (true);
|
|
|
|
|
height->setEditorSetting (true);
|
|
|
|
|
|
|
|
|
|
height->setViewLocation (2,2);
|
|
|
|
|
width->setViewLocation (2,1);
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
*Create the proxy setting for predefined values
|
|
|
|
|
*/
|
|
|
|
|
Setting *preDefined = createSetting (Type_ComboBox, section,
|
|
|
|
|
"Pre-Defined");
|
|
|
|
|
|
|
|
|
|
preDefined->setDeclaredValues (QStringList() << "640 x 480"
|
|
|
|
|
<< "800 x 600" << "1024 x 768" << "1440 x 900");
|
|
|
|
|
|
|
|
|
|
Setting *preDefined = createSetting (Type_ComboBox, "pre-defined",
|
|
|
|
|
"Default window size");
|
|
|
|
|
preDefined->setEditorSetting (false);
|
|
|
|
|
preDefined->setDeclaredValues (
|
|
|
|
|
QStringList() << "640 x 480" << "800 x 600" << "1024 x 768" << "1440 x 900");
|
|
|
|
|
preDefined->setViewLocation (1, 1);
|
|
|
|
|
preDefined->setWidgetWidth (10);
|
|
|
|
|
preDefined->setColumnSpan (2);
|
|
|
|
|
preDefined->setToolTip ("Newly opened top-level windows will open with this size "
|
|
|
|
|
"(picked from a list of pre-defined values)");
|
|
|
|
|
|
|
|
|
|
preDefined->addProxy (width,
|
|
|
|
|
QStringList() << "640" << "800" << "1024" << "1440"
|
|
|
|
|
);
|
|
|
|
|
Setting *width = createSetting (Type_LineEdit, "default-width",
|
|
|
|
|
"Default window width");
|
|
|
|
|
width->setDefaultValues (QStringList() << "1024");
|
|
|
|
|
width->setViewLocation (2, 1);
|
|
|
|
|
width->setColumnSpan (1);
|
|
|
|
|
width->setToolTip ("Newly opened top-level windows will open with this width.");
|
|
|
|
|
preDefined->addProxy (width, QStringList() << "640" << "800" << "1024" << "1440");
|
|
|
|
|
|
|
|
|
|
preDefined->addProxy (height,
|
|
|
|
|
QStringList() << "480" << "600" << "768" << "900"
|
|
|
|
|
);
|
|
|
|
|
Setting *height = createSetting (Type_LineEdit, "default-height",
|
|
|
|
|
"Default window height");
|
|
|
|
|
height->setDefaultValues (QStringList() << "768");
|
|
|
|
|
height->setViewLocation (2, 2);
|
|
|
|
|
height->setColumnSpan (1);
|
|
|
|
|
height->setToolTip ("Newly opened top-level windows will open with this height.");
|
|
|
|
|
preDefined->addProxy (height, QStringList() << "480" << "600" << "768" << "900");
|
|
|
|
|
|
|
|
|
|
Setting *reuse = createSetting (Type_CheckBox, "reuse", "Reuse Subviews");
|
|
|
|
|
reuse->setDefaultValue ("true");
|
|
|
|
|
reuse->setToolTip ("When a new subview is requested and a matching subview already "
|
|
|
|
|
" exist, do not open a new subview and use the existing one instead.");
|
|
|
|
|
|
|
|
|
|
Setting *maxSubView = createSetting (Type_SpinBox, "max-subviews",
|
|
|
|
|
"Maximum number of subviews per top-level window");
|
|
|
|
|
maxSubView->setDefaultValue (256);
|
|
|
|
|
maxSubView->setRange (1, 256);
|
|
|
|
|
maxSubView->setToolTip ("If the maximum number is reached and a new subview is opened "
|
|
|
|
|
"it will be placed into a new top-level window.");
|
|
|
|
|
|
|
|
|
|
Setting *minWidth = createSetting (Type_SpinBox, "minimum-width",
|
|
|
|
|
"Minimum subview width");
|
|
|
|
|
minWidth->setDefaultValue (325);
|
|
|
|
|
minWidth->setRange (50, 10000);
|
|
|
|
|
minWidth->setToolTip ("Minimum width of subviews.");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
section = "Display Format";
|
|
|
|
|
declareSection ("records", "Records");
|
|
|
|
|
{
|
|
|
|
|
QString defaultValue = "Icon and Text";
|
|
|
|
|
QStringList values = QStringList() << defaultValue << "Icon Only" << "Text Only";
|
|
|
|
|
|
|
|
|
|
QStringList values = QStringList()
|
|
|
|
|
<< defaultValue << "Icon Only" << "Text Only";
|
|
|
|
|
|
|
|
|
|
Setting *rsd = createSetting (Type_RadioButton,
|
|
|
|
|
section, "Record Status Display");
|
|
|
|
|
|
|
|
|
|
Setting *ritd = createSetting (Type_RadioButton,
|
|
|
|
|
section, "Referenceable ID Type Display");
|
|
|
|
|
|
|
|
|
|
Setting *rsd = createSetting (Type_RadioButton, "status-format",
|
|
|
|
|
"Modification status display format");
|
|
|
|
|
rsd->setDefaultValue (defaultValue);
|
|
|
|
|
rsd->setDeclaredValues (values);
|
|
|
|
|
ritd->setDeclaredValues (values);
|
|
|
|
|
|
|
|
|
|
rsd->setEditorSetting (true);
|
|
|
|
|
ritd->setEditorSetting (true);
|
|
|
|
|
Setting *ritd = createSetting (Type_RadioButton, "type-format",
|
|
|
|
|
"ID type display format");
|
|
|
|
|
ritd->setDefaultValue (defaultValue);
|
|
|
|
|
ritd->setDeclaredValues (values);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
section = "Video";
|
|
|
|
|
{
|
|
|
|
|
QString defaultValue = "None";
|
|
|
|
|
QStringList values = QStringList()
|
|
|
|
|
<< defaultValue << "MSAA 2" << "MSAA 4" << "MSAA 8" << "MSAA 16";
|
|
|
|
|
Setting *antialiasing = createSetting (Type_SpinBox, section, "antialiasing");
|
|
|
|
|
antialiasing->setDeclaredValues (values);
|
|
|
|
|
antialiasing->setEditorSetting (true);
|
|
|
|
|
antialiasing->setWidgetWidth(15);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
section = "Proxy Selection Test";
|
|
|
|
|
{
|
|
|
|
|
/******************************************************************
|
|
|
|
|
* There are three types of values:
|
|
|
|
@ -382,7 +326,7 @@ void CSMSettings::UserSettings::buildSettingModelDefaults()
|
|
|
|
|
|
|
|
|
|
CSMSettings::UserSettings::~UserSettings()
|
|
|
|
|
{
|
|
|
|
|
mUserSettingsInstance = 0;
|
|
|
|
|
sUserSettingsInstance = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CSMSettings::UserSettings::loadSettings (const QString &fileName)
|
|
|
|
@ -411,13 +355,9 @@ void CSMSettings::UserSettings::loadSettings (const QString &fileName)
|
|
|
|
|
|
|
|
|
|
mSettingDefinitions = new QSettings
|
|
|
|
|
(QSettings::IniFormat, QSettings::UserScope, "opencs", QString(), this);
|
|
|
|
|
|
|
|
|
|
// check if override entry exists (default: disabled)
|
|
|
|
|
if(!mSettingDefinitions->childGroups().contains("Video", Qt::CaseInsensitive))
|
|
|
|
|
mSettingDefinitions->setValue("Video/use settings.cfg", "false");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// if the key is not found create one with a defaut value
|
|
|
|
|
// if the key is not found create one with a default value
|
|
|
|
|
QString CSMSettings::UserSettings::setting(const QString &viewKey, const QString &value)
|
|
|
|
|
{
|
|
|
|
|
if(mSettingDefinitions->contains(viewKey))
|
|
|
|
@ -451,23 +391,10 @@ QString CSMSettings::UserSettings::settingValue (const QString &settingKey)
|
|
|
|
|
{
|
|
|
|
|
QStringList defs;
|
|
|
|
|
|
|
|
|
|
// check if video settings are overriden
|
|
|
|
|
if(settingKey.contains(QRegExp("^Video\\b", Qt::CaseInsensitive)) &&
|
|
|
|
|
mSettingDefinitions->value("Video/use settings.cfg") == "true" &&
|
|
|
|
|
settingKey.contains(QRegExp("^Video/\\brender|antialiasing|vsync|fullscreen\\b", Qt::CaseInsensitive)))
|
|
|
|
|
{
|
|
|
|
|
if (!mSettingCfgDefinitions->contains (settingKey))
|
|
|
|
|
return QString();
|
|
|
|
|
else
|
|
|
|
|
defs = mSettingCfgDefinitions->value (settingKey).toStringList();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (!mSettingDefinitions->contains (settingKey))
|
|
|
|
|
return QString();
|
|
|
|
|
if (!mSettingDefinitions->contains (settingKey))
|
|
|
|
|
return QString();
|
|
|
|
|
|
|
|
|
|
defs = mSettingDefinitions->value (settingKey).toStringList();
|
|
|
|
|
}
|
|
|
|
|
defs = mSettingDefinitions->value (settingKey).toStringList();
|
|
|
|
|
|
|
|
|
|
if (defs.isEmpty())
|
|
|
|
|
return QString();
|
|
|
|
@ -477,8 +404,8 @@ QString CSMSettings::UserSettings::settingValue (const QString &settingKey)
|
|
|
|
|
|
|
|
|
|
CSMSettings::UserSettings& CSMSettings::UserSettings::instance()
|
|
|
|
|
{
|
|
|
|
|
assert(mUserSettingsInstance);
|
|
|
|
|
return *mUserSettingsInstance;
|
|
|
|
|
assert(sUserSettingsInstance);
|
|
|
|
|
return *sUserSettingsInstance;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CSMSettings::UserSettings::updateUserSetting(const QString &settingKey,
|
|
|
|
@ -486,11 +413,11 @@ void CSMSettings::UserSettings::updateUserSetting(const QString &settingKey,
|
|
|
|
|
{
|
|
|
|
|
mSettingDefinitions->setValue (settingKey ,list);
|
|
|
|
|
|
|
|
|
|
if(settingKey == "Objects/num_lights" && !list.empty())
|
|
|
|
|
if(settingKey == "3d-render-adv/num_lights" && !list.empty())
|
|
|
|
|
{
|
|
|
|
|
sh::Factory::getInstance ().setGlobalSetting ("num_lights", list.at(0).toStdString());
|
|
|
|
|
}
|
|
|
|
|
else if(settingKey == "Objects/shaders" && !list.empty())
|
|
|
|
|
else if(settingKey == "3d-render/shaders" && !list.empty())
|
|
|
|
|
{
|
|
|
|
|
sh::Factory::getInstance ().setShadersEnabled (list.at(0).toStdString() == "true" ? true : false);
|
|
|
|
|
}
|
|
|
|
@ -539,24 +466,57 @@ CSMSettings::SettingPageMap CSMSettings::UserSettings::settingPageMap() const
|
|
|
|
|
SettingPageMap pageMap;
|
|
|
|
|
|
|
|
|
|
foreach (Setting *setting, mSettings)
|
|
|
|
|
pageMap[setting->page()].append (setting);
|
|
|
|
|
{
|
|
|
|
|
SettingPageMap::iterator iter = pageMap.find (setting->page());
|
|
|
|
|
|
|
|
|
|
if (iter==pageMap.end())
|
|
|
|
|
{
|
|
|
|
|
QPair<QString, QList <Setting *> > value;
|
|
|
|
|
|
|
|
|
|
std::map<QString, QString>::const_iterator iter2 =
|
|
|
|
|
mSectionLabels.find (setting->page());
|
|
|
|
|
|
|
|
|
|
value.first = iter2!=mSectionLabels.end() ? iter2->second : "";
|
|
|
|
|
|
|
|
|
|
iter = pageMap.insert (setting->page(), value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
iter->second.append (setting);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return pageMap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CSMSettings::Setting *CSMSettings::UserSettings::createSetting
|
|
|
|
|
(CSMSettings::SettingType typ, const QString &page, const QString &name)
|
|
|
|
|
(CSMSettings::SettingType type, const QString &name, const QString& label)
|
|
|
|
|
{
|
|
|
|
|
//get list of all settings for the current setting name
|
|
|
|
|
if (findSetting (page, name))
|
|
|
|
|
{
|
|
|
|
|
qWarning() << "Duplicate declaration encountered: "
|
|
|
|
|
<< (name + '/' + page);
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
Setting *setting = new Setting (type, name, mSection, label);
|
|
|
|
|
|
|
|
|
|
// set useful defaults
|
|
|
|
|
int row = 1;
|
|
|
|
|
|
|
|
|
|
if (!mSettings.empty())
|
|
|
|
|
row = mSettings.back()->viewRow()+1;
|
|
|
|
|
|
|
|
|
|
setting->setViewLocation (row, 1);
|
|
|
|
|
|
|
|
|
|
setting->setColumnSpan (3);
|
|
|
|
|
|
|
|
|
|
int width = 10;
|
|
|
|
|
|
|
|
|
|
Setting *setting = new Setting (typ, name, page);
|
|
|
|
|
if (type==Type_CheckBox)
|
|
|
|
|
width = 40;
|
|
|
|
|
|
|
|
|
|
setting->setWidgetWidth (width);
|
|
|
|
|
|
|
|
|
|
if (type==Type_CheckBox)
|
|
|
|
|
setting->setStyleSheet ("QGroupBox { border: 0px; }");
|
|
|
|
|
|
|
|
|
|
if (type==Type_CheckBox)
|
|
|
|
|
setting->setDeclaredValues(QStringList() << "true" << "false");
|
|
|
|
|
|
|
|
|
|
if (type==Type_CheckBox)
|
|
|
|
|
setting->setSpecialValueText (setting->getLabel());
|
|
|
|
|
|
|
|
|
|
//add declaration to the model
|
|
|
|
|
mSettings.append (setting);
|
|
|
|
@ -564,6 +524,12 @@ CSMSettings::Setting *CSMSettings::UserSettings::createSetting
|
|
|
|
|
return setting;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CSMSettings::UserSettings::declareSection (const QString& page, const QString& label)
|
|
|
|
|
{
|
|
|
|
|
mSection = page;
|
|
|
|
|
mSectionLabels[page] = label;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QStringList CSMSettings::UserSettings::definitions (const QString &viewKey) const
|
|
|
|
|
{
|
|
|
|
|
if (mSettingDefinitions->contains (viewKey))
|
|
|
|
|