[Qgis-developer] Decoupling core/data and GUI part of widgets in 3.0
Matthias Kuhn
matthias at opengis.ch
Wed Aug 31 07:38:26 PDT 2016
Hi
On 08/31/2016 04:12 PM, Patrick Valsecchi wrote:
> Hi,
>
> On Wed, Aug 31, 2016 at 1:20 PM, Matthias Kuhn <matthias at opengis.ch
> <mailto:matthias at opengis.ch>> wrote:
>
> On 08/31/2016 12:41 PM, Nyall Dawson wrote:
> > 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.
>
> Good point,
>
> that will also be nice to have in core.
>
> In this case we'll end up with two registries and two factories
> (although only a few widgets will need core functionality).
> Or did you have a different idea in mind?
>
>
>
> That would force the plugin writters to provide two plugins:
Not really, you can add two register calls in one plugin.
> I do agree that representValue would be useful in core, but that has
> some cost to split the thing in two. Or maybe reprensent value is
> something totally different from the widgets for editing the fields and
> they don't have to be in 1-1 relation.
As long as there is no representValue() method (most of the widgets
actually) I don't think the core part is required and just some generic
default module can handle this.
Matthias
More information about the Qgis-developer
mailing list