[Qgis-developer] Infrastructure for plugin settings

Etienne Tourigny etourigny.dev at gmail.com
Sat Sep 21 12:28:54 PDT 2013


I like the idea of having a dictionnary for the values a settings can have.

Do you think that my work on a tree view for all settings [1] can be merged
with yours into core c++?

There could be 2 ways to open a settings dialog, one for all settings like
I have done, and one for just a particular plugin (by limiting which
settings are shown in the tree).

[1] https://github.com/qgis/QGIS/pull/878


On Wed, Sep 11, 2013 at 9:17 AM, Denis Rouzaud <denis.rouzaud at gmail.com>wrote:

> On 09/11/2013 02:12 PM, Borys Jurgiel wrote:
>> Dnia czwartek, 5 września 2013 15:00:31 Denis Rouzaud pisze:
>>> I have made some publicity before for a library which handles plugin
>>> settings.
>>> http://3nids.github.io/**qgissettingmanager/<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.
>> It looks great! Especially with setValueOnWidgetUpdate=True, as I
>> understand,
>> I'm able to make interactive settings (reading values in the runtime,
>> setting
>> one widget depending on other widget value), without any need of direct
>> access
>> to widgets, I mean staying purely within this layer of abstraction. It's
>> really nice.
>> Of course, I understand graying out widgets and changing list of combobox'
>> items still needs direct access.
>>  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.
>> Similarly to Alex, I prefer interactive and aesthetically hand-polished
>> gui ;)
>> So for my plugins I only can imagine the common settings tree as something
>> additional, an 'advanced' mode. Anyway, let's talk about it on the HF!
>>  So do I. But you could use this library to create the settings, and it
> would automatically add them to the infrastructure. Then, fell free to set
> your own UI or not.
> See you tomorrow!
> ______________________________**_________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/**mailman/listinfo/qgis-**developer<http://lists.osgeo.org/mailman/listinfo/qgis-developer>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20130921/e64c7c68/attachment.html>

More information about the Qgis-developer mailing list