Logo Search packages:      
Sourcecode: veusz version File versions  Download package

def veusz-1.10::windows::mainwindow::MainWindow::queryOverwrite (   self )
Do you want to overwrite the current document.

Returns qt4.QMessageBox.(Yes,No,Cancel).

Definition at line 655 of file mainwindow.py.

        """Do you want to overwrite the current document.

        Returns qt4.QMessageBox.(Yes,No,Cancel)."""

        # include filename in mesage box if we can
        filetext = ''
        if self.filename:
            filetext = " '%s'" % os.path.basename(self.filename)

        # show message box
        mb = qt4.QMessageBox("Save file?",
                             "Document%s was modified. Save first?" % filetext,
                             qt4.QMessageBox.Yes | qt4.QMessageBox.Default,
                             qt4.QMessageBox.Cancel | qt4.QMessageBox.Escape,
        mb.setButtonText(qt4.QMessageBox.Yes, "&Save")
        mb.setButtonText(qt4.QMessageBox.No, "&Discard")
        mb.setButtonText(qt4.QMessageBox.Cancel, "&Cancel")
        return mb.exec_()

Generated by  Doxygen 1.6.0   Back to index