[Qgis-developer] Infrastructure for plugin settings

Victor Olaya volayaf at gmail.com
Thu Sep 5 06:14:42 PDT 2013


So it seems that at least two people had worked on this previously...
I am glad that I asked :-)

Let's see if we can put all that together and make it more visible, so
people can use it easily

Cheers
Victor


2013/9/5 Denis Rouzaud <denis.rouzaud at gmail.com>:
> I have made some publicity before for a library which handles plugin
> settings.
> http://3nids.github.io/qgissettingmanager/
>
> Basically, the idea is that it you create once the settings somewhere in
> your plugin and then it handles type validation, defaut values, etc. The
> most interesting part is that you have a SettingDialog class, which
> automatically read/write widgets if you name them accordingly to the
> settings (it handles several widgets for all the different types of
> settings).
>
> This small lib is very time saving for the few plugins I have.
>
> Maybe an idea would be to translate this to a QgsPluginSetting class which
> would then list all the settings to be edited in the main plugin setting
> window.
>
> Cheers,
>
> Denis
>
>
>
>
>
> On 09/05/2013 02:47 PM, Etienne Tourigny wrote:
>
> I have implemented something like this some time ago, based on a gui from QT
> - Settings Editor.
>
> I am not sure if I never commited it or if someone removed it.
>
> I will try to find the code and submit a pull request.
>
> Etienne
>
>
> On Thu, Sep 5, 2013 at 5:12 AM, Victor Olaya <volayaf at gmail.com> wrote:
>>
>> The idea is to have that common place for all settings. The bad thing
>> that I see (and some people have told me), is that it might be
>> difficult to find for a user that searches for a configuration panel
>> for a given plugin, since he might look for it in the menu of that
>> plugin. A solution to that would be to make it easy to call the
>> settigns dialog, but open in the tab (or panel, or whatever),
>> corresponding to a given plugin. So there would be a "plugin options"
>> menu, with all options, but a plugin author could add a shortcut to
>> that and add a "setting of my plugin" menu entry which would go
>> straight to those settings.
>>
>> The thing is to avoid developers creating their own panels and dialogs
>> for settings, which is time consuming and each one looks differently.
>>
>> I would suggest a design similar to the eclipse one, with a tree in
>> the left hand side where you have all plugins, and once you select
>> one, you see all its parameters in the right-hand side panel.
>>
>> If anyone is interested, we can discuss this in the HF. It looks to me
>> like a nice thing to work on, and we can also adapt some existing
>> plugins to use it, once it is done.
>>
>> cheers
>> Víctor
>>
>>
>>
>> 2013/9/5 Matthias Kuhn <matthias.kuhn at gmx.ch>:
>> > Hi,
>> >
>> > Other applications have unified setting centers like firefox when you
>> > enter about:config in the URL bar. But this is in addition to the
>> > settings dialog(s) which is/are still offered. Are you thinking about
>> > something like this? A simple config value editor, like regedit?
>> >
>> > Or is the aim of this project a unified config dialog, where plugins
>> > register their own tab (or list entry or whatsoever)? In this case,
>> > would it be a new dialog "Plugin Options" which would act as container
>> > for all options? Or opening up the "Options" dialog for registering
>> > additional tabs? IMO the first one has the drawback of brandmarking
>> > plugins as 3rd-party, not fully integrated, while the second one has
>> > the drawback/risk of cluttering this dialog.
>> >
>> > Talking about this, I recently did a similar thing for the vector layer
>> > properties (add the possibility to add a new tab for plugins. POC
>> > implemented in form of layer specific globe settings, not yet merged)
>> >
>> > Cheers
>> > Matthias
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
>
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>


More information about the Qgis-developer mailing list