[Qgis-developer] Some questions about PyQGIS

Germán Carrillo carrillo.german at gmail.com
Thu Apr 2 11:07:34 EDT 2009


Hi, I read the QGIS API
documentation<http://doc.qgis.org/stable/modules.html>and tried to
implement it. I have some questions/problems and I would like
you to help me:

1. Is it possible to set the canvas scale manually? The only method I see is
in MapRenderer class but it is not accessible for canvas.mapRenderer() (I
get AttributeError: setScale).

2. Is it possible to set the canvas SRS manually? I only see this method on
QgsMapLayer.

3. I get some "class is not defined" with QgsRunProcess and QgsMapTip. How I
should reference them? I have the qgis.core and qgis.gui imports. These are
the 1% of the API in C++ which is not in the bindings? :P

4. Implementing the QgsMapTool class I have no way to get the DoubleClick
event, I did this:
    -------------
    def canvasDoubleClickEvent(self,event):
        print "Yes"
    -------------
   But it doesn't work. I get two Raise events instead of DoubleClick one.
(I really want the DoubleClick event)

Thanks for the project and for the bindings.


Germán


-- 
-----------
  |\__
(:>__)(
  |/

Soluciones Geoinformáticas Libres
http://geotux.tuxfamily.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20090402/787c041e/attachment.html


More information about the Qgis-developer mailing list