def METHOD_NAME(self):
    super().METHOD_NAME()
    if self.ui.progressBarSample.value() >= self.ui.progressBarSample.maximum() - 1:
        self.on_clear_clicked()
    if self.device_is_sending:
        self.device.stop("Sending paused by user")
    else:
        self.device.start()