Пример #1
0
    def closeEvent(self, event):
        poniFile = self.model().experimentSettingsModel().poniFile()

        if not poniFile.isSynchronized():
            button = qt.QMessageBox.question(
                self, "calib2",
                "The PONI file was not saved.\nDo you really want to close the application?",
                qt.QMessageBox.Cancel | qt.QMessageBox.No | qt.QMessageBox.Yes,
                qt.QMessageBox.Yes)
            if button != qt.QMessageBox.Yes:
                event.ignore()
                return

        event.accept()
        CalibrationContext._releaseSingleton()
Пример #2
0
 def setUp(self):
     # FIXME: It would be good to remove this singleton
     CalibrationContext._releaseSingleton()
     super(TestCalibration, self).setUp()