[Qgis-developer] Python plugin architecture and renderer plugins

Chris Crook ccrook at linz.govt.nz
Tue Jan 26 16:49:14 EST 2010


Hi

I'm wanting to implement a python based renderer as a plug-in.

This seems straightforward, but there are a couple of interface issues that I cannot fix.

The problem is with the unload function of the class factory.  I cannot unload the plugin if there are current layers rendered using it, so ideally what I want to do is to be able to cancel the unload, or at least postpone it till Quantum exits.

The other thing I want to do is notify users that if they do unload the plugin that they may not be able to reload projects which contain layers rendered using the plugin renderer - if it is no longer installed then the project will fail to reload the layers.

I thought I could do this in the unload function by displaying a dialog box.  However the unload function is called when Quantum exits, as well as when the plugin is unregistered.   I don't want the dialog to pop up every time the user exits.

It looks like I need an uninstall function in the class factory, which is called by the plugin manager before it is uninstalled, and which can cancel the uninstall.

Is there any such function?

Thanks
Chris



______________________________________________________________________________________________________

This message contains information, which is confidential and may be subject to legal privilege. 
If you are not the intended recipient, you must not peruse, use, disseminate, distribute or copy this message.
If you have received this message in error, please notify us immediately (Phone 0800 665 463 or info at linz.govt.nz) and destroy the original message.
LINZ accepts no responsibility for changes to this email, or for any attachments, after its transmission from LINZ.

Thank you.
______________________________________________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20100127/56ed56f5/attachment.html


More information about the Qgis-developer mailing list