[Qgis-developer] Form widgets: decouple widget type from "hidden" or not
Matthias Kuhn
matthias.kuhn at gmx.ch
Tue Jun 4 09:05:22 PDT 2013
Hi
If I understand correctly, you want to show a different form in QGIS
desktop and the QGIS web client.
I'm not familiar with the code that generates the forms for the web
client, but reading your question, I guess that it generates it's form
based on the definition made in the vector layer properties / field
tab. As far as I remember, there was no support for ui files or drag
and drop designed forms in the web client (unless this changed
meanwhile), so if you generate a drag and drop form and skip the field
you mentioned, does this not lead to the desired result?
There are a couple of other discussions or ideas related to this. One
being brought up by Jürgen IIRC, which involved being able to define
multiple form layouts for a layer which could then be used based on the
context, in which a form is being shown (e.g. feature identify,
attribute table => form view, embedded form and this list could be
expanded with web services, involved user etc.)
The other discussion I remember was by Denis or Nathan (not sure) and
it's more about the organization of the fields tab in the layer
properties. My main concern about your idea is that it will add yet
another field to an already overly crowded table which defines the
representation of the fields. Instead of a table, there should be group
boxes which will make it a lot easier to manage the fields.
Under the hood, I've been writing a new API for the widgets which will
make maintenance for all the widgets a lot easier and providing custom
widgets should be straightforward (also from python). I'll integrate
this API into 2.1 but will probably not yet port the old widgets to the
new API but the relations widget will be based on the new API.
Maybe webclient widgets could be ported to the same new API? I didn't
think about it yet, but it could be worth a thought. As mentioned, I
don't know the webclient code, so I'm not sure if this is feasible.
Matthias
On Die 04 Jun 2013 17:14:46 CEST, Andreas Neumann wrote:
> Hi,
>
> I have projects where I want to define a widget type (for QGIS web
> client projects) but want to hide the field in QGIS desktop. I know - it
> sounds strange, but it is a requirement.
>
> I therefore want to discuss whether we could have a separate column next
> to the WMS and WFS column, labeled "Desktop" with a checkbox that
> defines if the field is visible in QGIS desktop or not.
>
> Then we could still define a widget type (for QGIS web client) but hide
> the field in QGIS desktop. We could then remove the "Hidden" widget
> type, which isn't a widget anyway.
>
> This is kind of similar to the "editable" status we introduced a couple
> of weeks/months ago - where we initially had the separate "immutable"
> widget type where only line input widgets were supported.
>
> Any thoughts?
>
> Thanks,
> Andreas
> _______________________________________________
> 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