mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:23:52 +00:00
implemented QDial into RangeView class
This commit is contained in:
parent
4f876574c1
commit
3f737bbb44
3 changed files with 38 additions and 10 deletions
|
@ -95,6 +95,16 @@ QStringList CSMSettings::Setting::property (SettingProperty prop) const
|
|||
return mProperties.at(prop);
|
||||
}
|
||||
|
||||
void CSMSettings::Setting::setDefaultValue (int value)
|
||||
{
|
||||
setDefaultValues (QStringList() << QVariant (value).toString());
|
||||
}
|
||||
|
||||
void CSMSettings::Setting::setDefaultValue (double value)
|
||||
{
|
||||
setDefaultValues (QStringList() << QVariant (value).toString());
|
||||
}
|
||||
|
||||
void CSMSettings::Setting::setDefaultValue (const QString &value)
|
||||
{
|
||||
setDefaultValues (QStringList() << value);
|
||||
|
|
|
@ -45,6 +45,8 @@ namespace CSMSettings
|
|||
void setDefinedValues (QStringList list);
|
||||
QStringList definedValues() const;
|
||||
|
||||
void setDefaultValue (int value);
|
||||
void setDefaultValue (double value);
|
||||
void setDefaultValue (const QString &value);
|
||||
|
||||
void setDefaultValues (const QStringList &values);
|
||||
|
|
|
@ -154,6 +154,8 @@ void CSMSettings::UserSettings::buildSettingModelDefaults()
|
|||
|
||||
Setting *slaveSlider = createSetting (Type_Slider, section, "Slider");
|
||||
|
||||
Setting *slaveDial = createSetting (Type_Dial, section, "Dial");
|
||||
|
||||
//set declared values for selected views
|
||||
masterBoolean->setDeclaredValues (QStringList()
|
||||
<< "Profile One" << "Profile Two"
|
||||
|
@ -212,6 +214,13 @@ void CSMSettings::UserSettings::buildSettingModelDefaults()
|
|||
<< (QStringList() << "100")
|
||||
);
|
||||
|
||||
masterBoolean->addProxy (slaveDial, QList <QStringList> ()
|
||||
<< (QStringList() << "25")
|
||||
<< (QStringList() << "50")
|
||||
<< (QStringList() << "75")
|
||||
<< (QStringList() << "100")
|
||||
);
|
||||
|
||||
//settings with proxies are not serialized by default
|
||||
//other settings non-serialized for demo purposes
|
||||
slaveBoolean->setSerializable (false);
|
||||
|
@ -239,7 +248,7 @@ void CSMSettings::UserSettings::buildSettingModelDefaults()
|
|||
//slaveAlphaSpinbox->setSuffix ("!");
|
||||
slaveAlphaSpinbox->setWrapping (true);
|
||||
|
||||
slaveIntegerSpinbox->setDefaultValue ("14");
|
||||
slaveIntegerSpinbox->setDefaultValue (14);
|
||||
slaveIntegerSpinbox->setMinimum (0);
|
||||
slaveIntegerSpinbox->setMaximum (58);
|
||||
slaveIntegerSpinbox->setPrefix ("$");
|
||||
|
@ -247,16 +256,23 @@ void CSMSettings::UserSettings::buildSettingModelDefaults()
|
|||
slaveIntegerSpinbox->setWidgetWidth (10);
|
||||
slaveIntegerSpinbox->setSpecialValueText ("Nothing!");
|
||||
|
||||
slaveDoubleSpinbox->setDefaultValue ("0.51");
|
||||
slaveDoubleSpinbox->setDefaultValue (0.51);
|
||||
slaveDoubleSpinbox->setSingleStep(0.17);
|
||||
slaveDoubleSpinbox->setMaximum(4.0);
|
||||
|
||||
slaveSlider->setMinimum (0);
|
||||
slaveSlider->setMaximum (100);
|
||||
slaveSlider->setDefaultValue ("75");
|
||||
slaveSlider->setDefaultValue (75);
|
||||
slaveSlider->setWidgetWidth (100);
|
||||
slaveSlider->setTicksAbove (true);
|
||||
slaveSlider->setTickInterval (25);*/
|
||||
slaveSlider->setTickInterval (25);
|
||||
|
||||
slaveDial->setMinimum (0);
|
||||
slaveDial->setMaximum (100);
|
||||
slaveDial->setSingleStep (5);
|
||||
slaveDial->setDefaultValue (75);
|
||||
slaveDial->setTickInterval (25);
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue