Table of Contents

Module: __init__ ./Preferences/__init__.py

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.

Imported modules   
from ViewManager.Config import ConfigViewManagers
from qt import Qt, QFont, QColor, QSettings, QDir, QPrinter, QString, QTextStream, IO_ReadOnly, IO_WriteOnly
from qtext import QextScintilla
import sys
Functions   
getDebugger
getEditor
getEditorColour
getEditorOtherFonts
getGeometry
getHelp
getMainDockLayout
getPrinter
getProject
getShell
getSystem
getUILanguage
getUILayout
getVarFilters
getViewManager
initPreferences
readPreferences
readToolbarSettings
readToolsMenu
resetLayout
savePreferences
saveToolbarSettings
saveToolsMenu
setDebugger
setEditor
setEditorColour
setEditorOtherFonts
setGeometry
setHelp
setMainDockLayout
setPrinter
setProject
setShell
setSystem
setUILanguage
setUILayout
setVarFilters
setViewManager
syncPreferences
  getDebugger 
getDebugger ( key,  prefClass=Prefs )

Module function to retrieve the debugger settings.

Arguments

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.

Arguments

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

Returns

the requested editor setting

  getEditorColour 
getEditorColour ( key,  prefClass=Prefs )

Module function to retrieve the various editor marker colours.

Arguments

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.

Arguments

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

Returns

the requested editor font

  getGeometry 
getGeometry ( key,  prefClass=Prefs )

Module function to retrieve the display geometry.

Arguments

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.

Arguments

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

Returns

the requested help setting

  getMainDockLayout 
getMainDockLayout (
        mw,
        which,
        prefClass=Prefs,
        )

Module function to retrieve the layout of the dock windows.

Arguments

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

Returns

flag indicating success

  getPrinter 
getPrinter ( key,  prefClass=Prefs )

Module function to retrieve the various printer settings.

Arguments

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.

Arguments

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

Returns

the requested project setting

  getShell 
getShell ( key,  prefClass=Prefs )

Module function to retrieve the various shell settings.

Arguments

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.

Arguments

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

Returns

the requested system setting

  getUILanguage 
getUILanguage ( prefClass=Prefs )

Module function to retrieve the language for the user interface.

Arguments

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.

Arguments

prefClass
preferences class used as the storage area

Returns

the UI layout

  getVarFilters 
getVarFilters ( prefClass=Prefs )

Module function to retrieve the variables filter settings.

Arguments

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.

Arguments

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.

Arguments

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.

Arguments

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

Module function to read the tools menu configuration.

Arguments

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.

  savePreferences 
savePreferences ( prefClass=Prefs )

Module function to write the preferences from the central store.

Arguments

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.

Arguments

prefClass
preferences class used as the storage area
  saveToolsMenu 
saveToolsMenu ( toollist,  prefClass=Prefs )

Module function to write the tools menu configuration.

Arguments

prefClass
preferences class used as the storage area
  setDebugger 
setDebugger (
        key,
        value,
        prefClass=Prefs,
        )

Module function to store the debugger settings.

Arguments

key
the key of the setting to be set
value
the value to be set
prefClass
preferences class used as the storage area
  setEditor 
setEditor (
        key,
        value,
        prefClass=Prefs,
        )

Module function to store the various editor settings.

Arguments

key
the key of the setting to be set
value
the value 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.

Arguments

key
the key of the colour to be set
value
the colour to be set
prefClass
preferences class used as the storage area
  setEditorOtherFonts 
setEditorOtherFonts (
        key,
        font,
        prefClass=Prefs,
        )

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

Arguments

key
the key of the font to be set
value
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.

Arguments

key
the key of the setting to be set
value
the geometry to be set
prefClass
preferences class used as the storage area
  setHelp 
setHelp (
        key,
        value,
        prefClass=Prefs,
        )

Module function to store the various help settings.

Arguments

key
the key of the setting to be set
value
the value to be set
prefClass
preferences class used as the storage area
  setMainDockLayout 
setMainDockLayout (
        mw,
        which,
        prefClass=Prefs,
        )

Module function to store the layout of the dock windows.

Arguments

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

Module function to store the various printer settings.

Arguments

key
the key of the setting to be set
value
the value to be set
prefClass
preferences class used as the storage area
  setProject 
setProject (
        key,
        value,
        prefClass=Prefs,
        )

Module function to store the various project handling settings.

Arguments

key
the key of the setting to be set
value
the value to be set
prefClass
preferences class used as the storage area
  setShell 
setShell (
        key,
        value,
        prefClass=Prefs,
        )

Module function to store the various shell settings.

Arguments

key
the key of the setting to be set
value
the value to be set
prefClass
preferences class used as the storage area
  setSystem 
setSystem (
        key,
        value,
        prefClass=Prefs,
        )

Module function to store the various system settings.

Arguments

key
the key of the setting to be set
value
the value to be set
prefClass
preferences class used as the storage area
  setUILanguage 
setUILanguage ( lang,  prefClass=Prefs )

Module function to store the language for the user interface.

Arguments

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.

Arguments

layout
the layout type
prefClass
preferences class used as the storage area
  setVarFilters 
setVarFilters ( filters,  prefClass=Prefs )

Module function to store the variables filter settings.

Arguments

prefClass
preferences class used as the storage area
  setViewManager 
setViewManager ( vm,  prefClass=Prefs )

Module function to store the selected viewmanager type.

Arguments

vm
the viewmanager type
prefClass
preferences class used as the storage area
  syncPreferences 
syncPreferences ()

Module function to sync the preferences to disk.

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

Classes   

Prefs

A class to hold all configuration items for the application.


Table of Contents

This document was automatically generated on Fri Mar 14 19:54:42 2003 by HappyDoc version 2.1