exopy.app.preferences.preferences module

Declarative class for defining hnadling of preferences.

class exopy.app.preferences.preferences.Preferences(parent=None, **kwargs)[source]

Bases: enaml.core.declarative.Declarative

Declarative class for defining a workbench preference contribution.

Preferences object can be contributed as extensions child to the ‘plugin’ extension point of a preference plugin.

saving_method

Name of the method of the plugin contributing this extension to call when the preference plugin need to save the preferences.

loading_method

Name of the method of the plugin contributing this extension to call when the preference plugin need to load preferences.

auto_save

The list of plugin members whose values should be observed and whose update should cause and automatic update of the preferences.

edit_view(workbench, id)[source]

Create a view to edit the preferences.

Parameters
  • workbench – Reference to the application workbench.

  • id (unicode) – Id of the plugin for which to generate the view.

Returns

view – View used to edit the preferences. It should have a model attribute. The model members must correspond to the tagged members the plugin, their values will be used to update the preferences.

Return type

enaml.widgets.api.Container