Exemplo n.º 1
0
 def closeEvent(self, event):
     """Reimplement Qt method."""
     self.plugin.dockwidget.setWidget(self.plugin)
     self.plugin.dockwidget.setVisible(True)
     self.plugin.undock_action.setDisabled(False)
     self.plugin.switch_to_plugin()
     QMainWindow.closeEvent(self, event)
Exemplo n.º 2
0
 def closeEvent(self, event):
     """Reimplement Qt method."""
     self.plugin.set_ancestor(self.plugin.main)
     self.plugin.dockwidget.setWidget(self.plugin)
     self.plugin.dockwidget.setVisible(True)
     self.plugin.switch_to_plugin()
     QMainWindow.closeEvent(self, event)
     # Qt might want to do something with this soon,
     # So it should not be deleted by python yet.
     # Fixes spyder-ide/spyder#10704
     self.plugin.__unsafe__window = self
     self.plugin._undocked_window = None
Exemplo n.º 3
0
    def closeEvent(self, event):
        """ """
        if self.packages.busy:
            answer = QMessageBox.question(
                self,
                'Quit Conda Manager?',
                'Conda is still busy.\n\nDo you want to quit?',
                buttons=QMessageBox.Yes | QMessageBox.No)

            if answer == QMessageBox.Yes:
                QMainWindow.closeEvent(self, event)
                # Do some cleanup?
            else:
                event.ignore()
        else:
            QMainWindow.closeEvent(self, event)
Exemplo n.º 4
0
 def closeEvent(self, *args, **kwargs):
     self.save_settings()
     # Enable paste of clipboard after termination
     clipboard = QApplication.clipboard()
     event = QEvent(QEvent.Clipboard)
     QApplication.sendEvent(clipboard, event)
     return QMainWindow.closeEvent(self, *args, **kwargs)
Exemplo n.º 5
0
    def closeEvent(self, event):
        """Reimplement Qt method."""
        self.plugin.set_ancestor(self.plugin.main)
        self.plugin.dockwidget.setWidget(self.plugin)
        self.plugin.dockwidget.setVisible(True)
        self.plugin.switch_to_plugin()

        # Save window geometry to restore it when undocking the plugin
        # again.
        geometry = self.saveGeometry()
        self.plugin.set_option('window_geometry', qbytearray_to_str(geometry))

        # Close window
        QMainWindow.closeEvent(self, event)

        # Qt might want to do something with this soon,
        # So it should not be deleted by python yet.
        # Fixes spyder-ide/spyder#10704
        self.plugin.__unsafe__window = self
        self.plugin._undocked_window = None
Exemplo n.º 6
0
 def closeEvent(self, event):
     QSettings().setValue("geometry", self.saveGeometry())
     pluginmanager._observers.clear()  # Detach all observers
     msg.progressbar = None  # Remove progressbar from Qt hierarchy
     msg.statusbar = None  # Remove statusbar from Qt hierarchy
     QMainWindow.closeEvent(self, event)
Exemplo n.º 7
0
 def closeEvent(self, event):
     QSettings().setValue("geometry", self.saveGeometry())
     QMainWindow.closeEvent(self, event)
Exemplo n.º 8
0
 def closeEvent(self, event):
     self.presenter.clear_observer()
     self.centralWidget().close()
     QMainWindow.closeEvent(self, event)
     self.deleteLater()
Exemplo n.º 9
0
 def closeEvent(self, event):
     #Use QT settings saving mechanism
     #settings stored in ~/.config/Equinor/ErtGui.conf
     self.__saveSettings()
     QMainWindow.closeEvent(self, event)
Exemplo n.º 10
0
 def closeEvent(self, event):
     self.closing.emit()
     QMainWindow.closeEvent(self, event)
Exemplo n.º 11
0
 def closeEvent(self, event):
     self.closing.emit()
     QMainWindow.closeEvent(self, event)
     self.deleteLater()
Exemplo n.º 12
0
 def closeEvent(self, event):
     self.closing.emit()
     QMainWindow.closeEvent(self, event)
     self.deleteLater()
Exemplo n.º 13
0
 def closeEvent(self, event):
     self.presenter.clear_observer()
     self.centralWidget().close()
     QMainWindow.closeEvent(self, event)
     self.deleteLater()