[Qgis-developer] making QgsMapToolIdentify available to plugins

Radim Blazek radim.blazek at gmail.com
Wed Feb 6 08:07:14 PST 2013


On Wed, Feb 6, 2013 at 3:55 PM, Denis Rouzaud <denis.rouzaud at gmail.com> wrote:

> Just pay attention, I pull another request
> https://github.com/qgis/Quantum-GIS/pull/421
> I changed the behavior of the identify methods: it returns the results instead of saving them in a > private attribute.

Better, I think.

> Also, your changes to the raster result structure made me think that we
> could use a single struct for both vector and raster result.
> It might be easier to look into the results.
> Any opinion on this? Nathan?

I believe, that It would be better to pass results to the dialog in
the original hierarchical structure instead of splitting them to
individual results and then reconstruct the tree searching for the
layer it should go into. For rasters the logical structure may vary
form one level for raster values (I would prefer to put band values
directly into layer item instead of adding additional level "feature")
to four levels for WMS with layer-sublayer-featuretype-feature.

Maybe some parts of QgsMapToolIdentify::identifyVectorLayer and
QgsMapToolIdentify::identifyRasterLayer, those related to creation the
tree in dialog should better be moved to QgsIdentifyResultsDialog?
I'll possibly add QgsRasterIdentifyResult and the dialog could work
directly with that or to use current QList<QVariant> returned from
raster identify().

On Wed, Feb 6, 2013 at 4:08 PM, Denis Rouzaud <denis.rouzaud at gmail.com> wrote:
> I don't understand why you added an identify method in
> qgmaptoolindetifyaction in app.

It somehow appeared there during the merge because you have moved
qgsmaptoolidentify.h to qgsmaptoolidentifyaction.h my changes in
qgsmaptoolidentify.h were merged to it, I think. Removed.

Radim


More information about the Qgis-developer mailing list