safe.utilities.qgis_utilities module

QGIS utilities for InaSAFE

safe.utilities.qgis_utilities.display_critical_message_bar(title=None, message=None, more_details=None, button_text=u'Show details ...', duration=8)[source]

Display a critical message bar.

Parameters:
  • title (str) – The title of the message bar.
  • message (str) – The message inside the message bar.
  • more_details (str) – The message inside the ‘Show details’ button.
  • button_text (str) – The text of the button if ‘more_details’ is not empty.
  • duration (int) – The duration for the display, default is 8 seconds.
safe.utilities.qgis_utilities.display_critical_message_box(parent=None, title=None, message=None)[source]

Display a critical message box.

Parameters:
  • title (str) – The title of the message box.
  • message (str) – The message inside the message box.
safe.utilities.qgis_utilities.display_information_message_bar(title=None, message=None, more_details=None, button_text=u'Show details ...', duration=8)[source]

Display an information message bar.

Parameters:
  • iface (QgisInterface) – The QGIS IFace instance. Note that we cannot use qgis.utils.iface since it is not available in our test environment.
  • title (str) – The title of the message bar.
  • message (str) – The message inside the message bar.
  • more_details (str) – The message inside the ‘Show details’ button.
  • button_text (str) – The text of the button if ‘more_details’ is not empty.
  • duration (int) – The duration for the display, default is 8 seconds.
safe.utilities.qgis_utilities.display_information_message_box(parent=None, title=None, message=None)[source]

Display an information message box.

Parameters:
  • title (str) – The title of the message box.
  • message (str) – The message inside the message box.
safe.utilities.qgis_utilities.display_success_message_bar(title=None, message=None, more_details=None, button_text=u'Show details ...', duration=8)[source]

Display a success message bar.

Parameters:
  • iface (QgisInterface) – The QGIS IFace instance. Note that we cannot use qgis.utils.iface since it is not available in our test environment.
  • title (str) – The title of the message bar.
  • message (str) – The message inside the message bar.
  • more_details (str) – The message inside the ‘Show details’ button.
  • button_text (str) – The text of the button if ‘more_details’ is not empty.
  • duration (int) – The duration for the display, default is 8 seconds.
safe.utilities.qgis_utilities.display_warning_message_bar(title=None, message=None, more_details=None, button_text=u'Show details ...', duration=8)[source]

Display a warning message bar.

Parameters:
  • title (str) – The title of the message bar.
  • message (str) – The message inside the message bar.
  • more_details (str) – The message inside the ‘Show details’ button.
  • button_text (str) – The text of the button if ‘more_details’ is not empty.
  • duration (int) – The duration for the display, default is 8 seconds.
safe.utilities.qgis_utilities.display_warning_message_box(parent=None, title=None, message=None)[source]

Display a warning message box.

Parameters:
  • title (str) – The title of the message box.
  • message (str) – The message inside the message box.