示例#1
0
 def __init__(self):
     self.message_queue = WebView()
     # Set up dispatcher for dynamic messages
     # Dynamic messages will not clear the message queue so will be appended
     # to existing user messages
     dispatcher.connect(
         self.message_queue.dynamic_message_event, signal=DYNAMIC_MESSAGE_SIGNAL, sender=dispatcher.Any
     )
     # Set up dispatcher for static messages
     # Static messages clear the message queue and so the display is 'reset'
     dispatcher.connect(self.message_queue.static_message_event, signal=STATIC_MESSAGE_SIGNAL, sender=dispatcher.Any)
示例#2
0
 def __init__(self):
     self.message_queue = ConsoleView()
     # Set up dispatcher for dynamic messages
     # Dynamic messages will not clear the message queue so will be appended
     # to existing user messages
     dispatcher.connect(self.message_queue.dynamic_message_event,
                        signal=DYNAMIC_MESSAGE_SIGNAL,
                        sender=dispatcher.Any)
     # Set up dispatcher for static messages
     # Static messages clear the message queue and so the display is 'reset'
     dispatcher.connect(self.message_queue.static_message_event,
                        signal=STATIC_MESSAGE_SIGNAL,
                        sender=dispatcher.Any)
示例#3
0
 def setUp(self):
     """Fixture run before all tests"""
     os.environ['LANG'] = 'en'
     self.app = Qt.QApplication(sys.argv)
     self.message_viewer = MessageViewer(None)
     # Set up dispatcher for dynamic messages
     # Dynamic messages will not clear the message queue so will be appended
     # to existing user messages
     dispatcher.connect(self.message_viewer.dynamic_message_event,
                        signal=DYNAMIC_MESSAGE_SIGNAL)
     # Set up dispatcher for static messages
     # Static messages clear the message queue and so the display is 'reset'
     dispatcher.connect(self.message_viewer.static_message_event,
                        signal=STATIC_MESSAGE_SIGNAL)
     # Set up dispatcher for error messages
     # Static messages clear the message queue and so the display is 'reset'
     dispatcher.connect(self.message_viewer.error_message_event,
                        signal=ERROR_MESSAGE_SIGNAL)
示例#4
0
 def setUp(self):
     """Fixture run before all tests"""
     os.environ['LANG'] = 'en'
     self.app = Qt.QApplication(sys.argv)
     self.message_viewer = MessageViewer(None)
     # Set up dispatcher for dynamic messages
     # Dynamic messages will not clear the message queue so will be appended
     # to existing user messages
     dispatcher.connect(
         self.message_viewer.dynamic_message_event,
         signal=DYNAMIC_MESSAGE_SIGNAL)
     # Set up dispatcher for static messages
     # Static messages clear the message queue and so the display is 'reset'
     dispatcher.connect(
         self.message_viewer.static_message_event,
         signal=STATIC_MESSAGE_SIGNAL)
     # Set up dispatcher for error messages
     # Static messages clear the message queue and so the display is 'reset'
     dispatcher.connect(
         self.message_viewer.error_message_event,
         signal=ERROR_MESSAGE_SIGNAL)