The dip.settings module implements the infrastructure for application specific persistent storage typically used for user settings.
Base class: Interface
The ISettings class defines the interface that should be implemented by an object, often a view, that reads and writes user settings.
Restore the settings obtained from a settings manager.
Parameter: | settings_manager – is the settings manager. |
---|
Save the settings to a settings manager.
Parameter: | settings_manager – is the settings manager. |
---|
Base class: Interface
The ISettingsManager interface defines the API of a settings manager.
Load the application’s settings.
Parameters: |
|
---|
Read the value of a setting.
Parameter: | name – is the name of the setting. |
---|---|
Returns: | the value of the setting, or None if there is no such setting. |
Restore the settings for a sequence of models. If no settings have been loaded, i.e. load() has not been called, then this has no effect.
Parameter: | models – is the sequence of models. Any model that does not implement ISettings is ignored. |
---|
Save the settings for a sequence of models. If no settings have been loaded, i.e. load() has not been called, then this has no effect.
Parameter: | models – is the sequence of models. Any model that does not implement ISettings is ignored. |
---|
Write the value of a setting.
Parameters: |
|
---|
Base class: Interface
The ISettingsStorage class defines the interface that should be implemented by storage used to hold settings.
Begin a group.
Parameter: | group – is the name of the group. |
---|
Read the value of a setting.
Parameter: | name – is the name of the setting. |
---|---|
Returns: | the value of the setting, or None if there is no such setting. |
Write the value of a setting.
Parameters: |
|
---|