[Qgis-developer] Decoupling core/data and GUI part of widgets in 3.0

Denis Rouzaud denis.rouzaud at gmail.com
Wed Aug 31 04:38:56 PDT 2016



On 08/31/2016 12:41 PM, Nyall Dawson wrote:
> On 31 August 2016 at 16:56, Matthias Kuhn <matthias at opengis.ch> wrote:
>> Hi,
>>
>> I've already got some ideas because it affects QField (where I'm about
>> to drop the whole gui lib) as well.
>>
>> Implementing this in QGIS instead of QField is much preferred.
>>
>> From a technical perspective, I would propose to use a tree-like
>> structure based on QVariants.
>> They've got all it takes for this:
>>
>> QVariantMap can handle tree structures of key value pairs (for XML child
>> nodes), a key "__attributes__" can be added to save the XML element
>> attributes into.
>>
>> This way, the information can be read without knowledge about a
>> particular widget's implementation details and is available directly
>> from core. The widgets (or whatever part) can add the semantics on top
>> in their own library.
> Just to clarify - are you proposing that only a map of widget
> configuration is moved to core? I'd say the representValue function
> for each widget should also should be moved across, otherwise we'll
> end up with multiple code paths reimplementing the logic from each
> widget + plugins having to redo this themselves.
>
>> So that's the inoffical QEP, I'd say we skip the official part.
> Fine by me - a QEP would have just been a way to get yourself and
> Denis to approve a design for this :)

Let's go like this, but don't disappoint me ;)


More information about the Qgis-developer mailing list