[Qgis-developer] identify tool for plugins

Denis Rouzaud denis.rouzaud at gmail.com
Thu Jan 17 02:01:35 PST 2013


Hi all,

I have just pushed a new plugin to edit geometry as plain WKT text [0].

Basically, it works as the identify tool: if a feature is found, a 
dialog shows up with the WKT, which is editable if the layer is editable.

I have one main concern regarding the behaviour of my plugin.
I use QgsMapToolEmitPoint.
The feature is found using the current active layer  in the canvas and 
by a select using a rectangle.
Therefore, the user has to choose the right layer before identifying and 
moreover, an invisible feature on the map can be identified.

I just wonder if it would be possible to use the same procedure as 
identify does in a plugin and doing another action than opening the 
attribute editor.

Maybe something like
canvas.setMapTool(QgsIdentifyTool, MyAction)

I thing this could be very useful for many plugin devs.

If I missed something and it already exists, please let me know...

Thanks a lot

Denis


[0] Demo at http://www.youtube.com/watch?v=9-ygwMw72Ww&hd=1





More information about the Qgis-developer mailing list