Пример #1
0
 def exitApp(self):
     """
     exitApp schließt die Serieleschnitstelle und beendet anschließend das
     Programm
     
     Parameters
     ----------
     self
     """
     if(self.ser.isOpen() == True):
         self.ser.close()
     qApp.exit()
Пример #2
0
 def restart(self):
     if self.thread is not None:
         result = QMessageBox.question(
             self, "Restart program",
             "The measurement thread is still running. Do you really want to restart the program?",
             QMessageBox.Yes, QMessageBox.No)
         if result != QMessageBox.Yes:
             return
         self.thread.stop()
         self.thread.wait(3000)
     self.close()
     self.logger.info('IvCurveDaq restarting.')
     qApp.exit(self.EXIT_CODE_REBOOT)
Пример #3
0
 def actionFinished(self, operation):
     if operation == "System.Manager.installPackage":
         self.showSummary()
     if operation in ("System.Manager.installPackage", "System.Manager.removePackage", "System.Manager.updatePackage"):
         self.notifyFinished()
     if not self.state.silence:
         self.searchLine.clear()
         self.state.reset()
         self.progressDialog.hide()
         if operation in ("System.Manager.updateRepository", "System.Manager.updateAllRepositories"):
             self.emit(SIGNAL("repositoriesUpdated()"))
         self.initialize()
     else:
         qApp.exit()
Пример #4
0
 def on_actionExit_triggered( self ) :
     self._cancelReconnect()
     if self.sm.current() == self.ONLINE :
         self.exitAfterOffline = True
         self.session.goOffline()
     else :
         self.exitAfterOffline = False
         self.appletServer.shutdown()
         self.session.shutdown()
         if self.trayIcon is not None :
             self.trayIcon.hide()
         st = localSettings()
         st.setInt( 'Settings/WindowWidth', self.width() )
         st.setInt( 'Settings/WindowHeight', self.height() )
         qApp.exit( 0 )
Пример #5
0
 def on_actionExit_triggered( self ) :
     self._cancelReconnect()
     if self.sm.current() == self.ONLINE :
         self.exitAfterOffline = True
         self.session.goOffline()
     else :
         self.exitAfterOffline = False
         self.appletServer.shutdown()
         self.session.shutdown()
         if self.trayIcon is not None :
             self.trayIcon.hide()
         st = localSettings()
         st.setInt( 'Settings/WindowWidth', self.width() )
         st.setInt( 'Settings/WindowHeight', self.height() )
         qApp.exit( 0 )
Пример #6
0
 def quit(self):
     """ Выход из приложения """
     self.saveEntries()
     qApp.exit()
Пример #7
0
 def restart(self):
     qApp.exit( self.EXIT_CODE_REBOOT )
Пример #8
0
 def actionCancelled(self):
     self.progressDialog.hide()
     if self.state.silence:
         qApp.exit()
     else:
         self.groupFilter()
Пример #9
0
 def stop():
     func()
     self.gui.deleteLater()
     qApp.exit()