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
getConfigDir |
Module function to get the name of the directory storing the config data. |
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. |
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. |
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
getConfigDir
getConfigDir()
Module function to get the name of the directory storing the config data.
Returns
- Returns:
-
directory name of the config dir (string)
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
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
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
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)
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
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)
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
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
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
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
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
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
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
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)
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
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
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
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
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
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
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
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
getViewManager
getViewManager(prefClass = Prefs)
Module function to retrieve the selected viewmanager type.
- prefClass
-
preferences class used as the storage area
- Returns:
-
the viewmanager type
initPreferences
initPreferences()
Module function to initialize the central configuration store.
This function is called once upon import of the module.
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
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
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
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)
savePreferences
savePreferences(prefClass = Prefs)
Module function to write the preferences from the central store.
- prefClass
-
preferences class used as the storage area
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
saveToolsMenu
saveToolsMenu(toollist, prefClass = Prefs)
Module function to write the tools menu configuration.
- prefClass
-
preferences class used as the storage area
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
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
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
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 font to be set
- prefClass
-
preferences class used as the storage area
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
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
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
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
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
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)
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
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
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
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
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
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
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
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
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
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
setVarFilters
setVarFilters(filters, prefClass = Prefs)
Module function to store the variables filter settings.
- prefClass
-
preferences class used as the storage area
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
syncPreferences
syncPreferences()
Module function to sync the preferences to disk.
In addition to synching, the central configuration store is reinitialized as well.