(self, action, event, key_modifier=None, key=None,
                            param_getter=None, description=None)
Register an action-event binding.
        
        Arguments:
          * action: a UserAction string.
          * event: a InteractionEvent string.
          * key_modifier=None: the key modifier as a string.
          * key=None: when the action is KeyPress, the key that was 
            pressed.
          * param_getter=None: a function that takes an ActionParameters dict 
            as argument and returns a parameter object that will be passed 
            to InteractionManager.process_event(event, parameter)
Register an action-event binding.
        
        Arguments:
          * action: a UserAction string.
          * event: a InteractionEvent string.
          * key_modifier=None: the key modifier as a string.
          * key=None: when the action is KeyPress, the key that was 
            pressed.
          * param_getter=None: a function that takes an ActionParameters dict 
            as argument and returns a parameter object that will be passed 
            to InteractionManager.process_event(event, parameter)
Register an action - event binding . Arguments : * action : a UserAction string . * event : a InteractionEvent string . * key_modifier = None : the key modifier as a string . * key = None : when the action is KeyPress the key that was pressed . * param_getter = None : a function that takes an ActionParameters dict as argument and returns a parameter object that will be passed to InteractionManager . process_event ( event parameter )
def set(self, action, event, key_modifier=None, key=None,
                            param_getter=None, description=None):
        """Register an action-event binding.
        
        Arguments:
          * action: a UserAction string.
          * event: a InteractionEvent string.
          * key_modifier=None: the key modifier as a string.
          * key=None: when the action is KeyPress, the key that was 
            pressed.
          * param_getter=None: a function that takes an ActionParameters dict 
            as argument and returns a parameter object that will be passed 
            to InteractionManager.process_event(event, parameter)
            
        """
        if isinstance(key, basestring):
            key = getattr(Qt, 'Key_' + key)
        if isinstance(key_modifier, basestring):
            key_modifier = getattr(Qt, 'Key_' + key_modifier)
        # if param_getter is a value and not a function, we convert it
        # to a constant function
        if not hasattr(param_getter, '__call__'):
            param = param_getter
            param_getter = lambda p: param
        self.binding[(action, key_modifier, key)] = (event, param_getter)
        if description:
            self.descriptions[(action, key_modifier, key)] = description
def set ( self , action , event , key_modifier = None , key = None , param_getter = None , description = None ) : if isinstance ( key , basestring ) : key = getattr ( Qt , 'Key_' + key ) if isinstance ( key_modifier , basestring ) : key_modifier = getattr ( Qt , 'Key_' + key_modifier ) # if param_getter is a value and not a function, we convert it # to a constant function if not hasattr ( param_getter , '__call__' ) : param = param_getter param_getter = lambda p : param self . binding [ ( action , key_modifier , key ) ] = ( event , param_getter ) if description : self . descriptions [ ( action , key_modifier , key ) ] = description