hyperspyui.settings module
Created on Sat Dec 27 14:21:00 2014
@author: Vidar Tonaas Fauske
- class hyperspyui.settings.Settings(parent=None, group=None)
Bases:
object
- _get_groups(key)
- static clear_defaults()
Clear all settings in defaults group. Should only be run once during application start, as it will undo any defaults that have been set.
- get_enum_hint(key)
Returns the possible enum hint values if set, otherwise None.
- get_or_prompt(key, options, title='Prompt', descr='')
Gets the setting specified by key. If it is not set, prompts the user to select one option out of several. The prompt includes a checkbox to remember the answer (“Remember this setting”).
The option parameter should be a list of two-tuples, specifying an ordered list of option values, and labels.
- read(d, group=None, settings=None)
- static restore_from_defaults()
Clears all settings (except “defaults” group) and restores all settings from the defaults group.
- restore_key_default(key)
Restore a given setting to its default value.
- set_default(key, value)
Sets default value by writing into defaults group.
- set_enum_hint(key, options)
Indicate possible values for a setting.
The options are not strictly enforced, but can be used to indicate valid values to the user. A typical usecase is to allow the use of a combobox in a dialog to pick a value.
- write(d, group=None, settings=None)