[Qgis-developer] Extending QgsMapToolIdentify and QgsIdentifyResults

Martin Dobias wonder.sk at gmail.com
Fri Jan 26 15:05:21 EST 2007

Hi Peter,

your idea sounds good for me. But could you explain how should
QgsIdentifyResult object look like? I mean what will be its contents
for vector/raster layers - e.g. only feature ID (for vector layers)
and cell coordinate (for raster layers) or whether it will contain
also more information etc.


On 1/26/07, Peter Ersts <ersts at amnh.org> wrote:
> 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.
> cheers,
> -pete
> --
> ====================================
> 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
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.qgis.org
> http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer

More information about the Qgis-developer mailing list