[Qgis-developer] Extending QgsMapToolIdentify and QgsIdentifyResults

Peter Ersts ersts at amnh.org
Thu Jan 25 22:11:49 EST 2007

Dear Developers,

I was wonder if it would be possible to disassociate the 
QgsIdentifyResults from a QWidget? My suggestions is to make 
QgsIdentifyResults a more generic object. This would allow for any class 
(or plugin) to implement QgsMapToolIdentify. The QgsMapToolIdentify 
mouse event would simply return a QgsIdentifyResult object that could 
then be displayed by the user or used to obtain attributes for the 
feature or pixel at the screen/map coordinates.

For example, I have been working on some modifications to the 
QgsRasterLayer and QgsRasterLayerProperties classes (and gui) to allow 
for basic stretching and multiple user defined transparency values.  One 
of the feature that was suggested was to have a "Identify Features" like 
tool to populate the transparency tables. In this example, the user 
would press a button "Add Values From Display" which I would like to 
launch a QgsMapToolIdentify like feature, but return the results as a 
simple object to QgsRasterLayerProperties.  QgsRasterLayerProperties 
would then use the results to populate a table in gui rather than simply 
display the pixel values in another dialog.

This would also allow users to inherit and extend the functionality of 
QgsMapToolIdentify. It seems like it should not be to difficult, but I 
may be missing something here.


Peter J. Ersts, Project Specialist
American Museum of Natural History
Center for Biodiversity and Conservation
Central Park West at 79th Street
New York, New York 10024
Tel: (212)-496-3488 or (212)-769-5742
Fax: (212)-313-7295 or (212)-769-5292
Web: http://cbc.amnh.org

Visit the Indo-South Atlantic Consortium on Humpback Whales 
Web:  http://www.isach.org

More information about the Qgis-developer mailing list