Package aldrin :: Module config :: Class AldrinConfig
[show private | hide private]
[frames | no frames]

Type AldrinConfig

object --+        
         |        
ConfigBase --+    
             |    
    FileConfig --+
                 |
                AldrinConfig


Streamlines access to the applications configuration. You should set all applications to and retrieve them from the config object.

Do not instantiate this class, use {get_config} instead.

On Windows, most settings will be saved in ~/aldrin/settings.cfg

On Linux, most settings will be saved in ~/.aldrin/settings.cfg
Method Summary
  __init__(self)
Initializer.
  add_recent_file_config(self, filename)
Adds a filename to the list of recently used files, if not already included.
str or None get_active_theme(self)
Returns the name of the currently active theme.
(str,str,int,int) get_audiodriver_config(self)
Retrieves current audiodriver settings.
wx.Brush get_brush(self, name)
Returns a certain theme color as brush
str get_color(self, name)
Returns a certain theme color as html hex color string.
  get_credentials(self, service)
returns the credentials required for a service (username/password).
  get_default_int(self, key, defval)
Returns the default value for a UI setting.
[str,...] get_enabled_extensions(self)
Returns the current list of enabled extension uris.
  get_float_color(self, name)
Returns a certain theme color as float tuples
  get_freesound_samples_folder(self)
Returns the samples folder designated for samples downloaded from freesound.
str get_index_path(self)
yields a a tree of plugins, to be used in the machine view for menus.
  get_keymap(self)
returns a keymap for the pattern editor, to be used for note input.
  get_keymap_language(self)
Returns the current keymap language
[(str,int,int),...] get_midi_controllers(self)
Returns the list of mapped midi controllers.
[str,...] get_mididriver_inputs(self)
Returns the current list of MIDI input driver names.
[str,...] get_mididriver_outputs(self)
Returns the current list of MIDI output driver names.
wx.Brush get_pen(self, name)
Returns a certain theme color as brush
preset.PresetCollection get_plugin_presets(self, pluginloader)
Returns a PresetCollection for the given pluginloader.
str list get_recent_files_config(self)
Retrieves list of recently used files.
  get_sample_preview_volume(self)
Returns the volume with which samples shall be previewed.
  get_settings_folder(self)
Returns the users settings folder.
[str,...] get_theme_names(self)
Returns a list of color theme names
  get_wavetable_paths(self)
Returns the list of wavetable paths.
  load_window_pos(self, windowid, window)
Retrieves a windows position from the config and applies it.
  save_window_pos(self, windowid, window)
Stores a windows position to the config.
  select_theme(self, name)
Selects a color theme with a specific name to be used.
  set_audiodriver_config(self, inputname, outputname, samplerate, buffersize)
Stores audiodriver settings.
  set_credentials(self, service, username, password)
stores the credentials required for a service (username/password).
  set_default_int(self, key, val)
Stores a default value for an UI setting.
  set_enabled_extensions(self, uris)
Stores the current list of enabled extension uris.
  set_keymap_language(self, lang)
Sets the current keymap language
  set_midi_controllers(self, ctrllist)
Sets the list of mapped midi controllers.
  set_mididriver_inputs(self, inputlist)
Stores the current list of used MIDI input driver names.
  set_mididriver_outputs(self, outputlist)
Stores the current list of used MIDI output driver names.
  set_plugin_presets(self, pluginloader, presets)
Stores a preset collection for the given pluginloader.
  set_wavetable_paths(self, pathlist)
Sets the list of wavetable paths.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Instance Method Details

__init__(self)
(Constructor)

Initializer.
Overrides:
wx._misc.FileConfig.__init__

add_recent_file_config(self, filename)

Adds a filename to the list of recently used files, if not already included.
Parameters:
filename - path to file.
           (type=str)

get_active_theme(self)

Returns the name of the currently active theme.
Returns:
name of theme or None, if default
           (type=str or None)

get_audiodriver_config(self)

Retrieves current audiodriver settings.
Returns:
A tuple containing input driver name, output driver name, samplerate and buffer size.
           (type=(str,str,int,int))

get_brush(self, name)

Returns a certain theme color as brush
Parameters:
name - name of color theme key.
           (type=str)
Returns:
brush
           (type=wx.Brush)

get_color(self, name)

Returns a certain theme color as html hex color string.
Parameters:
name - name of color theme key.
           (type=str)
Returns:
color of key.
           (type=str)

get_credentials(self, service)

returns the credentials required for a service (username/password).

get_default_int(self, key, defval=0)

Returns the default value for a UI setting.

get_enabled_extensions(self)

Returns the current list of enabled extension uris.
Returns:
List of uris.
           (type=[str,...])

get_float_color(self, name)

Returns a certain theme color as float tuples

get_freesound_samples_folder(self)

Returns the samples folder designated for samples downloaded from freesound.

get_index_path(self)

yields a a tree of plugins, to be used in the machine view for menus.

On Posix platforms, ~/.aldrin/index.txt overrides ${PREFIX}/share/aldrin/index.txt.

On Windows, <user folder>/aldrin/index.txt overrides <app folder>/share/aldrin/index.txt.
Returns:
Path to the index file.
           (type=str)

get_keymap(self)

returns a keymap for the pattern editor, to be used for note input.

get_keymap_language(self)

Returns the current keymap language

get_midi_controllers(self)

Returns the list of mapped midi controllers.
Returns:
List of tuples containing name, channel and controller id
           (type=[(str,int,int),...])

get_mididriver_inputs(self)

Returns the current list of MIDI input driver names.
Returns:
List of driver names.
           (type=[str,...])

get_mididriver_outputs(self)

Returns the current list of MIDI output driver names.
Returns:
List of driver names.
           (type=[str,...])

get_pen(self, name)

Returns a certain theme color as brush
Parameters:
name - name of color theme key.
           (type=str)
Returns:
brush
           (type=wx.Brush)

get_plugin_presets(self, pluginloader)

Returns a PresetCollection for the given pluginloader.
Parameters:
pluginloader - A pluginloader.
           (type=zzub.Pluginloader)
Returns:
A preset collection.
           (type=preset.PresetCollection)

get_recent_files_config(self)

Retrieves list of recently used files.
Returns:
List of file paths.
           (type=str list)

get_sample_preview_volume(self)

Returns the volume with which samples shall be previewed.

get_settings_folder(self)

Returns the users settings folder.

get_theme_names(self)

Returns a list of color theme names
Returns:
A list of color theme names.
           (type=[str,...])

get_wavetable_paths(self)

Returns the list of wavetable paths.
Returns:
List of paths to directories containing samples. @rtype:[str,...]

load_window_pos(self, windowid, window)

Retrieves a windows position from the config and applies it.
Parameters:
windowid - Name of window in config.
           (type=str)
window - The window whose properties to save.
           (type=wx.Window)

save_window_pos(self, windowid, window)

Stores a windows position to the config.
Parameters:
windowid - Name of window in config.
           (type=str)
window - The window whose properties to save.
           (type=wx.Window)

select_theme(self, name)

Selects a color theme with a specific name to be used.
Parameters:
name - name of theme as returned by get_theme_names.
           (type=str)

set_audiodriver_config(self, inputname, outputname, samplerate, buffersize)

Stores audiodriver settings.
Parameters:
samplerate - Selected samples per seconds.
           (type=int)
buffersize - Buffer size in samples.
           (type=int)

set_credentials(self, service, username, password)

stores the credentials required for a service (username/password).

set_default_int(self, key, val)

Stores a default value for an UI setting.

set_enabled_extensions(self, uris)

Stores the current list of enabled extension uris.
Parameters:
uris - List of uris
           (type=[str,...])

set_keymap_language(self, lang)

Sets the current keymap language
Parameters:
lang - Language ('en', 'de')
           (type=str)

set_midi_controllers(self, ctrllist)

Sets the list of mapped midi controllers.
Parameters:
ctrllist - List of tuples containing name,channel and controller id
           (type=[(str,int,int),...])

set_mididriver_inputs(self, inputlist)

Stores the current list of used MIDI input driver names.

set_mididriver_outputs(self, outputlist)

Stores the current list of used MIDI output driver names.

set_plugin_presets(self, pluginloader, presets)

Stores a preset collection for the given pluginloader.
Parameters:
pluginloader - A pluginloader.
           (type=zzub.Pluginloader)
presets - A preset collection
           (type=preset.PresetCollection)

set_wavetable_paths(self, pathlist)

Sets the list of wavetable paths.
Parameters:
pathlist - List of paths to directories containing samples.
           (type=[str,...])

Generated by Epydoc 2.1 on Sun Feb 4 18:01:14 2007 http://epydoc.sf.net