Example #1
0
 def __init__(self, name, widget, *args):
     GuiEvent.__init__(self, name, widget)
     self.interceptMethod(self.widget.stop_emission, EmissionStopIntercept)
     self.interceptMethod(self.widget.emit_stop_by_name, EmissionStopIntercept)
     self.interceptMethod(self.widget.get_toplevel().destroy, DestroyIntercept)
     self.stopEmissionMethod = None
     self.destroyMethod = None
Example #2
0
 def shouldRecord(self, *args):
     '''
     Should this happening be recorded in usecases?
     
     Default is to only record happenings from visible widgets. 
     Subclasses may reimplement.
     '''
     return GuiEvent.shouldRecord(self, *args) and self.widgetVisible()
Example #3
0
 def __init__(self, name, widget, *args):
     GuiEvent.__init__(self, name, widget)
     ''' Intercept certain methods that affect storytext snooping. '''
     # self.interceptMethod(getWidgetPropagationStopMethod(widget), EmissionStopIntercept)
     """
     Why?  Something about storytext is a default handler and not getting signals unless we intercept stop??
     I don't think this pertains to Qt: 
     - no way to stop a QSignal in Qt.
     - accept() and reject() methods follow StoryText interception and don't affect.
     # stop_emission() method on gobject (super of widget.)
     self.interceptMethod(self.widget.stop_emission, EmissionStopIntercept)
     # emit_stop_by_name() method on widget
     self.interceptMethod(self.widget.emit_stop_by_name, EmissionStopIntercept)
     self.interceptMethod(self.widget.get_toplevel().destroy, DestroyIntercept)
     """
     self.stopEmissionMethod = None
     self.destroyMethod = None
     
     # recorder method to call when happening is intercepted
     self.recorderHandler = None
     
     # TODO: migrate to happeningSignalProxy
     # Name of widget's corresponding method to call to generate signal.
     self.widgetSignalCorrespondingMethodName = None
Example #4
0
 def shouldRecord(self, *args):
     return GuiEvent.shouldRecord(self, *args) and self.widget.get_property("visible")
 def __init__(self, eventName, widget, *args):
     assert widget is not None
     GuiEvent.__init__(self, eventName, widget)
     self.recorderHandler = None