Mantid
Loading...
Searching...
No Matches
Functions
MantidQt::MantidWidgets::QSettingsHelper Namespace Reference

Functions

template<typename T >
getSetting (std::string const &settingGroup, std::string const &settingName)
 Loads an individual setting from disk. More...
 
template<typename T >
std::map< std::string, T > getSettingsAsMap (std::string const &settingGroup)
 Loads a map of settings with the same type. More...
 
template<typename T >
void setSetting (std::string const &settingGroup, std::string const &settingName, T const &value)
 Sets the value of a specified setting. More...
 

Function Documentation

◆ getSetting()

template<typename T >
T MantidQt::MantidWidgets::QSettingsHelper::getSetting ( std::string const &  settingGroup,
std::string const &  settingName 
)

Loads an individual setting from disk.

Parameters
settingGroupThe name of the setting group
settingNameThe name of the setting
Returns
The value stored for the requested setting

Definition at line 29 of file QSettingsHelper.h.

◆ getSettingsAsMap()

template<typename T >
std::map< std::string, T > MantidQt::MantidWidgets::QSettingsHelper::getSettingsAsMap ( std::string const &  settingGroup)

Loads a map of settings with the same type.

This comparison is required as QVariant types are not properly encoded in ini files

Parameters
settingGroupThe name of the setting group
Returns
A map of the values stored for all settings matching the given type

Definition at line 45 of file QSettingsHelper.h.

◆ setSetting()

template<typename T >
void MantidQt::MantidWidgets::QSettingsHelper::setSetting ( std::string const &  settingGroup,
std::string const &  settingName,
T const &  value 
)

Sets the value of a specified setting.

Parameters
settingGroupThe name of the setting group
settingNameThe name of the setting
valueThe value of the named setting
Returns
void

Definition at line 75 of file QSettingsHelper.h.

References value.