(self)
Start or pause the computation.
Start or pause the computation.
Start or pause the computation .
def toggle(self):
        """Start or pause the computation."""
        self.keep_running = not self.keep_running
        if self.keep_running:
            self.button.setText("Pause")
            self.button.repaint()
            self.progressBarInit()
            self.before_running()
            self.start(run_vizrank, self.compute_score,
                       self.iterate_states, self.saved_state, self.scores,
                       self.saved_progress, self.state_count())
        else:
            self.button.setText("Continue")
            self.button.repaint()
            self.cancel()
            self._stopped()
def toggle ( self ) : self . keep_running = not self . keep_running if self . keep_running : self . button . setText ( "Pause" ) self . button . repaint ( ) self . progressBarInit ( ) self . before_running ( ) self . start ( run_vizrank , self . compute_score , self . iterate_states , self . saved_state , self . scores , self . saved_progress , self . state_count ( ) ) else : self . button . setText ( "Continue" ) self . button . repaint ( ) self . cancel ( ) self . _stopped ( )