예제 #1
0
 def on_cancel_analyze( self ) :
     """Cancel the analyze worker thread."""
     if not self.analyze_thread or self.analyze_thread.parser.cancelling :
         return
     rc = MainWindow.ask( "Cancel the analysis?" , QMessageBox.Ok|QMessageBox.Cancel , QMessageBox.Cancel )
     if rc != QMessageBox.Ok :
         return
     self.analyze_thread.parser.cancelling = True
     self.pb_files.setFormat( "Cancelling, please wait..." )
     self.btn_cancel_analyze.setEnabled( False )
예제 #2
0
 def on_ask( self , msg , buttons , default ) :
     """Ask the user a question."""
     StartupWidget._on_ask_retval = MainWindow.ask( msg , buttons , default )
     return StartupWidget._on_ask_retval