Overloads the close event for this widget to make sure that the data \
        is properly saved before exiting.
        
        :param      event | <QCloseEvent>
514306
def closeEvent( self, event ):
        
        if ( not (self.saveOnClose() and self.checkForSave()) ):
            event.ignore()
        else:
            super(XScintillaEdit, self).closeEvent(event)
321848
def _onLeave(self, evt):
        """"""

        evt.Skip()
        FigureCanvasBase.leave_notify_event(self, guiEvent = evt)
802042
def leaveEvent(self, event):
        

        if self.__checkable:
            not self.__checked and self.setPixmap(self.__default_pixmap)
        else:
            self.setPixmap(self.__default_pixmap)
619252
def keyPressEvent(self, event):
        
        if event.key() == QtCore.Qt.Key_Escape:
            self.reject()

        super(XOverlayWidget, self).keyPressEvent(event)
376532
def keyReleaseEvent(self, event):
        
        if self.isVisible():
            qsc = get_shortcut(context='Editor', name='Go to next file')

            for key in qsc.split('+'):
                key = key.lower()
                if ((key == 'ctrl' and event.key() == Qt.Key_Control) or
                   (key == 'alt' and event.key() == Qt.Key_Alt)):
                        self.item_selected()
        event.accept()
974373
def closeEvent(self, event):
        """"""
        self.visibilityChanged.emit(0)
        model = self.paramList.model()
        model.hintRequested.disconnect()
        model.rowsInserted.disconnect()
        model.rowsRemoved.disconnect()
67816
function windowCloseHandler(event) {
    if(!options.windowCloseWarning) {
      return;
    }

    if(sync.state !== sync.SYNC_SYNCING) {
      return;
    }

    var confirmationMessage = "Sync currently underway, are you sure you want to close?";
    (event || global.event).returnValue = confirmationMessage;

    return confirmationMessage;
  }
505491
def closeEvent(self, event):
        
        self.stop_process()
        self.backend.stop()
        try:
            self.modes.remove('_LinkHighlighter')
        except KeyError:
            pass  # already removed
        super(OutputWindow, self).closeEvent(event)
904547
def keyPressEvent(self, event):
        
        if event.key() == QtCore.Qt.Key_Escape:
            self.cancel()
        elif event.key() == QtCore.Qt.Key_Left:
            self.goBack()
        elif event.key() == QtCore.Qt.Key_Right:
            self.goForward()
        elif event.key() == QtCore.Qt.Key_Home:
            self.restart()
        
        super(XWalkthroughWidget, self).keyPressEvent(event)
46333
def OnClose(self, event):
        """"""

        # If changes have taken place save of old grid

        if undo.stack().haschanged():
            save_choice = self.interfaces.get_save_request_from_user()

            if save_choice is None:
                # Cancelled close operation
                return

            elif save_choice:
                # User wants to save content
                post_command_event(self.main_window, self.main_window.SaveMsg)

        # Save the AUI state

        config["window_layout"] = repr(self.main_window._mgr.SavePerspective())

        # Uninit the AUI stuff

        self.main_window._mgr.UnInit()

        # Save config
        config.save()

        # Close main_window

        self.main_window.Destroy()

        # Set file mode to 600 to protect GPG passwd a bit
        sp = wx.StandardPaths.Get()
        pyspreadrc_path = sp.GetUserConfigDir() + "/." + config.config_filename
        try:
            os.chmod(pyspreadrc_path, 0600)
        except OSError:
            dummyfile = open(pyspreadrc_path, "w")
            dummyfile.close()
            os.chmod(pyspreadrc_path, 0600)
712951
def closeEvent(self, event):
        
        if not self.canClose():
            event.ignore()
            return

        elif not self.isViewSingleton():
            self.setAttribute(Qt.WA_DeleteOnClose)

        else:
            self.setParent(self.window())  # attach the hidden singleton instance to the window vs. anything in the view

        super(XView, self).closeEvent(event)
1300335
def eventFilter(self, object, event):
        
        if object == self.parent() and event.type() == QtCore.QEvent.Resize:
            self.resize(event.size())
        elif event.type() == QtCore.QEvent.Close:
            self.setResult(0)
        return False
885428
def on_close_grid(self, event):
        
        if self.parent.grid_frame:
            self.parent.grid_frame.onSave(None)
            self.parent.grid_frame.Destroy()
1235355
protected void postCloseEvent(final WebSocketCloseCode closeCode, final String reason) {
        for (final WebSocketListener listener : listeners) {
            if (listener.onClose(this, closeCode, reason)) {
                break;
            }
        }
    }
1282672
def close(self):
        
        if self._S is not None:
            # after .close() self._event should never be called
            self._S.close()
            self._S = None
            self._Q.put_nowait(None)
375489
def leaveEvent(self, event):
        """"""
        if self.__cursor_changed:
            QApplication.restoreOverrideCursor()
            self.__cursor_changed = False
        self.QT_CLASS.leaveEvent(self, event)
1355683
def closeEvent(self, event):
        

        self.__interrupt_search()
        super(SearchInFiles, self).closeEvent(event)