### Navigation

- index
- modules
- next
- previous
- Home »
- Contents »
- InaSAFE’s API documentation »
- Package::safe_qgis »

# Module: safe_qgis.plugin

InaSAFE Disaster risk assessment tool developed by AusAid -
  QGIS plugin implementation.

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_qgis.plugin.``Plugin`(iface)

  The QGIS interface implementation for the Risk in a box plugin.

  This class acts as the ‘glue’ between QGIS and our custom logic. It creates a toolbar and menubar entry and launches the InaSAFE user interface if these are activated.

  `initGui`()

    Gui initialisation procedure (for QGIS plugin api).

    This method is called by QGIS and should be used to set up any graphical user interface elements that should appear in QGIS by default (i.e. before the user performs any explicit action with the plugin).

    Args:
      None.
    Returns:
      None.
    Raises:
      no exceptions explicitly raised.
  `keyActionF7`()

    Executed when user press F7

  `layerChanged`(theLayer)

    Enable or disable the keywords editor icon.

    This slot is called when the user clicks the keyword editor toolbar icon or menu item associated with this plugin

    Args:
      None.
    Returns:
      None.
    Raises:
      no exceptions explicitly raised.
  `resetDock`()

    Reset the dock to its default state.

    This slot is called when the user clicks the reset icon in the toolbar or the reset menu item associated with this plugin

    Args:
      None.
    Returns:
      None.
    Raises:
      no exceptions explicitly raised.
  `setupI18n`(thePreferredLocale=None)

    Setup internationalisation for the plugin.

    See if QGIS wants to override the system locale and then see if we can get a valid translation file for whatever locale is effectively being used.

    Args:
      thePreferredLocale - optional parameter which if set will override any other way of determining locale..
    Returns:
      None.
    Raises:
      no exceptions explicitly raised.
  `showHideDockWidget`()

    Show or hide the dock widget.

    This slot is called when the user clicks the toolbar icon or menu item associated with this plugin. It will hide or show the dock depending on its current state.

    Args:
      None.
    Returns:
      None.
    Raises:
      no exceptions explicitly raised.
  `showImpactFunctionsDoc`()

    Show the keywords editor.

    This slot is called when the user clicks the impact functions toolbar icon or menu item associated with this plugin

    Args:
      None.
    Returns:
      None.
    Raises:
      no exceptions explicitly raised.
  `showKeywordsEditor`()

    Show the keywords editor.

    This slot is called when the user clicks the keyword editor toolbar icon or menu item associated with this plugin

    Args:
      None.
    Returns:
      None.
    Raises:
      no exceptions explicitly raised.
  `showOptions`()

    Show the options dialog.

    This slot is called when the user clicks the options toolbar icon or menu item associated with this plugin

    Args:
      None.
    Returns:
      None.
    Raises:
      no exceptions explicitly raised.
  `toggleActionDock`(checked)

    check or uncheck the toggle inaSAFE toolbar button.

    This slot is called when the user hides the inaSAFE panel using its close button or using view->panels

    Args:
      checked - if actionDock has to be checked or not
    Returns:
      None.
    Raises:
      no exceptions explicitly raised.
  `tr`(theString)

    We implement this ourself since we do not inherit QObject.

    Args:
      theString - string for translation.
    Returns:
      Translated version of theString.
    Raises:
      no exceptions explicitly raised.
  `unload`()

    Gui breakdown procedure (for QGIS plugin api).

    This method is called by QGIS and should be used to remove any graphical user interface elements that should appear in QGIS.

    Args:
      None.
    Returns:
      None.
    Raises:
      no exceptions explicitly raised.

This module forms part of the InaSAFE tool.

### Navigation

- index
- modules
- next
- previous
- Home »
- Contents »
- InaSAFE’s API documentation »
- Package::safe_qgis »