Module SettingsChooser :: Class SettingsChooser
[hide private]
[frames] | no frames]

Class SettingsChooser

source code

                                  object --+        
                                           |        
AccessEngine.AEUserInterface.AEUserInterface --+    
                                               |    
                AccessEngine.AEChooser.AEChooser --+
                                                   |
                                                  SettingsChooser

SUE settings dialog for configuring scripts, devices, profiles, and other system settings.

Instance Methods [hide private]
 
init(self, system, scripts, installed, associated, profile, devices, timestamp, **kwargs)
Creates and shows the settings dialog and its components
source code
 
activate(self, timestamp, present=True, **kwargs)
Try to bring the window to the foreground.
source code
gtk.Widget
_createCustomWidget(self, glade, function_name, widget_name, *args)
Creates a custom widget.
source code
gtk.Widget
_createProfileScriptWidget(self)
Creates a GTKUIEView.UIEView instance to manage selection of AccessEngine.AEScripts.
source code
gtk.Widget
_createProfileMonitorWidget(self)
Creates a GTKUIEView.UIEView instance to manage selection of AEMonitors.
source code
gtk.Widget
_createProfileChooserWidget(self)
Creates a GTKUIEView.UIEView instance to manage selection of AEChoosers.
source code
gtk.Widget
_createProfileDevicesWidget(self)
Creates a GTKUIEView.UIEView instance to manage selection of AEInput and AEOutput devices.
source code
 
_createSystemSettingsView(self)
Populates the system settings profile panel.
source code
 
_createProfileView(self, associated, installed)
Populates all of the profile view tab panels.
source code
 
_createScriptSettingsView(self)
Populates the list of configurable AccessEngine.AEScripts and selects the first to generate its settings panel.
source code
 
_createDeviceSettingsView(self)
Populates the list of configurable AEInput and AEOutput devices and selects the first to generate its settings panel.
source code
 
_onScrollToFocus(self, widget, direction, viewport)
Scrolls a focused widget in a settings panel into view.
source code
 
_onSubSectionChange(self, tv)
Prepares a settings panel for viewing when the name of a AccessEngine.AEScript or AEInput/AEOutput device is selected from the list of configurable elements.
source code
 
_populateSection(self, group, viewport)
Populate a section pane with widgets representing the AEState.Settings in the group.
source code
dictionary of string : list of string
_getAssociated(self)
Gets lists of AEUserInterface class names currently set to be associated with the active profile.
source code
 
_onOK(self, widget)
Closes the dialog and sends a signal indicating the OK action.
source code
 
_onCancel(self, widget)
Closes the dialog and sends a signal indicating the Cancel action.
source code
 
_onApply(self, widget)
Sends a signal indicating the Apply action.
source code
 
close(self)
Closes the chooser, preventing further chooser interaction with the user.
source code
string
getName(self)
Gets the name of the chooser.
source code
 
updateDevices(self, devices)
Updates the list of devices according to those that are now loaded.
source code

Inherited from AccessEngine.AEChooser.AEChooser: __call__, __init__, update

Inherited from AccessEngine.AEUserInterface.AEUserInterface: getClassName, getDescription, getPath

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]
boolean GLOBAL_SINGLETON = True
Allow only one instance of a chooser to exist at a time globally? This flag should be overriden by a subclass to indicate whether the chooser is a global singleton or not.
integer SCRIPT = 0
Tab number for configuring scripts
integer DEVICE = 1
Tab number for configuring devices
integer SYSTEM = 2
Tab number for configuring system settings
integer PROFILE = 3
Tab number for configuring the profile
string FRAME_MARKUP = '<span size="xx-large" weight="bold">%s</span>'
Pango markup for frame panels to make text larger
integer RAISE = RAISE
Raise priority of a AEUserInterface for handling events or getting loaded
integer LOWER = LOWER
Lower priority of a AEUserInterface for handling events or getting loaded
integer TO_LOAD = TO_LOAD
Indicates a AEUserInterface is now set to be loaded
integer TO_UNLOAD = TO_UNLOAD
Indicates a AEUserInterface is now set to be unloaded

Inherited from AccessEngine.AEChooser.AEChooser: APPLY, APP_SINGLETON, CANCEL, OK

Instance Variables [hide private]
list of string associated
All UIE class names associated with this profile
gtk.TreeView device_tv
List of configurable AEInput and AEOutput devices
dictionary of string : AEState devices
Per AEOutput device settings keyed by human readable device name
gtk.Dialog dialog
Dialog widget for configuring SUE settings
WidgetFactory factory
Factory used to create gtk widget for settings
dictionary of string : 3-tuple of string installed
All UIE class names, human readable names, and descriptions installed keyed by their type
GTKUIEView.UIEView profile_choosers
View of AEChoosers installed
GTKUIEView.UIEView profile_devices
Aids selection of preferred AEOutput and AEInput devices associated with this profile
GTKUIEView.UIEView profile_monitors
Aids selection of AEMonitors to associate with the profile
GTKUIEView.UIEView profile_scripts
Aids selection of AccessEngine.AEScripts to associate with the profile
gtk.TreeView script_tv
List of configurable AccessEngine.AEScripts
dictionary of string : AEState scripts
AccessEngine.AEScript settings keyed by human readable script name
gtk.Notebook section_nb
Main tabbed panel
AEState system
SUE system wide settings
gtk.Viewport system_vp
Panel for system settings

Inherited from AccessEngine.AEChooser.AEChooser: aid, block_signals

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

init(self, system, scripts, installed, associated, profile, devices, timestamp, **kwargs)

source code 
Creates and shows the settings dialog and its components
Parameters:
  • system (AEState) - SUE system wide settings
  • scripts (dictionary of string: AEState) - AccessEngine.AEScript settings keyed by script name
  • installed (dictionary of string: list of 3-tuple of string) - All UIE class names, human readable names, and descriptions installed keyed by their type
  • associated (dictionary of string: list of 3-tuple of string) - All UIE class names, human readable names, and descriptions associated with this profile keyed by their type
  • profile (string) - Name of the profile
  • devices (dictionary of string : AEState) - AEOutput/AEInput settings keyed by device name
  • timestamp (float) - Time at which input was given indicating the start of this chooser
Overrides: AccessEngine.AEChooser.AEChooser.init

activate(self, timestamp, present=True, **kwargs)

source code 
Try to bring the window to the foreground.
Overrides: AccessEngine.AEChooser.AEChooser.activate

_createCustomWidget(self, glade, function_name, widget_name, *args)

source code 
Creates a custom widget. Invoked during processing by glade.
Parameters:
  • glade (gtk.glade.XML) - glade XML parser
  • widget_name (string) - Name of the widget to create
  • function_name (string) - Name of the function to call to create this widget
Returns: gtk.Widget
Custom widget

_createProfileScriptWidget(self)

source code 
Creates a GTKUIEView.UIEView instance to manage selection of AccessEngine.AEScripts.
Returns: gtk.Widget
Root widget of the UIE view

_createProfileMonitorWidget(self)

source code 
Creates a GTKUIEView.UIEView instance to manage selection of AEMonitors.
Returns: gtk.Widget
Root widget of the UIE view

_createProfileChooserWidget(self)

source code 
Creates a GTKUIEView.UIEView instance to manage selection of AEChoosers.
Returns: gtk.Widget
Root widget of the UIE view

_createProfileDevicesWidget(self)

source code 
Creates a GTKUIEView.UIEView instance to manage selection of AEInput and AEOutput devices.
Returns: gtk.Widget
Root widget of the UIE view

_onScrollToFocus(self, widget, direction, viewport)

source code 
Scrolls a focused widget in a settings panel into view.
Parameters:
  • widget (gtk.Widget) - Widget that has the focus
  • direction (integer) - Direction constant, ignored
  • viewport (gtk.Viewport) - Viewport to scroll to bring the widget into view

_onSubSectionChange(self, tv)

source code 
Prepares a settings panel for viewing when the name of a AccessEngine.AEScript or AEInput/AEOutput device is selected from the list of configurable elements.
Parameters:
  • tv (gtk.TreeView) - Treeview in which a configurable item is selected

_populateSection(self, group, viewport)

source code 
Populate a section pane with widgets representing the AEState.Settings in the group. The container is the top level widget in which other widgets should be made. If recursive groups exist, their settings will be properly represented by widgets in a widget sub-container.
Parameters:
  • group (AEState.Setting.Group) - Group organizing a subset of settings in the state
  • viewport (gtk.Viewport) - Reference to the viewport to populate with widgets
Raises:
  • AssertionError - When there are no settings in the group

_getAssociated(self)

source code 
Gets lists of AEUserInterface class names currently set to be associated with the active profile.
Returns: dictionary of string : list of string
Dictionary of associated UIEs keyed by their kind

_onOK(self, widget)

source code 
Closes the dialog and sends a signal indicating the OK action.
Parameters:
  • widget (gtk.Widget) - Source of GUI event

_onCancel(self, widget)

source code 
Closes the dialog and sends a signal indicating the Cancel action.
Parameters:
  • widget (gtk.Widget) - Source of GUI event

_onApply(self, widget)

source code 
Sends a signal indicating the Apply action.
Parameters:
  • widget (gtk.Widget) - Source of GUI event

close(self)

source code 
Closes the chooser, preventing further chooser interaction with the user.
Overrides: AccessEngine.AEChooser.AEChooser.close

getName(self)

source code 
Gets the name of the chooser.
Returns: string
Human readable name of the chooser
Overrides: AccessEngine.AEUserInterface.AEUserInterface.getName

updateDevices(self, devices)

source code 
Updates the list of devices according to those that are now loaded.
Parameters:
  • devices (dictionary of string : AEState) - Per AEOutput/AEInput settings keyed by device name