# eric3.Preferences.__init__

Package implementing the preferences interface.

The preferences interface consists of a class, which defines the default values for all configuration items and stores the actual values. These values are read and written to the eric3 preferences file by module functions. On Windows the data is located in the registry, everywhere else it is stored in a file in a subdirectory of the users home directory. The individual configuration data is accessed by accessor functions defined on the module level. The module is simply imported wherever it is needed with the statement 'import Preferences'. Do not use 'from Preferences import *' to import it.

### Classes

Prefs | A class to hold all configuration items for the application.

### Functions

getCorba | Module function to retrieve the various corba settings.
getDebugger | Module function to retrieve the debugger settings.
getEditor | Module function to retrieve the various editor settings.
getEditorAPI | Module function to retrieve the various lists of api files.
getEditorColour | Module function to retrieve the various editor marker colours.
getEditorLexerAssoc | Module function to retrieve a lexer association.
getEditorLexerAssocs | Module function to retrieve all lexer associations.
getEditorOtherFonts | Module function to retrieve the various editor fonts except the lexer fonts.
getGeometry | Module function to retrieve the display geometry.
getHelp | Module function to retrieve the various help settings.
getIcons | Module function to retrieve the various Icons settings.
getMainDockLayout | Module function to retrieve the layout of the dock windows.
getPrinter | Module function to retrieve the various printer settings.
getProject | Module function to retrieve the various project handling settings.
getQt | Module function to retrieve the various Qt settings.
getQt4Dir | Module function to retrieve the QtDir setting.
getQtDir | Module function to retrieve the QtDir setting.
getRefactoring | Module function to retrieve the various refactoring settings.
getShell | Module function to retrieve the various shell settings.
getSystem | Module function to retrieve the various system settings.
getTasks | Module function to retrieve the Tasks related settings.
getTemplates | Module function to retrieve the Templates related settings.
getUI | Module function to retrieve the various UI settings.
getUILanguage | Module function to retrieve the language for the user interface.
getUILayout | Module function to retrieve the layout for the user interface.
getUser | Module function to retrieve the various user settings.
getVCS | Module function to retrieve the VCS related settings.
getVarFilters | Module function to retrieve the variables filter settings.
getViewManager | Module function to retrieve the selected viewmanager type.
initPreferences | Module function to initialize the central configuration store.
readPreferences | Module function to read the preferences and transfer them into the central store.
readToolbarSettings | Module function to read the toolbar settings from the central store.
readToolsMenu | Module function to read the tools menu configuration.
resetLayout | Module function to set a flag not storing the current layout.
savePreferences | Module function to write the preferences from the central store.
saveToolbarSettings | Module function to write the toolbar settings to the central store.
saveToolsMenu | Module function to write the tools menu configuration.
setCorba | Module function to store the various corba settings.
setDebugger | Module function to store the debugger settings.
setEditor | Module function to store the various editor settings.
setEditorAPI | Module function to store the various lists of api files.
setEditorColour | Module function to store the various editor marker colours.
setEditorLexerAssocs | Module function to retrieve all lexer associations.
setEditorOtherFonts | Module function to store the various editor fonts except the lexer fonts.
setGeometry | Module function to store the display geometry.
setHelp | Module function to store the various help settings.
setIcons | Module function to store the various Icons settings.
setMainDockLayout | Module function to store the layout of the dock windows.
setPrinter | Module function to store the various printer settings.
setProject | Module function to store the various project handling settings.
setQt | Module function to store the various Qt settings.
setRefactoring | Module function to store the various refactoring settings.
setShell | Module function to store the various shell settings.
setSystem | Module function to store the various system settings.
setTasks | Module function to store the Tasks related settings.
setTemplates | Module function to store the Templates related settings.
setUI | Module function to store the various UI settings.
setUILanguage | Module function to store the language for the user interface.
setUILayout | Module function to store the layout for the user interface.
setUser | Module function to store the various user settings.
setVCS | Module function to store the VCS related settings.
setVarFilters | Module function to store the variables filter settings.
setViewManager | Module function to store the selected viewmanager type.
syncPreferences | Module function to sync the preferences to disk.

## Prefs

A class to hold all configuration items for the application.

### Derived from

None

### Methods

None

Up

## getCorba

getCorba(key, prefClass = Prefs)

Module function to retrieve the various corba settings.

key
  the key of the value to get
prefClass
  preferences class used as the storage area

Returns:
  the requested corba setting

Up

## getDebugger

getDebugger(key, prefClass = Prefs)

Module function to retrieve the debugger settings.

key
  the key of the value to get
prefClass
  preferences class used as the storage area

Returns:
  the requested debugger setting

Up

## getEditor

getEditor(key, prefClass = Prefs)

Module function to retrieve the various editor settings.

key
  the key of the value to get
prefClass
  preferences class used as the storage area

Returns:
  the requested editor setting

Up

## getEditorAPI

getEditorAPI(key, prefClass = Prefs)

Module function to retrieve the various lists of api files.

key
  the key of the value to get
prefClass
  preferences class used as the storage area

Returns:
  the requested list of api files (QStringList)

Up

## getEditorColour

getEditorColour(key, prefClass = Prefs)

Module function to retrieve the various editor marker colours.

key
  the key of the value to get
prefClass
  preferences class used as the storage area

Returns:
  the requested editor colour

Up

## getEditorLexerAssoc

getEditorLexerAssoc(filename, prefClass = Prefs)

Module function to retrieve a lexer association.

filename
  filename used to determine the associated lexer language (string)
prefClass
  preferences class used as the storage area

Returns:
  the requested lexer language (string)

Up

## getEditorLexerAssocs

getEditorLexerAssocs(prefClass = Prefs)

Module function to retrieve all lexer associations.

prefClass
  preferences class used as the storage area

Returns:
  a reference to the list of lexer associations (dictionary of strings)

Up

## getEditorOtherFonts

getEditorOtherFonts(key, prefClass = Prefs)

Module function to retrieve the various editor fonts except the lexer fonts.

key
  the key of the value to get
prefClass
  preferences class used as the storage area

Returns:
  the requested editor font (QFont)

Up

## getGeometry

getGeometry(key, prefClass = Prefs)

Module function to retrieve the display geometry.

key
  the key of the value to get
prefClass
  preferences class used as the storage area

Returns:
  the requested geometry setting

Up

## getHelp

getHelp(key, prefClass = Prefs)

Module function to retrieve the various help settings.

key
  the key of the value to get
prefClass
  preferences class used as the storage area

Returns:
  the requested help setting

Up

## getIcons

getIcons(key, prefClass = Prefs)

Module function to retrieve the various Icons settings.

key
  the key of the value to get
prefClass
  preferences class used as the storage area

Returns:
  the requested Icons setting

Up

## getMainDockLayout

getMainDockLayout(mw, which, prefClass = Prefs)

Module function to retrieve the layout of the dock windows.

mw
  reference to the main window (QMainWindow)
which
  basic type of the dock layout (0 to 3)
prefClass
  preferences class used as the storage area

Returns:
  flag indicating success

Up

## getPrinter

getPrinter(key, prefClass = Prefs)

Module function to retrieve the various printer settings.

key
  the key of the value to get
prefClass
  preferences class used as the storage area

Returns:
  the requested printer setting

Up

## getProject

getProject(key, prefClass = Prefs)

Module function to retrieve the various project handling settings.

key
  the key of the value to get
prefClass
  preferences class used as the storage area

Returns:
  the requested project setting

Up

## getQt

getQt(key, prefClass = Prefs)

Module function to retrieve the various Qt settings.

key
  the key of the value to get
prefClass
  preferences class used as the storage area

Returns:
  the requested Qt setting

Up

## getQt4Dir

getQt4Dir(prefClass = Prefs)

Module function to retrieve the QtDir setting.

prefClass
  preferences class used as the storage area

Returns:
  the requested QtDir setting (string)

Up

## getQtDir

getQtDir(prefClass = Prefs)

Module function to retrieve the QtDir setting.

prefClass
  preferences class used as the storage area

Returns:
  the requested QtDir setting (string)

Up

## getRefactoring

getRefactoring(key, prefClass = Prefs)

Module function to retrieve the various refactoring settings.

key
  the key of the value to get
prefClass
  preferences class used as the storage area

Returns:
  the requested refactoring setting

Up

## getShell

getShell(key, prefClass = Prefs)

Module function to retrieve the various shell settings.

key
  the key of the value to get
prefClass
  preferences class used as the storage area

Returns:
  the requested shell setting

Up

## getSystem

getSystem(key, prefClass = Prefs)

Module function to retrieve the various system settings.

key
  the key of the value to get
prefClass
  preferences class used as the storage area

Returns:
  the requested system setting

Up

## getTasks

getTasks(key, prefClass = Prefs)

Module function to retrieve the Tasks related settings.

key
  the key of the value to get
prefClass
  preferences class used as the storage area

Returns:
  the requested user setting

Up

## getTemplates

getTemplates(key, prefClass = Prefs)

Module function to retrieve the Templates related settings.

key
  the key of the value to get
prefClass
  preferences class used as the storage area

Returns:
  the requested user setting

Up

## getUI

getUI(key, prefClass = Prefs)

Module function to retrieve the various UI settings.

key
  the key of the value to get
prefClass
  preferences class used as the storage area

Returns:
  the requested UI setting

Up

## getUILanguage

getUILanguage(prefClass = Prefs)

Module function to retrieve the language for the user interface.

prefClass
  preferences class used as the storage area

Returns:
  the language for the UI

Up

## getUILayout

getUILayout(prefClass = Prefs)

Module function to retrieve the layout for the user interface.

prefClass
  preferences class used as the storage area

Returns:
  the UI layout as a tuple of main layout, flag for an embedded shell and a value for an embedded file browser

Up

## getUser

getUser(key, prefClass = Prefs)

Module function to retrieve the various user settings.

key
  the key of the value to get
prefClass
  preferences class used as the storage area

Returns:
  the requested user setting

Up

## getVCS

getVCS(key, prefClass = Prefs)

Module function to retrieve the VCS related settings.

key
  the key of the value to get
prefClass
  preferences class used as the storage area

Returns:
  the requested user setting

Up

## getVarFilters

getVarFilters(prefClass = Prefs)

Module function to retrieve the variables filter settings.

prefClass
  preferences class used as the storage area

Returns:
  a tuple defing the variables filter

Up

## getViewManager

getViewManager(prefClass = Prefs)

Module function to retrieve the selected viewmanager type.

prefClass
  preferences class used as the storage area

Returns:
  the viewmanager type

Up

## initPreferences

initPreferences()

Module function to initialize the central configuration store.

This function is called once upon import of the module.

Up

## readPreferences

readPreferences(prefClass = Prefs)

Module function to read the preferences and transfer them into the central store.

prefClass
  preferences class used as the storage area

Up

## readToolbarSettings

readToolbarSettings(mw, tbs, prefClass = Prefs)

Module function to read the toolbar settings from the central store.

In addition to reading and storing the values, the toolbars are set accordingly.

mw
  reference to the main window (QMainWindow)
tbs
  list of tuples defining the different toolbars
prefClass
  preferences class used as the storage area

Up

## readToolsMenu

readToolsMenu(prefClass = Prefs)

Module function to read the tools menu configuration.

prefClass
  preferences class used as the storage area

Returns:
  list of tuples defing the tools menu entries

Up

## resetLayout

resetLayout(which, prefClass = Prefs)

Module function to set a flag not storing the current layout.

which
  flag indicating a reset of the layout. (ignored)
prefClass
  preferences class used as the storage area

Up

## savePreferences

savePreferences(prefClass = Prefs)

Module function to write the preferences from the central store.

prefClass
  preferences class used as the storage area

Up

## saveToolbarSettings

saveToolbarSettings(mw, tbs, prefClass = Prefs)

Module function to write the toolbar settings to the central store.

prefClass
  preferences class used as the storage area

Up

## saveToolsMenu

saveToolsMenu(toollist, prefClass = Prefs)

Module function to write the tools menu configuration.

prefClass
  preferences class used as the storage area

Up

## setCorba

setCorba(key, value, prefClass = Prefs)

Module function to store the various corba settings.

key
  the key of the setting to be set
value
  the value to be set
prefClass
  preferences class used as the storage area

Up

## setDebugger

setDebugger(key, value, prefClass = Prefs)

Module function to store the debugger settings.

key
  the key of the setting to be set
value
  the value to be set
prefClass
  preferences class used as the storage area

Up

## setEditor

setEditor(key, value, prefClass = Prefs)

Module function to store the various editor settings.

key
  the key of the setting to be set
value
  the value to be set
prefClass
  preferences class used as the storage area

Up

## setEditorAPI

setEditorAPI(key, apilist, prefClass = Prefs)

Module function to store the various lists of api files.

key
  the key of the api to be set
apilist
  the list of api files (QStringList)
prefClass
  preferences class used as the storage area

Up

## setEditorColour

setEditorColour(key, value, prefClass = Prefs)

Module function to store the various editor marker colours.

key
  the key of the colour to be set
value
  the colour to be set
prefClass
  preferences class used as the storage area

Up

## setEditorLexerAssocs

setEditorLexerAssocs(assocs, prefClass = Prefs)

Module function to retrieve all lexer associations.

assocs
  dictionary of lexer associations to be set
prefClass
  preferences class used as the storage area

Up

## setEditorOtherFonts

setEditorOtherFonts(key, font, prefClass = Prefs)

Module function to store the various editor fonts except the lexer fonts.

key
  the key of the font to be set
font
  the font to be set (QFont)
prefClass
  preferences class used as the storage area

Up

## setGeometry

setGeometry(key, value, prefClass = Prefs)

Module function to store the display geometry.

key
  the key of the setting to be set
value
  the geometry to be set
prefClass
  preferences class used as the storage area

Up

## setHelp

setHelp(key, value, prefClass = Prefs)

Module function to store the various help settings.

key
  the key of the setting to be set
value
  the value to be set
prefClass
  preferences class used as the storage area

Up

## setIcons

setIcons(key, value, prefClass = Prefs)

Module function to store the various Icons settings.

key
  the key of the setting to be set
value
  the value to be set
prefClass
  preferences class used as the storage area

Up

## setMainDockLayout

setMainDockLayout(mw, which, prefClass = Prefs)

Module function to store the layout of the dock windows.

mw
  reference to the main window (QMainWindow)
which
  basic type of the dock layout (0 or 1)
prefClass
  preferences class used as the storage area

Up

## setPrinter

setPrinter(key, value, prefClass = Prefs)

Module function to store the various printer settings.

key
  the key of the setting to be set
value
  the value to be set
prefClass
  preferences class used as the storage area

Up

## setProject

setProject(key, value, prefClass = Prefs)

Module function to store the various project handling settings.

key
  the key of the setting to be set
value
  the value to be set
prefClass
  preferences class used as the storage area

Up

## setQt

setQt(key, value, prefClass = Prefs)

Module function to store the various Qt settings.

key
  the key of the setting to be set
value
  the value to be set
prefClass
  preferences class used as the storage area

Up

## setRefactoring

setRefactoring(key, value, prefClass = Prefs)

Module function to store the various refactoring settings.

key
  the key of the setting to be set
value
  the value to be set
prefClass
  preferences class used as the storage area

Up

## setShell

setShell(key, value, prefClass = Prefs)

Module function to store the various shell settings.

key
  the key of the setting to be set
value
  the value to be set
prefClass
  preferences class used as the storage area

Up

## setSystem

setSystem(key, value, prefClass = Prefs)

Module function to store the various system settings.

key
  the key of the setting to be set
value
  the value to be set
prefClass
  preferences class used as the storage area

Up

## setTasks

setTasks(key, value, prefClass = Prefs)

Module function to store the Tasks related settings.

key
  the key of the setting to be set
value
  the value to be set
prefClass
  preferences class used as the storage area

Up

## setTemplates

setTemplates(key, value, prefClass = Prefs)

Module function to store the Templates related settings.

key
  the key of the setting to be set
value
  the value to be set
prefClass
  preferences class used as the storage area

Up

## setUI

setUI(key, value, prefClass = Prefs)

Module function to store the various UI settings.

key
  the key of the setting to be set
value
  the value to be set
prefClass
  preferences class used as the storage area

Up

## setUILanguage

setUILanguage(lang, prefClass = Prefs)

Module function to store the language for the user interface.

lang
  the language
prefClass
  preferences class used as the storage area

Up

## setUILayout

setUILayout(layout, prefClass = Prefs)

Module function to store the layout for the user interface.

layout
  the layout type
prefClass
  preferences class used as the storage area

Up

## setUser

setUser(key, value, prefClass = Prefs)

Module function to store the various user settings.

key
  the key of the setting to be set
value
  the value to be set
prefClass
  preferences class used as the storage area

Up

## setVCS

setVCS(key, value, prefClass = Prefs)

Module function to store the VCS related settings.

key
  the key of the setting to be set
value
  the value to be set
prefClass
  preferences class used as the storage area

Up

## setVarFilters

setVarFilters(filters, prefClass = Prefs)

Module function to store the variables filter settings.

prefClass
  preferences class used as the storage area

Up

## setViewManager

setViewManager(vm, prefClass = Prefs)

Module function to store the selected viewmanager type.

vm
  the viewmanager type
prefClass
  preferences class used as the storage area

Up

## syncPreferences

syncPreferences()

Module function to sync the preferences to disk.

In addition to synching, the central configuration store is reinitialized as well.

Up