|
|
|
@ -51,7 +51,7 @@ void CSMSettings::UserSettings::buildSettingModelDefaults()
|
|
|
|
|
Setting *height = createSetting (Type_LineEdit, section, "Height");
|
|
|
|
|
|
|
|
|
|
width->setWidgetWidth (5);
|
|
|
|
|
height->setWidgetWidth (5);
|
|
|
|
|
height->setWidgetWidth (8);
|
|
|
|
|
|
|
|
|
|
width->setDefaultValues (QStringList() << "1024");
|
|
|
|
|
height->setDefaultValues (QStringList() << "768");
|
|
|
|
@ -66,13 +66,10 @@ void CSMSettings::UserSettings::buildSettingModelDefaults()
|
|
|
|
|
*Create the proxy setting for predefined values
|
|
|
|
|
*/
|
|
|
|
|
Setting *preDefined = createSetting (Type_ComboBox, section,
|
|
|
|
|
"Pre-Defined",
|
|
|
|
|
QStringList()
|
|
|
|
|
<< "640 x 480"
|
|
|
|
|
<< "800 x 600"
|
|
|
|
|
<< "1024 x 768"
|
|
|
|
|
<< "1440 x 900"
|
|
|
|
|
);
|
|
|
|
|
"Pre-Defined");
|
|
|
|
|
|
|
|
|
|
preDefined->setDeclaredValues (QStringList() << "640 x 480"
|
|
|
|
|
<< "800 x 600" << "1024 x 768" << "1440 x 900");
|
|
|
|
|
|
|
|
|
|
preDefined->setViewLocation (1, 1);
|
|
|
|
|
preDefined->setWidgetWidth (10);
|
|
|
|
@ -95,12 +92,13 @@ void CSMSettings::UserSettings::buildSettingModelDefaults()
|
|
|
|
|
<< defaultValue << "Icon Only" << "Text Only";
|
|
|
|
|
|
|
|
|
|
Setting *rsd = createSetting (Type_RadioButton,
|
|
|
|
|
section, "Record Status Display",
|
|
|
|
|
values);
|
|
|
|
|
section, "Record Status Display");
|
|
|
|
|
|
|
|
|
|
Setting *ritd = createSetting (Type_RadioButton,
|
|
|
|
|
section, "Referenceable ID Type Display",
|
|
|
|
|
values);
|
|
|
|
|
section, "Referenceable ID Type Display");
|
|
|
|
|
|
|
|
|
|
rsd->setDeclaredValues (values);
|
|
|
|
|
ritd->setDeclaredValues (values);
|
|
|
|
|
|
|
|
|
|
rsd->setEditorSetting (true);
|
|
|
|
|
ritd->setEditorSetting (true);
|
|
|
|
@ -108,44 +106,67 @@ void CSMSettings::UserSettings::buildSettingModelDefaults()
|
|
|
|
|
|
|
|
|
|
section = "Proxy Selection Test";
|
|
|
|
|
{
|
|
|
|
|
//create three setting objects, specifying the basic widget type,
|
|
|
|
|
//the setting view name, the page name, and the default value
|
|
|
|
|
/******************************************************************
|
|
|
|
|
* There are three types of values:
|
|
|
|
|
*
|
|
|
|
|
* Declared values
|
|
|
|
|
*
|
|
|
|
|
* Pre-determined values, typically for
|
|
|
|
|
* combobox drop downs and boolean (radiobutton / checkbox) labels.
|
|
|
|
|
* These values represent the total possible list of values that
|
|
|
|
|
* may define a setting. No other values are allowed.
|
|
|
|
|
*
|
|
|
|
|
* Defined values
|
|
|
|
|
*
|
|
|
|
|
* Values which represent the actual, current value of
|
|
|
|
|
* a setting. For settings with declared values, this must be one or
|
|
|
|
|
* several declared values, as appropriate.
|
|
|
|
|
*
|
|
|
|
|
* Proxy values - values the proxy master updates the proxy slave when
|
|
|
|
|
* it's own definition is set / changed. These are definitions for
|
|
|
|
|
* proxy slave settings, but must match any declared values the proxy
|
|
|
|
|
* slave has, if any.
|
|
|
|
|
*******************************************************************/
|
|
|
|
|
|
|
|
|
|
//create setting objects, specifying the basic widget type,
|
|
|
|
|
//the page name, and the view name
|
|
|
|
|
/*
|
|
|
|
|
Setting *masterBoolean = createSetting (Type_RadioButton, section,
|
|
|
|
|
"Master Proxy",
|
|
|
|
|
QStringList()
|
|
|
|
|
<< "Profile One" << "Profile Two"
|
|
|
|
|
<< "Profile Three" << "Profile Four"
|
|
|
|
|
);
|
|
|
|
|
"Master Proxy");
|
|
|
|
|
|
|
|
|
|
Setting *slaveBoolean = createSetting (Type_CheckBox, section,
|
|
|
|
|
"Proxy Checkboxes",
|
|
|
|
|
QStringList() << "One" << "Two"
|
|
|
|
|
<< "Three" << "Four" << "Five"
|
|
|
|
|
);
|
|
|
|
|
"Proxy Checkboxes");
|
|
|
|
|
|
|
|
|
|
Setting *slaveSingleText = createSetting (Type_LineEdit, section,
|
|
|
|
|
"Proxy TextBox 1"
|
|
|
|
|
);
|
|
|
|
|
"Proxy TextBox 1");
|
|
|
|
|
|
|
|
|
|
Setting *slaveMultiText = createSetting (Type_LineEdit, section,
|
|
|
|
|
"ProxyTextBox 2"
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
// There are three types of values:
|
|
|
|
|
//
|
|
|
|
|
// Declared values - Pre-determined values, typically for
|
|
|
|
|
// combobox drop downs and boolean (radiobutton / checkbox) labels.
|
|
|
|
|
// These values represent the total possible list of values that may
|
|
|
|
|
// define a setting. No other values are allowed.
|
|
|
|
|
//
|
|
|
|
|
// Defined values - Values which represent the atual, current value of
|
|
|
|
|
// a setting. For settings with declared values, this must be one or
|
|
|
|
|
// several declared values, as appropriate.
|
|
|
|
|
//
|
|
|
|
|
// Proxy values - values the proxy master updates the proxy slave when
|
|
|
|
|
// it's own definition is set / changed. These are definitions for
|
|
|
|
|
// proxy slave settings, but must match any declared values the proxy
|
|
|
|
|
// slave has, if any.
|
|
|
|
|
"ProxyTextBox 2");
|
|
|
|
|
|
|
|
|
|
Setting *slaveAlphaSpinbox = createSetting (Type_SpinBox, section,
|
|
|
|
|
"Alpha Spinbox");
|
|
|
|
|
|
|
|
|
|
Setting *slaveIntegerSpinbox = createSetting (Type_SpinBox, section,
|
|
|
|
|
"Int Spinbox");
|
|
|
|
|
|
|
|
|
|
Setting *slaveDoubleSpinbox = createSetting (Type_DoubleSpinBox,
|
|
|
|
|
section, "Double Spinbox");
|
|
|
|
|
|
|
|
|
|
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"
|
|
|
|
|
<< "Profile Three" << "Profile Four");
|
|
|
|
|
|
|
|
|
|
slaveBoolean->setDeclaredValues (QStringList()
|
|
|
|
|
<< "One" << "Two" << "Three" << "Four" << "Five");
|
|
|
|
|
|
|
|
|
|
slaveAlphaSpinbox->setDeclaredValues (QStringList()
|
|
|
|
|
<< "One" << "Two" << "Three" << "Four");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
masterBoolean->addProxy (slaveBoolean, QList <QStringList>()
|
|
|
|
|
<< (QStringList() << "One" << "Three")
|
|
|
|
@ -168,11 +189,47 @@ void CSMSettings::UserSettings::buildSettingModelDefaults()
|
|
|
|
|
<< (QStringList() << "Two" << "Four")
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
masterBoolean->addProxy (slaveAlphaSpinbox, QList <QStringList>()
|
|
|
|
|
<< (QStringList() << "Four")
|
|
|
|
|
<< (QStringList() << "Three")
|
|
|
|
|
<< (QStringList() << "Two")
|
|
|
|
|
<< (QStringList() << "One"));
|
|
|
|
|
|
|
|
|
|
masterBoolean->addProxy (slaveIntegerSpinbox, QList <QStringList> ()
|
|
|
|
|
<< (QStringList() << "0")
|
|
|
|
|
<< (QStringList() << "7")
|
|
|
|
|
<< (QStringList() << "14")
|
|
|
|
|
<< (QStringList() << "21"));
|
|
|
|
|
|
|
|
|
|
masterBoolean->addProxy (slaveDoubleSpinbox, QList <QStringList> ()
|
|
|
|
|
<< (QStringList() << "0.17")
|
|
|
|
|
<< (QStringList() << "0.34")
|
|
|
|
|
<< (QStringList() << "0.51")
|
|
|
|
|
<< (QStringList() << "0.68"));
|
|
|
|
|
|
|
|
|
|
masterBoolean->addProxy (slaveSlider, QList <QStringList> ()
|
|
|
|
|
<< (QStringList() << "25")
|
|
|
|
|
<< (QStringList() << "50")
|
|
|
|
|
<< (QStringList() << "75")
|
|
|
|
|
<< (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);
|
|
|
|
|
slaveSingleText->setSerializable (false);
|
|
|
|
|
slaveMultiText->setSerializable (false);
|
|
|
|
|
slaveAlphaSpinbox->setSerializable (false);
|
|
|
|
|
slaveIntegerSpinbox->setSerializable (false);
|
|
|
|
|
slaveDoubleSpinbox->setSerializable (false);
|
|
|
|
|
slaveSlider->setSerializable (false);
|
|
|
|
|
|
|
|
|
|
slaveBoolean->setDefaultValues (QStringList()
|
|
|
|
|
<< "One" << "Three" << "Five");
|
|
|
|
@ -184,7 +241,39 @@ void CSMSettings::UserSettings::buildSettingModelDefaults()
|
|
|
|
|
|
|
|
|
|
slaveSingleText->setWidgetWidth (24);
|
|
|
|
|
slaveMultiText->setWidgetWidth (24);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
slaveAlphaSpinbox->setDefaultValue ("Two");
|
|
|
|
|
slaveAlphaSpinbox->setWidgetWidth (20);
|
|
|
|
|
//slaveAlphaSpinbox->setPrefix ("No. ");
|
|
|
|
|
//slaveAlphaSpinbox->setSuffix ("!");
|
|
|
|
|
slaveAlphaSpinbox->setWrapping (true);
|
|
|
|
|
|
|
|
|
|
slaveIntegerSpinbox->setDefaultValue (14);
|
|
|
|
|
slaveIntegerSpinbox->setMinimum (0);
|
|
|
|
|
slaveIntegerSpinbox->setMaximum (58);
|
|
|
|
|
slaveIntegerSpinbox->setPrefix ("$");
|
|
|
|
|
slaveIntegerSpinbox->setSuffix (".00");
|
|
|
|
|
slaveIntegerSpinbox->setWidgetWidth (10);
|
|
|
|
|
slaveIntegerSpinbox->setSpecialValueText ("Nothing!");
|
|
|
|
|
|
|
|
|
|
slaveDoubleSpinbox->setDefaultValue (0.51);
|
|
|
|
|
slaveDoubleSpinbox->setSingleStep(0.17);
|
|
|
|
|
slaveDoubleSpinbox->setMaximum(4.0);
|
|
|
|
|
|
|
|
|
|
slaveSlider->setMinimum (0);
|
|
|
|
|
slaveSlider->setMaximum (100);
|
|
|
|
|
slaveSlider->setDefaultValue (75);
|
|
|
|
|
slaveSlider->setWidgetWidth (100);
|
|
|
|
|
slaveSlider->setTicksAbove (true);
|
|
|
|
|
slaveSlider->setTickInterval (25);
|
|
|
|
|
|
|
|
|
|
slaveDial->setMinimum (0);
|
|
|
|
|
slaveDial->setMaximum (100);
|
|
|
|
|
slaveDial->setSingleStep (5);
|
|
|
|
|
slaveDial->setDefaultValue (75);
|
|
|
|
|
slaveDial->setTickInterval (25);
|
|
|
|
|
*/
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CSMSettings::UserSettings::~UserSettings()
|
|
|
|
|