mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 15:15:31 +00:00
added tooltip support to user settings UI
This commit is contained in:
parent
7de6360695
commit
ed44f3ec7d
4 changed files with 21 additions and 4 deletions
|
@ -375,6 +375,16 @@ QString CSMSettings::Setting::getLabel() const
|
||||||
return property (Property_Label).at (0);
|
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)
|
void CSMSettings::Setting::setProperty (SettingProperty prop, bool value)
|
||||||
{
|
{
|
||||||
setProperty (prop, QStringList() << QVariant (value).toString());
|
setProperty (prop, QStringList() << QVariant (value).toString());
|
||||||
|
|
|
@ -135,6 +135,9 @@ namespace CSMSettings
|
||||||
void setLabel (const QString& label);
|
void setLabel (const QString& label);
|
||||||
QString getLabel() const;
|
QString getLabel() const;
|
||||||
|
|
||||||
|
void setToolTip (const QString& toolTip);
|
||||||
|
QString getToolTip() const;
|
||||||
|
|
||||||
///returns the specified property value
|
///returns the specified property value
|
||||||
QStringList property (SettingProperty prop) const;
|
QStringList property (SettingProperty prop) const;
|
||||||
|
|
||||||
|
|
|
@ -37,12 +37,13 @@ namespace CSMSettings
|
||||||
Property_TicksBelow = 21,
|
Property_TicksBelow = 21,
|
||||||
Property_StyleSheet = 22,
|
Property_StyleSheet = 22,
|
||||||
Property_Label = 23,
|
Property_Label = 23,
|
||||||
|
Property_ToolTip = 24,
|
||||||
|
|
||||||
//Stringlists should always be the last items
|
//Stringlists should always be the last items
|
||||||
Property_DefaultValues = 24,
|
Property_DefaultValues = 25,
|
||||||
Property_DeclaredValues = 25,
|
Property_DeclaredValues = 26,
|
||||||
Property_DefinedValues = 26,
|
Property_DefinedValues = 27,
|
||||||
Property_Proxies = 27
|
Property_Proxies = 28
|
||||||
};
|
};
|
||||||
|
|
||||||
///Basic setting widget types.
|
///Basic setting widget types.
|
||||||
|
|
|
@ -19,6 +19,9 @@ CSVSettings::View::View(CSMSettings::Setting *setting,
|
||||||
mSerializable (setting->serializable()),
|
mSerializable (setting->serializable()),
|
||||||
Frame(true, setting->getLabel(), parent)
|
Frame(true, setting->getLabel(), parent)
|
||||||
{
|
{
|
||||||
|
if (!setting->getToolTip().isEmpty())
|
||||||
|
setToolTip (setting->getToolTip());
|
||||||
|
|
||||||
setObjectName (setting->name());
|
setObjectName (setting->name());
|
||||||
buildView();
|
buildView();
|
||||||
buildModel (setting);
|
buildModel (setting);
|
||||||
|
|
Loading…
Reference in a new issue