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.
Note
This source code was copied from the ‘postgis viewer’ application with original authors: Copyright (c) 2010 by Ivan Mincik, ivan.mincik@gista.sk Copyright (c) 2011 German Carrillo, geotux_tuxman@linuxmail.org
Bases: PyQt4.QtCore.QObject
Class to expose qgis objects and functions to plugins.
This class is here for enabling us to run unit tests only, so most methods are simply stubs.
Add a dock widget to the main window.
Parameters: |
|
---|
Handle a layer being added to the registry so it shows up in canvas.
Parameters: | layer – list<QgsMapLayer> list of map layers that were added |
---|
Handle layers being added to the registry so they show up in canvas.
Parameters: | layers – list<QgsMapLayer> list of map layers that were added |
---|
Note
The QgsInterface api does not include this method, it is added here as a helper to facilitate testing.
Add a raster layer given a raster layer file name
Parameters: |
|
---|
Add toolbar with specified name.
Parameters: | name (str) – Name for the toolbar. |
---|
Add an icon to the plugins toolbar.
Parameters: | action (QAction) – Action to add to the toolbar. |
---|
Add a vector layer.
Parameters: |
|
---|
Get the legend.
See also discussion at:
https://github.com/AIFDR/inasafe/pull/924/
Implementation added for version 3.2.
Return a pointer to the main window.
In case of QGIS it returns an instance of QgisApp.
Get the message bar.
New in version 3.2.
Returns: | A QGIS message bar instance |
---|---|
Return type: | QgsMessageBar |
Remove layers from the canvas before they get deleted.
Note
This is NOT part of the QGisInterface API but is needed to support QgsMapLayerRegistry.removeAllLayers().
Remove an action (icon) from the plugin toolbar.
Parameters: | action (QAction) – Action to add to the toolbar. |
---|