mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
Fake statusbar for tests.
git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@305 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
This commit is contained in:
parent
aa3d766b88
commit
b7a9e21118
@ -41,6 +41,12 @@ class QgisInterface(QObject):
|
||||
self.canvas = canvas
|
||||
self.testRaster = QgsRasterLayer('data/raster', "raster")
|
||||
self.testVector = QgsVectorLayer('data/vector', "vector", 'ogr')
|
||||
QgsMapLayerRegistry.instance().addMapLayer(self.testRaster)
|
||||
QgsMapLayerRegistry.instance().addMapLayer(self.testVector)
|
||||
|
||||
self.statusBar = type('FakeStatusBar', (),
|
||||
{'showMessage' : lambda _, m: None
|
||||
})()
|
||||
|
||||
def zoomFull(self):
|
||||
"""Zoom to the map full extent"""
|
||||
@ -89,7 +95,10 @@ class QgisInterface(QObject):
|
||||
|
||||
In case of QGIS it returns an instance of QgisApp
|
||||
"""
|
||||
pass
|
||||
return type('FakeMainWindow', (),
|
||||
{'statusBar' :
|
||||
lambda _: self.statusBar
|
||||
})()
|
||||
|
||||
def addDockWidget(self, area, dockwidget):
|
||||
""" Add a dock widget to the main window """
|
||||
|
Loading…
x
Reference in New Issue
Block a user