(self)
Clear and initialize the dialog.

        This method must be called by the widget when the data is reset,
        e.g. from `set_data` handler.
Clear and initialize the dialog.
Clear and initialize the dialog .
def initialize(self):
        """
        Clear and initialize the dialog.

        This method must be called by the widget when the data is reset,
        e.g. from `set_data` handler.
        """
        if self.task is not None:
            self.keep_running = False
            self.cancel()
        self.keep_running = False
        self.scheduled_call = None
        self.saved_state = None
        self.saved_progress = 0
        self.progressBarFinished()
        self.scores = []
        self._update_model()  # empty queue
        self.rank_model.clear()
        self.button.setText("Start")
        self.button.setEnabled(self.check_preconditions())
def initialize ( self ) : if self . task is not None : self . keep_running = False self . cancel ( ) self . keep_running = False self . scheduled_call = None self . saved_state = None self . saved_progress = 0 self . progressBarFinished ( ) self . scores = [ ] self . _update_model ( ) # empty queue self . rank_model . clear ( ) self . button . setText ( "Start" ) self . button . setEnabled ( self . check_preconditions ( ) )