class QgisInterface(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.
Method | __init__ |
Constructor :param canvas: |
Method | activeLayer |
Get pointer to the active layer (layer selected in the legend). |
Method | addDockWidget |
Add a dock widget to the main window. |
Method | addLayer |
Handle a layer being added to the registry so it shows up in canvas. |
Method | addLayers |
Handle layers being added to the registry so they show up in canvas. |
Method | addRasterLayer |
Add a raster layer given a raster layer file name |
Method | addToolBar |
Add toolbar with specified name. |
Method | addToolBarIcon |
Add an icon to the plugins toolbar. |
Method | addVectorLayer |
Add a vector layer. |
Method | legendInterface |
Get the legend. |
Method | mainWindow |
Return a pointer to the main window. |
Method | mapCanvas |
Return a pointer to the map canvas. |
Method | newProject |
Create new project. |
Method | removeAllLayers |
Remove layers from the canvas before they get deleted. |
Method | removeToolBarIcon |
Remove an action (icon) from the plugin toolbar. |
Method | zoomFull |
Zoom to the map full extent. |
Method | zoomToActiveLayer |
Zoom to extent of active layer. |
Method | zoomToNext |
Zoom to next view extent. |
Method | zoomToPrevious |
Zoom to previous view extent. |
Class Variable | currentLayerChanged |
Undocumented |
Instance Variable | canvas |
Undocumented |
Instance Variable | destCrs |
Undocumented |
Add a dock widget to the main window.
:param area: Where in the ui the dock should be placed. :type area:
:param dock_widget: A dock widget to add to the UI. :type dock_widget: QDockWidget
Add a raster layer given a raster layer file name
:param path: Path to layer. :type path: str
:param base_name: Base name for layer. :type base_name: str
Add toolbar with specified name.
:param name: Name for the toolbar. :type name: str
Add an icon to the plugins toolbar.
:param action: Action to add to the toolbar. :type action: QAction
Add a vector layer.
:param path: Path to layer. :type path: str
:param base_name: Base name for layer. :type base_name: str
:param provider_key: Provider key e.g. 'ogr' :type provider_key: str
Return a pointer to the main window.
In case of QGIS it returns an instance of QgisApp.