[Qgis-developer] Custom raster drawing

Martin Dobias wonder.sk at gmail.com
Tue Jun 12 13:05:51 EDT 2007


On 6/12/07, Peter Ersts <ersts at amnh.org> wrote:
> One thing that have come up recently related to the transparency is that
> there is a need for  a way to reference an external raster layer loaded
> on the map canvas from with in QgsRasterLayer and also a way to know
> if/when that layer is deleted/removed. -- This allows for the an band in
> another layer to be used as the input for the transparency. A problem
> arrises when layer Y is selected as the transparency input for layer Z,
> then the user delete/unloads layer Y. In a working version (not
> committed to svn yet - I will probably commit it later this evening) I
> added a signal that is emitted when a raster layer is deleted. Thus when
> Y is deleted, layer Z knows to clear/forget about the current
> transparency layer settings. However, this is not a perfect solution
> because Qt does not guarantee the order in which signals will be
> processed. There have been a couple of suggestions about guarded
> pointers, which may be something to investigate further when the major
> refactoring is considered - but this issue has broader implications that
> reach outside of the raster transparency branch.

Is there any reason for not using signals emitted from QgsMapLayerRegistry?

Cheers
Martin



More information about the Qgis-developer mailing list