[Qgis-developer] 1:many relation enhancements

HAUBOURG regis.haubourg at eau-adour-garonne.fr
Tue Oct 21 12:44:52 PDT 2014


Hi Matthias,
Agregate functions could be provided by virtual table feature (qep is coming I think), I suppose we should chose one common way for advanced relationnal capabilities.

About filtering, you're right,  we can't assume children table to be geographic. I was thinking of a search bar on top of the dialog showing new children candidates. That search bar could have a qgsexpression widget on its right to enable a permanent filter + a field chooser to choose on what field apply the user entries of search bar. why not have parent geometry accessible in expression builder and let the power user make spatial filters?
..
Thanks for the tip on qtcreator, I worked on 2.4… now I know it's done ;-)
By now, no direct funding is possible for me (administrative blockers). I wish I could finance your work on unit tests first, but it is currently forbidden to french administrations..

cheers,
Regis


Matthias Kuhn <matthias.kuhn at gmx.ch> wrote:


Hi,

Thank you for the feedback. It's nice to hear that this work is being
used and appreciated.

Matteo, the filter sounds like a good idea. The main problem I see with
that is that adding an additional filter column may be cluttering the
already limited space in the embedded form. Maybe a button is required
to toggle this.

The other idea - if I understood it correctly - is something I have been
considering for a while. It is generally known as "aggregated
functions", that is things like max/min/avg/count etc. over all (or even
only a subset of) related features. This would be best embedded in or
around the expression engine. It's an advanced topic, but it's
definitely on my todo list.

On 20.10.2014 21:21, Régis Haubourg wrote:
> Hi,
> I just finished a project with custom UI made with QTcreator with qgis
> widgets. I successfully added the 1-n relations editor widget, ans it is
> really a great feature.
>
> +1 with filter suggestion to find a relation . a spatial filter  ( distance
> or BBox index filtrer) would be the best filter.
This is referring to a scenario where both involved layers contain
geometries and you would want the parent's feature available in the
expression to filter the childrens?
> I also saw some  possible improvements :
> -  An option to choose default  view (attributs or form) is welcome ans
> should be exposed in qtcreator too.
That is available in QtCreator if you use the custom widgets plugin.
There is an option called "view mode" which can be set to form or table.
(Available in master / 2.6)
> - blocking the tools to add or delete relations is wishable when administor
> do not want  user to do it.
Good idea.
> - a commit is made  for each row that has been clicked on (red italic
> confirmation on form view). this leads to commits even if no data has  been
> modified. is that possible to have detect commit status if data input is
> made?

This is likely not a problem of the relation widgets but the edit
widgets used on the embedded form. Maybe one of them is unsuitable (like
a value map that doesn't contain the original value or an edit widget
that does not match the widget defined in the .ui file).

If somebody is able and willing to fund these features or help otherwise
I am more than happy to see things improving in this area. I think there
is a lot of potential left to be explored with relations.

Kind regards,
Matthias

--
Help getting QGIS to the next level of quality before November 15!
http://blog.vitu.ch/10102014-1046/crowdfunding-initiative-automated-testing





More information about the Qgis-developer mailing list