def __init__ ( self, context, view, kind, handler, id, scrollable, args ): """ Initializes the object. """ self.context = context self.view = view self.kind = kind self.handler = handler self.id = id self.scrollable = scrollable self.args = args # FIXME: fbi is wx specific at the moment. if os.environ.get( 'ENABLE_FBI' ) is not None: try: from enthought.developer.helper.fbi import enable_fbi enable_fbi() except: pass self.ui = self.view.ui( self.context, kind = self.kind, handler = self.handler, id = self.id, scrollable = self.scrollable, args = self.args ) start_event_loop_qt4()
def start_event_loop(self): # Make sure that SIGINTs actually stop the application event loop (Qt # sometimes swallows KeyboardInterrupt exceptions): import signal signal.signal(signal.SIGINT, signal.SIG_DFL) if self._splash_screen is not None: self._splash_screen.close() # Make sure that we only set the 'started' trait after the main loop # has really started. self.set_trait_later(self, "started", True) logger.debug("---------- starting GUI event loop ----------") start_event_loop_qt4() self.started = False