예제 #1
0
 def closeEvent(self, event):
     self.im2d.closeEvent(QtGui.QCloseEvent())
     self.imboxed.closeEvent(QtGui.QCloseEvent())
     self.improj.closeEvent(QtGui.QCloseEvent())
     self.imslice.closeEvent(QtGui.QCloseEvent())
     self.imvol.closeEvent(QtGui.QCloseEvent())
     event.accept()
예제 #2
0
    def runto(self):
        try:
            self.path = QtCore.QFileInfo(self.filename).path()
        except AttributeError:
            pass
        g = globals()
        os.chdir(str(self.path))
        os.path.join(os.path.expanduser('~'), os.path.expandvars(str(self.path)))
        script = str(self.codebox.text())
        try:
            exec (script, g)
            QtGui.QCloseEvent()


        except ImportError:
            os.chdir(str(self.path))
            os.path.join(os.path.expanduser('~'), os.path.expandvars(str(self.path)))
            sys.path.append(str(self.path))
            exec (script, g)
            QtGui.QCloseEvent()

            if TypeError (QTextStream):
                g = globals()
                os.chdir(str(self.path))
                os.path.join(os.path.expanduser('~'), os.path.expandvars(str(self.path)))
                sys.path.insert(0, str(self.path))
                exec int(script)
                QtGui.QCloseEvent()
예제 #3
0
 def slotQuit(self):
     self.app.postEvent(self, QtGui.QCloseEvent())