# Path: safe/definitions/versions.py

# 
# Path: safe/definitions/layer_purposes.py



import sys
import os
import qgis  # NOQA pylint: disable=unused-import
from functools import partial
from distutils.version import StrictVersion
from qgis.core import (
    QgsRectangle,
    QgsRasterLayer,
    QgsMapLayer,
    QgsExpression,
    QgsProject,
)
from qgis.PyQt.QtCore import QCoreApplication, Qt
from qgis.PyQt.QtWidgets import (
    QAction,
    QApplication,
    QToolButton,
    QMenu,
    QLineEdit,
    QInputDialog
)
from qgis.PyQt.QtGui import QIcon
from safe.common.custom_logging import LOGGER
from safe.utilities.expressions import qgis_expressions
from safe.definitions.versions import inasafe_release_status, inasafe_version
from safe.common.exceptions import (
    KeywordNotFoundError,
    NoKeywordsFoundError,
    MetadataReadError,
)
from safe.common.signals import send_static_message
from safe.utilities.resources import resources_path
from safe.utilities.gis import is_raster_layer
from safe.definitions.layer_purposes import (
    layer_purpose_exposure, layer_purpose_hazard
)
from safe.definitions.utilities import get_field_groups
from safe.utilities.i18n import tr
from safe.utilities.keyword_io import KeywordIO
from safe.utilities.utilities import is_keyword_version_supported
from safe.utilities.settings import setting, set_setting
        from safe.gui.widgets.dock import Dock
        from safe.test.utilities import load_standard_layers
        from qgis.PyQt.QtWidgets import QDockWidget
        from safe.gui.tools.extent_selector_dialog import ExtentSelectorDialog
        from safe.gui.tools.minimum_needs.needs_calculator_dialog import (
            NeedsCalculatorDialog
        )
        from safe.gui.tools.minimum_needs.needs_manager_dialog import (
            NeedsManagerDialog)
        from safe.gui.tools.options_dialog import OptionsDialog
            from safe.gui.widgets.message import getting_started_message
        from safe.gui.tools.options_dialog import OptionsDialog
        from safe.gui.tools.wizard.wizard_dialog import WizardDialog
        from safe.gui.tools.wizard.wizard_dialog import WizardDialog
        from safe.gui.tools.shake_grid.shakemap_converter_dialog import (
            ShakemapConverterDialog)
        from safe.gui.tools.multi_buffer_dialog import (
            MultiBufferDialog)
        from safe.gui.tools.osm_downloader_dialog import OsmDownloaderDialog
        from safe.gui.tools.geonode_uploader import GeonodeUploaderDialog
        from safe.utilities.help import show_help
        from safe.gui.tools.help import definitions_help
        from safe.gui.tools.field_mapping_dialog import FieldMappingDialog
        from safe.gui.tools.metadata_converter_dialog import (
            MetadataConverterDialog)
        from safe.gui.tools.multi_exposure_dialog import MultiExposureDialog
        from safe.gui.tools.peta_bencana_dialog import PetaBencanaDialog
        from safe.gui.tools.batch.batch_dialog import BatchDialog
        from safe.gui.tools.save_scenario import SaveScenarioDialog
            parent=self.iface.mainWindow(),
            dock=self.dock_widget)
        dialog.exec_()  # modal

    def show_options(self):
        """Show the options dialog."""
        # import here only so that it is AFTER i18n set up

        dialog = OptionsDialog(
            iface=self.iface,
            parent=self.iface.mainWindow())
        dialog.show_option_dialog()
        if dialog.exec_():  # modal
            self.dock_widget.read_settings()
            send_static_message(self.dock_widget, getting_started_message())
            # Issue #4734, make sure to update the combobox after update the
            # InaSAFE option
            self.dock_widget.get_layers()

    def show_welcome_message(self):
        """Show the welcome message."""
        # import here only so that it is AFTER i18n set up

        # Do not show by default
        show_message = False

        previous_version = StrictVersion(setting('previous_version'))
        current_version = StrictVersion(inasafe_version)

        # Set previous_version to the current inasafe_version

# Path: safe/definitions/versions.py

# 
# Path: safe/definitions/layer_purposes.py



# Path: safe/plugin.py
import sys
import os
import qgis  # NOQA pylint: disable=unused-import
from functools import partial
from distutils.version import StrictVersion
from qgis.core import (
    QgsRectangle,
    QgsRasterLayer,
    QgsMapLayer,
    QgsExpression,
    QgsProject,
)
from qgis.PyQt.QtCore import QCoreApplication, Qt
from qgis.PyQt.QtWidgets import (
    QAction,
    QApplication,
    QToolButton,
    QMenu,
    QLineEdit,
    QInputDialog
)
from qgis.PyQt.QtGui import QIcon
from safe.common.custom_logging import LOGGER
from safe.utilities.expressions import qgis_expressions
from safe.definitions.versions import inasafe_release_status, inasafe_version
from safe.common.exceptions import (
    KeywordNotFoundError,
    NoKeywordsFoundError,
    MetadataReadError,
)
from safe.common.signals import send_static_message
from safe.utilities.resources import resources_path
from safe.utilities.gis import is_raster_layer
from safe.definitions.layer_purposes import (
    layer_purpose_exposure, layer_purpose_hazard
)
from safe.definitions.utilities import get_field_groups
from safe.utilities.i18n import tr
from safe.utilities.keyword_io import KeywordIO
from safe.utilities.utilities import is_keyword_version_supported
from safe.utilities.settings import setting, set_setting
        from safe.gui.widgets.dock import Dock
        from safe.test.utilities import load_standard_layers
        from qgis.PyQt.QtWidgets import QDockWidget
        from safe.gui.tools.extent_selector_dialog import ExtentSelectorDialog
        from safe.gui.tools.minimum_needs.needs_calculator_dialog import (
            NeedsCalculatorDialog
        )
        from safe.gui.tools.minimum_needs.needs_manager_dialog import (
            NeedsManagerDialog)
        from safe.gui.tools.options_dialog import OptionsDialog
            from safe.gui.widgets.message import getting_started_message
        from safe.gui.tools.options_dialog import OptionsDialog
        from safe.gui.tools.wizard.wizard_dialog import WizardDialog
        from safe.gui.tools.wizard.wizard_dialog import WizardDialog
        from safe.gui.tools.shake_grid.shakemap_converter_dialog import (
            ShakemapConverterDialog)
        from safe.gui.tools.multi_buffer_dialog import (
            MultiBufferDialog)
        from safe.gui.tools.osm_downloader_dialog import OsmDownloaderDialog
        from safe.gui.tools.geonode_uploader import GeonodeUploaderDialog
        from safe.utilities.help import show_help
        from safe.gui.tools.help import definitions_help
        from safe.gui.tools.field_mapping_dialog import FieldMappingDialog
        from safe.gui.tools.metadata_converter_dialog import (
            MetadataConverterDialog)
        from safe.gui.tools.multi_exposure_dialog import MultiExposureDialog
        from safe.gui.tools.peta_bencana_dialog import PetaBencanaDialog
        from safe.gui.tools.batch.batch_dialog import BatchDialog
        from safe.gui.tools.save_scenario import SaveScenarioDialog

            parent=self.iface.mainWindow(),
            dock=self.dock_widget)
        dialog.exec_()  # modal

    def show_options(self):
        """Show the options dialog."""
        # import here only so that it is AFTER i18n set up

        dialog = OptionsDialog(
            iface=self.iface,
            parent=self.iface.mainWindow())
        dialog.show_option_dialog()
        if dialog.exec_():  # modal
            self.dock_widget.read_settings()
            send_static_message(self.dock_widget, getting_started_message())
            # Issue #4734, make sure to update the combobox after update the
            # InaSAFE option
            self.dock_widget.get_layers()

    def show_welcome_message(self):
        """Show the welcome message."""
        # import here only so that it is AFTER i18n set up

        # Do not show by default
        show_message = False

        previous_version = StrictVersion(setting('previous_version'))
        current_version = StrictVersion(inasafe_version)

        # Set previous_version to the current inasafe_version

        set_setting('previous_version', inasafe_version)