safe.gui.tools.save_scenario module

Save Scenario Dialog.

Contact : ole.moller.nielsen@gmail.com

Note

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

class safe.gui.tools.save_scenario.SaveScenarioDialog(iface, dock)[source]

Bases: PyQt4.QtGui.QDialog

Tools for saving an active scenario on the dock.

static relative_path(reference_path, input_path)[source]

Get the relative path to input_path from reference_path.

Parameters:
  • reference_path (str) – The reference path
  • input_path (str) – The input path
restore_state()[source]

Read last state of GUI from configuration file.

save_scenario(scenario_file_path=None)[source]

Save current scenario to a text file.

You can use the saved scenario with the batch runner.

Parameters:scenario_file_path (str) – A path to the scenario file.
save_state()[source]

Store current state of GUI to configuration file

validate_input()[source]

Validate the input before saving a scenario.

Those validations are: 1. self.exposure_layer must be not None 2. self.hazard_layer must be not None 3. self.function_id is not an empty string or None