4.36. umbra.preferences — Umbra 1.0.8 documentation

### Navigation

- index
- modules |
- next |
- previous |
- Umbra 1.0.8 documentation »
- 4. Api »

# 4.36. umbra.preferences

preferences.py

Platform:
  Windows, Linux, Mac Os X.
Description:
  This module is the main Umbra package module.
  It defines various classes, methods and definitions to run, maintain and exit the Application.
  The main Application object is the `Umbra` class.

Others:

## 4.36.1. Module Attributes

`umbra.preferences.` `LOGGER`

## 4.36.2. Classes

class `umbra.preferences.` `Preferences`(file=None)

  Bases: `object`

  This class provides methods to manipulate Application preferences / settings.
  Those are stored and retrieved using a QSettings class.

  Parameters: | file – Current preferences file path. ( String )

  `file`

    This method is the property for self.__file attribute.

    Returns: | self.__file. ( String )

  `settings`

    This method is the property for self.__settings attribute.

    Returns: | self.__settings. ( QSettings )

  `defaultSettings`

    This method is the property for self.__defaultSettings attribute.

    Returns: | self.__defaultSettings. ( QSettings )

  `defaultLayoutsSettings`

    This method is the property for self.__defaultLayoutsSettings attribute.

    Returns: | self.__defaultLayoutsSettings. ( QSettings )

  `setKey`(section, key, value)

    This method stores given key in settings file.

    Parameters: | section – Current section to save the key into. ( String ) key – Current key to save. ( String ) value – Current key value to save. ( Object )

  `getKey`(section, key)

    This method gets key value from settings file.

    Parameters: | section – Current section to retrieve key from. ( String ) key – Current key to retrieve. ( String )
    Returns: | Current key value. ( Object )

  `setDefaultPreferences`()

    This method defines the default settings file content.

    Returns: | Method success. ( Boolean )

  `setDefaultLayouts`(ignoredLayouts=None)

    This method sets the default layouts in the preferences file.

    Parameters: | ignoredLayouts – Ignored layouts. ( Tuple / List )
    Returns: | Method success. ( Boolean )

### Navigation

- index
- modules |
- next |
- previous |
- Umbra 1.0.8 documentation »
- 4. Api »