<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Luca:<br>
                did you know that the call to QObject.connect changed
in version 1.3? If you look at the API documentation for the
development version you will see the new format. The change is subtle,
it changed from:<br>
        <font face="Times New Roman" size="3"><span
 style="font-size: 12pt;"></span></font><font face="Times New Roman"
 size="3"><span style="font-size: 12pt;">SIGNAL("canvasClicked(QgsPoint
&,</span></font><font face="Times New Roman" size="3"><span
 style="font-size: 12pt;">Qt::MouseButton)")</span></font><br>
to:<br>
        <font face="Times New Roman" size="3"><span
 style="font-size: 12pt;">SIGNAL("canvasClicked(const
QgsPoint &,</span></font><font face="Times New Roman" size="3"><span
 style="font-size: 12pt;">Qt::MouseButton)")</span></font><br>
<br>
I handle the change in my Image Clipper plugin as follows:<br>
<br>
<font face="Times New Roman" size="3"><span style="font-size: 12pt;">       
theVersionInt = QGis.QGIS_VERSION_INT<o:p></o:p></span></font>
<br>
<font face="Times New Roman" size="3"><span style="font-size: 12pt;">       
if theVersionInt / 100 > 102: # must conform to newer API
standard call<o:p></o:p></span></font>
<br>
<font face="Times New Roman" size="3"><span style="font-size: 12pt;">           
QObject.connect(self.emitPoint, SIGNAL("canvasClicked(const
QgsPoint &,\<o:p></o:p></span></font>
<br>
<font face="Times New Roman" size="3"><span style="font-size: 12pt;">                           
Qt::MouseButton)"),
self.setClipWindow)<o:p></o:p></span></font>
<br>
<font face="Times New Roman" size="3"><span style="font-size: 12pt;">       
else: # version is 1.2 or earlier - use older API standard call<o:p></o:p></span></font>
<br>
<font face="Times New Roman" size="3"><span style="font-size: 12pt;">           
QObject.connect(self.emitPoint,
SIGNAL("canvasClicked(QgsPoint &,\<o:p></o:p></span></font>
<br>
<font face="Times New Roman" size="3"><span style="font-size: 12pt;">                           
Qt::MouseButton)"),
self.setClipWindow)<o:p></o:p></span></font><br>
<font face="Times New Roman" size="3"><span style="font-size: 12pt;"><o:p></o:p></span></font><br>
I hope that this helps you.<br>
<br>
    Bob<br>
<br>
On 10/13/2009 9:43 AM, <a class="moz-txt-link-abbreviated" href="mailto:luca_manganelli@comune.trento.it">luca_manganelli@comune.trento.it</a> wrote:
<blockquote
 cite="mid:OF53AB844B.C9CBDAA2-ONC125764E.0050ACB8-C125764E.0050E99D@comune.trento.it"
 type="cite">
  <pre wrap="">
Hi,

I opened a bug report: <a class="moz-txt-link-freetext" href="https://trac.osgeo.org/qgis/ticket/2006">https://trac.osgeo.org/qgis/ticket/2006</a>

with API change on QGIS 1.3.0 I cannot connect signal canvasClicked with a
function.

In that bug report I attached a sample plugin that opens a message box when
you click on the map.

Just unzip it in your python/plugins directory and enable it in the
"Plugins" menu.

_______________________________________________
Qgis-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a></pre>
  <pre wrap="">
<hr width="90%" size="4">

No virus found in this incoming message.
Checked by AVG - <a class="moz-txt-link-abbreviated" href="http://www.avg.com">www.avg.com</a> 
Version: 8.5.421 / Virus Database: 270.14.13/2432 - Release Date: 10/13/09 06:35:00

  </pre>
</blockquote>
<br>
</body>
</html>