[Qgis-developer] making QgsMapToolIdentify available to plugins

Denis Rouzaud denis.rouzaud at gmail.com
Mon Jan 21 23:13:06 PST 2013


Hi all,

Following my previous mail, I am trying to make the identify map tool 
available to plugins.

With Matthias Kuhn's help, I've found two ways to achieve this:

- Move QgsMapToolIdentify::identifyVectorLayer and identfiyRasterLayer 
to mapCanvas

- Move QgsMapToolIdentify to gui, and inherits it in 
QgsMapToolIdentifyAction (or whatever) in app.

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.

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.

I might have missed something, but, I think this would be a great 
addition for plugin-devs.
And before going further, I'd like to know experts' opinions and ideas.

Greetings,

Denis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20130122/fba48710/attachment.html>


More information about the Qgis-developer mailing list