code: def save_state(self):
          
          state = {
              'hazard': self.hazard_layer_combo.currentText(),
              'exposure': self.exposure_layer_combo.currentText(),
              'aggregation': self.aggregation_layer_combo.currentText(),
              'report': self.results_webview.page().currentFrame().toHtml()}
          self.state = state
docs: Save the current state of the ui to an internal class member.
  
          The saved state can be restored again easily using
          :func:`restore_state`