<div dir="ltr">Hey Denis, <div><br></div><div style>Yeah it's a bit of a pain.  I starting to move it a while ago and then lost motivation as the code was really coupled.</div><div style><br></div><div style>The second option is the best if you can afford to fund it or spend time on it :)</div>

<div style><br></div><div style>- Nathan</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jan 22, 2013 at 5:13 PM, Denis Rouzaud <span dir="ltr"><<a href="mailto:denis.rouzaud@gmail.com" target="_blank">denis.rouzaud@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  

    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hi all,<br>
    <br>
    Following my previous mail, I am trying to make the identify map
    tool available to plugins.<br>
    <br>
    With Matthias Kuhn's help, I've found two ways to achieve this:<br>
    <br>
    - Move QgsMapToolIdentify::identifyVectorLayer and
    identfiyRasterLayer to mapCanvas<br>
    <br>
    - Move QgsMapToolIdentify to gui, and inherits it in
    QgsMapToolIdentifyAction (or whatever) in app.<br>
    <br>
    As far as I understand it, it will be more complicated for the
    second option because app vs non-app code is deeply coupled in the
    current QgsMapToolIdentify. Indeed, features are added one by one to
    QgsIdentifyResults which is a dialog.<br>
    <br>
    But this second option would be much more powerful: the user could
    override the QGIS setting for identify mode (current layer,
    top-down,...) which is used in the canvasReleaseEvent or he could
    filter the type of layer... And he would not have to rewrite the
    canvasReleaseEvent.<br>
    <br>
    I might have missed something, but, I think this would be a great
    addition for plugin-devs.<br>
    And before going further, I'd like to know experts' opinions and
    ideas.<br>
    <br>
    Greetings,<br>
    <br>
    Denis<br>
    
  </div>

<br>_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
<br></blockquote></div><br></div>