added tooltip support to user settings UI

loadfix
Marc Zinnschlag 10 years ago
parent 7de6360695
commit ed44f3ec7d

@ -375,6 +375,16 @@ QString CSMSettings::Setting::getLabel() const
return property (Property_Label).at (0);
}
void CSMSettings::Setting::setToolTip (const QString& toolTip)
{
setProperty (Property_ToolTip, toolTip);
}
QString CSMSettings::Setting::getToolTip() const
{
return property (Property_ToolTip).at (0);
}
void CSMSettings::Setting::setProperty (SettingProperty prop, bool value)
{
setProperty (prop, QStringList() << QVariant (value).toString());

@ -135,6 +135,9 @@ namespace CSMSettings
void setLabel (const QString& label);
QString getLabel() const;
void setToolTip (const QString& toolTip);
QString getToolTip() const;
///returns the specified property value
QStringList property (SettingProperty prop) const;

@ -37,12 +37,13 @@ namespace CSMSettings
Property_TicksBelow = 21,
Property_StyleSheet = 22,
Property_Label = 23,
Property_ToolTip = 24,
//Stringlists should always be the last items
Property_DefaultValues = 24,
Property_DeclaredValues = 25,
Property_DefinedValues = 26,
Property_Proxies = 27
Property_DefaultValues = 25,
Property_DeclaredValues = 26,
Property_DefinedValues = 27,
Property_Proxies = 28
};
///Basic setting widget types.

@ -19,6 +19,9 @@ CSVSettings::View::View(CSMSettings::Setting *setting,
mSerializable (setting->serializable()),
Frame(true, setting->getLabel(), parent)
{
if (!setting->getToolTip().isEmpty())
setToolTip (setting->getToolTip());
setObjectName (setting->name());
buildView();
buildModel (setting);

Loading…
Cancel
Save