Module: safe_qgis.qgis_interface
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.qgis_interface.QgisInterface(canvas)[source]
Class to expose qgis objects and functionalities to plugins.
This class is here for enabling us to run unit tests only,
so most methods are simply stubs.
-
activeLayer()[source]
Get pointer to the active layer (layer selected in the legend)
-
addDockWidget(area, dockwidget)[source]
Add a dock widget to the main window
-
addLayer(theLayer)[source]
Handle a layer being added to the registry so it shows up in canvas.
- Args:
- theLayers: list<QgsMapLayer> list of map layers that were added
- Returns:
- None
- Raises:
- None
-
addLayers(theLayers)[source]
Handle layers being added to the registry so they show up in canvas.
- Args:
- theLayers: list<QgsMapLayer> list of map layers that were added
- Returns:
- None
- Raises:
- None
-
addRasterLayer(rasterLayerPath, baseName)[source]
Add a raster layer given a raster layer file name
-
addToolBar(name)[source]
Add toolbar with specified name
-
addToolBarIcon(qAction)[source]
Add an icon to the plugins toolbar
-
addVectorLayer(vectorLayerPath, baseName, providerKey)[source]
Add a vector layer
-
mainWindow()[source]
Return a pointer to the main window
In case of QGIS it returns an instance of QgisApp
-
mapCanvas()[source]
Return a pointer to the map canvas
-
removeToolBarIcon(qAction)[source]
Remove an action (icon) from the plugin toolbar
-
zoomFull()[source]
Zoom to the map full extent
-
zoomToActiveLayer()[source]
Zoom to extent of active layer
-
zoomToNext()[source]
Zoom to next view extent
-
zoomToPrevious()[source]
Zoom to previous view extent
This module forms part of the InaSAFE tool.