[Qgis-developer] Proposal for plugin convention

Chris Crook ccrook at linz.govt.nz
Tue Mar 2 13:34:35 EST 2010


Hi

Several of the plugins that Qgis can use put information into the project file.  For example plugin layers, renderers, and settings.  I think it might be a good idea to establish some conventions so that it is easy to determine what plugins are required to load a project, and to allow Qgis to provide meaningful error messages when the project is loaded in a Qgis instance that doesn't have the plugins loaded.  

For layers and renderers (and any other plugins that have a writeXml function) I am thinking it would be a good convention to add an child element to the Xml defining the plugin.  Something along the lines of

<plugin name="xxxx" version="xxx" url="xxxx"/>

I'm not sure about the "url" element - perhaps "source", or "repository" may be a better name for that.

For plugins that store information in project settings I'm less clear about what to do. Of course they don't matter as much, as the project will load just fine without them and the settings will be ignored.  However I think it could still be useful to have information available about the plugins used.  And in any case it would be good to have a convention for names of settings in any case, to avoid name collisions.  How about something like..

/plugin/xxxxx/....

where xxx is the name of the plugin, and ... are the actual plugin settings.  Maybe a good convention would be to include settings "pluginVersion" and "pluginUrl".

Does this sound like a good idea?  Or perhaps there is a better idea, or even conventions already in place that I have overlooked?

Cheers
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.
______________________________________________________________________________________________________


More information about the Qgis-developer mailing list