code: def save_state(self):
          
          set_setting('lastSourceDir', self.source_directory.text())
          set_setting('lastOutputDir', self.output_directory.text())
          set_setting(
              'useDefaultOutputDir', self.scenario_directory_radio.isChecked())
docs: Save current state of GUI to configuration file.