def METHOD_NAME(self):
    if not self.already_saved and self.device.current_index > 0:
        reply = QMessageBox.question(self, self.tr("Save data?"),
                                     self.tr("Do you want to save the data you have captured so far?"),
                                     QMessageBox.Yes | QMessageBox.No | QMessageBox.Abort)
        if reply == QMessageBox.Yes:
            self.on_save_clicked()
        elif reply == QMessageBox.Abort:
            return False
    try:
        sample_rate = self.device.sample_rate
    except:
        sample_rate = 1e6
    self.files_recorded.emit(self.recorded_files, sample_rate)
    return True