-
Notifications
You must be signed in to change notification settings - Fork 21
Customization : override some plugin default settings #43
Comments
Question : what if the user installing the plugin on Windows does not have write access to the registry ? Can we have a default value in the plugin runtime then until sys admins fill in values for those settings as registry keys ? |
1 Only the one setting up qgis for health will need writting |
Thanx. To avoid problems for non admin Windows users, I would check in the plugin if a value is set. If not, I'd give it the default (hardcoded in Python). Else I'd take whatever QSettings.value() returns. |
The |
Excellent, thanx ! I'd still have to check for valid url in the case of the help button though. |
Two (2) QSettings implemented : 04e66e4 (plus recent edit c89e1b9)
branches disabled if value is "False" or "false" (booleans cast to str to make sure we catch those too); else enabled
any well-formed url, else the default RTD site. Pretty simple. Works whether system wide (e.g. registry keys) settings exist or not. Tested on Ubuntu and Windows 10. @vmora : does that look OK to you ? If so will add docs for that and I should submit a PR tomorrow. The general idea is that customization is possible, not compulsory. Therefore I have not written a short one-off Python script to set the variables yet (nor did I add any code in historize to set those QSettings). I think just instructing users how they can customize those two settings in the Python command prompt in QGIS is enough. Active Directory administrators will like the fact they can apply organization wide settings if they wish. See docx below for an example in Windows. |
Added documentation : 8424e4c |
@ymoisan from the discussion, I think we can close that, can you confirm ? |
Project migrated to : https://gitlab.com/Oslandia/qgis/qgis-versioning |
There is a need to add organization-specific items to customize the plugin installation. Two such items for the versioning plugin are :
Second url below says "global settings ... provided directly by Qt framework by the means of QSettings class. By default, this class stores settings in system’s “native” way of storing settings, that is — registry (on Windows), .plist file (on Mac OS X) or .ini file (on Unix)." so it would be a matter of defining those settings for the plugin, have default values for those settings and those would be writtent at the right location in users computers.
Useful urls :
The text was updated successfully, but these errors were encountered: