code: def save_state(self):
          
          settings = QtCore.QSettings()
          settings.setValue(
              'inasafe/useDefaultTemplates',
              self.default_template_radio.isChecked())
          settings.setValue(
              'inasafe/lastTemplate',
              self.template_combo.itemData(self.template_combo.currentIndex()))
          settings.setValue(
              'inasafe/lastCustomTemplate', self.template_path.text())
docs: Store the options into the user's stored session info.
  
          .. versionadded: 4.3.0