from safe import messaging as m from safe.gui.tools.wizard.utilities import get_image_path from safe.gui.tools.wizard.wizard_step import WizardStep from safe.gui.tools.wizard.wizard_step import get_wizard_step_ui_class from safe.gui.tools.wizard.wizard_strings import ( select_hazard_origin_question, select_hazlayer_from_canvas_question, select_hazlayer_from_browser_question) from safe.utilities.i18n import tr __copyright__ = "Copyright 2016, The InaSAFE Project" __license__ = "GPL version 3" __email__ = "*****@*****.**" __revision__ = 'b2d0c787b7d956ae517d9245e8cb7b285d71ce74' FORM_CLASS = get_wizard_step_ui_class(__file__) class StepFcHazLayerOrigin(WizardStep, FORM_CLASS): """InaSAFE Wizard Step Hazard Layer Origin.""" def is_ready_to_next_step(self): """Check if the step is complete. If so, there is no reason to block the Next button. :returns: True if new step may be enabled. :rtype: bool """ return (bool(self.rbHazLayerFromCanvas.isChecked() or self.rbHazLayerFromBrowser.isChecked())) def get_next_step(self):
'Disaster Reduction') # noinspection PyPackageRequirements from PyQt4 import QtCore, QtGui # noinspection PyPackageRequirements from PyQt4.QtCore import pyqtSignature # noinspection PyPackageRequirements from PyQt4.QtGui import QListWidgetItem from qgis.core import QgsMapLayerRegistry from safe.gui.tools.wizard.wizard_step import get_wizard_step_ui_class from safe.gui.tools.wizard.wizard_step import WizardStep FORM_CLASS = get_wizard_step_ui_class(__file__) class StepFcHazLayerFromCanvas(WizardStep, FORM_CLASS): """Function Centric Wizard Step: Hazard Layer From Canvas""" def is_ready_to_next_step(self): """Check if the step is complete. If so, there is no reason to block the Next button. :returns: True if new step may be enabled. :rtype: bool """ return bool(self.selected_canvas_hazlayer()) def get_previous_step(self):