[KPhotoAlbum] Assigning tags to groups

Robert Krawitz rlk at alum.mit.edu
Wed Dec 18 00:05:46 GMT 2019

On Wed, 18 Dec 2019 00:16:02 +0100, Johannes Zarl-Zierl wrote:
> Am Montag, 16. Dezember 2019, 13:59:46 CET schrieb Robert Krawitz:
>> > I think it's intended that a tag can't only be member of one group, but of
>> > multiple ones. E. g. "Esbjerg" can be part of "Denmark" as well as of
>> > "Party Locations".
> I vaguely remember some discussion how to do it best back in the day
> when, with the result that a DAG (direct acyclic graph) was the most
> reasonable implementation. I.e. it never was a tree.

That's fine, as long as it's clear what's going on.  I'd greatly
prefer it to be a DAG, actually.

>> > IIRC, the original relationship display was groups on the left and members
>> > on the right side, and each tag could/can be a member of each group. I
>> > thought a tree view was better, as nested groups were possible but the
>> > display could not show them. And thus, I wrote an algorithm translating
>> > the parent-child relatinship to a tree view.
>> > 
>> > That was quite some time ago, so I'm not sure if I implemented it
>> > correctly
>> > back then (but I hope so!). But imo, definitely, it must be possible for a
>> > tag to be member of multiple groups.
>> The annotation dialog shows it as a tree.  One can drag and drop tags
>> around in that tree, but that's a move, not a copy.  So either way, it
>> needs to be consistent.
> I guess the simple reason for displaying it as a tree was that a
> tree was a far better and intuitive visualization than the previous
> one, and Qt did not have a widget supporting a DAG.  To be honest, I
> don't know how a better visualization could even look like.

A DAG is not in general a tree, as a node can have multiple parents.

The obvious way to display a DAG is to allow a given node to exist in
multiple places in the tree.  That could get complex to display; if
you add a new item under one node in the tree, it needs to appear
under all nodes representing the same object.  If it only appears in
one place, it's completely unobvious what's going on.
Robert Krawitz                                     <rlk at alum.mit.edu>

***  MIT Engineers   A Proud Tradition   http://mitathletics.com  ***
Member of the League for Programming Freedom  --  http://ProgFree.org
Project lead for Gutenprint   --    http://gimp-print.sourceforge.net

"Linux doesn't dictate how I work, I dictate how Linux works."
--Eric Crampton

More information about the Kphotoalbum mailing list