[Qgis-developer] Add Layer to overview
Germán Carrillo
carrillo.german at gmail.com
Tue Sep 22 12:38:08 EDT 2009
Hi Michele.
It seems the 'actionAddToOverview' method doesn't work yet. As a workaround,
you could do something like this:
layer = self.iface.activeLayer()
mapCanvasLayer = QgsMapCanvasLayer( layer )
mapCanvasLayer.setInOverview( True )
self.iface.mapCanvas().setLayerSet( [ mapCanvasLayer ] )
Regards.
Germán
El 22 de septiembre de 2009 09:40, Michele Mammini <mamminim at yahoo.it>escribió:
> Hi Germán
>
> may you write me how to write the code in my plugin in order to use this
> method?
> Maybe I understood that I have to use the class QAction() but i don't
> understand how to use it.
>
> Thank you
>
> Michele.
>
>
> At 16.19 21/09/2009, you wrote:
>
> Hi Michele.
>
> There is an 'actionAddToOverview' method in QgisInterface class [1], so you
> could use it directly for your plugin.
>
> Regards,
>
> Germán
>
> ---------------------------
> [1] http://doc.qgis.org/head/classQgisInterface.html
>
>
> 2009/9/21 Michele Mammini <mamminim at yahoo.it>
> Dear all,
>
> i'm new on QGis, and i'm starting to develop plugin for my project using
> Python and QT.
> I'm able to connect to PostGIS database to query the data and to load the
> Layer into QGis, but i'm not able to load the same layer in the Overview
> windows.
> May someone can suggest me which function/class/code allow me to do it?
>
> Thank you,
>
> Michele.
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
> --
> -----------
> |\__
> (:>__)(
> |/
>
> Soluciones Geoinformáticas Libres
> http://geotux.tuxfamily.org/
>
>
> ______________________________________________________________________
> *Michele Mammini
> *Via dell'Arno, 54 - San Benedetto
> 56021
> Cascina (PISA)
>
> Tel*: +39 050 747037
> *Cell*: +39 328 9039640
>
> *email: * mamminim at yahoo.it* <mamminim at yahoo.it>
> Skype: *mamminim
> * _____________________________________________________________________
>
--
-----------
|\__
(:>__)(
|/
Soluciones Geoinformáticas Libres
http://geotux.tuxfamily.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20090922/c84c05ed/attachment.html
More information about the Qgis-developer
mailing list