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.
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.
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.
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.
setEditorLexerAssoc Module function to store a lexer association.
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.
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.
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

Methods

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(key, prefClass = Prefs)

Module function to retrieve a lexer association.

key
the file extension of the lexer to get
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)
prefClass
preferences class used as the storage area
which
basic type of the dock layout (0 or 1)
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

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

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
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

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)
prefClass
preferences class used as the storage area
tbs
list of tuples defining the different toolbars
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.

prefClass
preferences class used as the storage area
which
flag indicating a reset of the layout. (ignored)
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
prefClass
preferences class used as the storage area
value
the value to be set
Up

setDebugger

setDebugger(key, value, prefClass = Prefs)

Module function to store the debugger settings.

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

setEditor

setEditor(key, value, prefClass = Prefs)

Module function to store the various editor settings.

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

setEditorAPI

setEditorAPI(key, apilist, prefClass = Prefs)

Module function to store the various lists of api files.

apilist
the list of api files (QStringList)
key
the key of the api to be set
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
prefClass
preferences class used as the storage area
value
the colour to be set
Up

setEditorLexerAssoc

setEditorLexerAssoc(key, lexer, prefClass = Prefs)

Module function to store a lexer association.

key
the file extension of the lexer to be set (string)
lexer
the lexer language to be set (string)
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.

font
the font to be set (QFont)
key
the key of the font to be set
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
prefClass
preferences class used as the storage area
value
the geometry to be set
Up

setHelp

setHelp(key, value, prefClass = Prefs)

Module function to store the various help settings.

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

setIcons

setIcons(key, value, prefClass = Prefs)

Module function to store the various Icons settings.

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

setMainDockLayout

setMainDockLayout(mw, which, prefClass = Prefs)

Module function to store the layout of the dock windows.

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

setPrinter

setPrinter(key, value, prefClass = Prefs)

Module function to store the various printer settings.

key
the key of the setting to be set
prefClass
preferences class used as the storage area
value
the value to be set
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
prefClass
preferences class used as the storage area
value
the value to be set
Up

setQt

setQt(key, value, prefClass = Prefs)

Module function to store the various Qt settings.

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

setRefactoring

setRefactoring(key, value, prefClass = Prefs)

Module function to store the various refactoring settings.

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

setShell

setShell(key, value, prefClass = Prefs)

Module function to store the various shell settings.

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

setSystem

setSystem(key, value, prefClass = Prefs)

Module function to store the various system settings.

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

setUI

setUI(key, value, prefClass = Prefs)

Module function to store the various UI settings.

key
the key of the setting to be set
prefClass
preferences class used as the storage area
value
the value to be set
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
prefClass
preferences class used as the storage area
value
the value to be set
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.

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

syncPreferences

syncPreferences()

Module function to sync the preferences to disk. In addition to synching, the central configuration store is reinitialized as well.

Up