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

Class CommandChooser

source code

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

Window presenting a list of all currently available key commands.


Note: MW: constant SEPARATOR should be turned into a setting so users can decided on which characters to use (comma, plus, ...)

Instance Methods [hide private]
 
init(self, **kwargs)
Creates and shows the chooser dialog and its components.
source code
 
_createKeyBindingsView(self)
Creates an ordered chooser widget.
source code
 
_populateKeyBindings(self)
Populates the list of currently registered keybindings.
source code
 
_createNode(self, scriptName)
Creates a new root node in the TreeStore model with the name of the script.
source code
 
_insertRow(self, desc, kb, device, parent=None)
Appends a new row with the new keybinding data to the treeview.
source code
gtk.TreeIter or None
_getIterator(self, nodeName)
Returns the iterator matching the node name passed as argument or None if the node was not found.
source code
 
_onOK(self, widget)
Handles 'OK' button 'clicked' events.
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

Inherited from AccessEngine.AEChooser.AEChooser: __call__, __init__, activate, 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]

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

Instance Variables [hide private]
integer DESCRIPTION = 0
constant for column named 'description'
integer KEYBINDINGS = 1
constant for column named 'keybindung'
integer DEVICE = 2
constant for column named 'device'
string SEPARATOR = ', '
string separating keys within keybindings string
gtk.Window dialog
Window widget for looking at keybindings

Inherited from AccessEngine.AEChooser.AEChooser: aid, block_signals

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

init(self, **kwargs)

source code 
Creates and shows the chooser dialog and its components.
Overrides: AccessEngine.AEChooser.AEChooser.init

_createKeyBindingsView(self)

source code 
Creates an ordered chooser widget.

Note: mw: The UIEView was not suitable since they have a fixed set of columns for their list. Also, I wanted the keybindings to be assigned to their parent script, so TreeStore was a better choice than ListStore. Maybe a more generic approach to the UIEView can combine those two views allowing the columns and the model to be specified individually.

_populateKeyBindings(self)

source code 
Populates the list of currently registered keybindings. Traverses the list of all registered scripts (per tier, but excluding doubles) and creates a list of all keybindings along with their description.

_createNode(self, scriptName)

source code 
Creates a new root node in the TreeStore model with the name of the script.
Parameters:
  • scriptName (string @return iterator at the new node @rtype gtk.TreeIter) - the name of the new TreeStore Node = name of the script

Author: Orca authors (orca_gui_prefs.py)

_insertRow(self, desc, kb, device, parent=None)

source code 
Appends a new row with the new keybinding data to the treeview.
Parameters:
  • kb (string) - the new keybinding to be appended
  • desc (string) - description of the keybinding to be appended
  • device (string) - name of the device of which the keys are pressed
  • parent (gtk.TreeIter @return iterator at the new row @rtype gtk.TreeIter) - the parent node on which to append

Author: Orca authors (orca_gui_prefs.py)

_getIterator(self, nodeName)

source code 
Returns the iterator matching the node name passed as argument or None if the node was not found.
Parameters:
  • nodeName (string) - a string providing the name the node wanted
Returns: gtk.TreeIter or None
iterator matching the nodeName passed as argument

Author: Orca authors (orca_gui_prefs.py)

_onOK(self, widget)

source code 
Handles 'OK' button 'clicked' events.
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