Beispiel #1
0
 def closeEvent(self, event):
     """Emit a message to hub before closing."""
     for tab in self.viewers:
         for viewer in tab:
             viewer.close(warn=False)
     self._log.close()
     self._hub.broadcast(ApplicationClosedMessage(None))
     event.accept()
     if self._original_app is not None:
         self._original_app.setWindowIcon(self._original_icon)
Beispiel #2
0
    def closeEvent(self, event):
        """Emit a message to hub before closing."""

        # Clear the namespace in the terminal to avoid cicular references
        if self._terminal is not None:
            self._terminal.widget().clear_ns(['data_collection', 'dc', 'hub', 'session', 'application'])

        for tab in self.viewers:
            for viewer in tab:
                viewer.close(warn=False)
        self._viewer_in_focus = None
        self._clear_dashboard()
        self._log.close()
        self._hub.broadcast(ApplicationClosedMessage(None))
        event.accept()
        if self._original_app is not None:
            self._original_app.setWindowIcon(self._original_icon)
            self._original_app = None
        self.app = None
Beispiel #3
0
 def closeEvent(self, event):
     """Emit a message to hub before closing."""
     self._hub.broadcast(ApplicationClosedMessage(None))
     event.accept()