hyperspyui.widgets.settingsdialog module

Created on Sun Mar 01 18:26:38 2015

@author: Vidar Tonaas Fauske

class hyperspyui.widgets.settingsdialog.SettingsDialog(main_window, parent=None)

Bases: ExToolWindow


Add all child groups in settings as a separate tab, with editor widgets to change the values of each setting within those groups.

Treats the groups ‘PluginManager’ and ‘plugins’ specially: The former is ignored in its entirety, the latter is called recursively so that each plugin gets its own tab.


Create a widget for a settings instance, containing label/editor pairs for each setting in the current level of the passed QSettings instance. The key of the setting is used as the label, but it’s capitalized and underscores are replaced by spaces.


Callback when dialog is closed by OK-button.


Route button clicks to appropriate handler.


Callback for reset button. Prompts user for confirmation, then proceeds to reset settings to default values if confirmed, before updating controls and applying any changes (emits change signal if any changes).

_on_setting_changed(key, widget, *pysideargs)

Callback when the value of a settings editor widget has changed.

property apply_btn

The apply button.


Applies changes performed since dialog creation or last apply, whichever is most recent. Fires settings_changed Signal as long as there has been any changes.


Create UI controls.


int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.


pyqtSignal(*types, name


str = …, revision