[KPhotoAlbum] Very experimental image-grouping patch

Paul Fleischer paul at xpg.dk
Wed Nov 28 12:08:34 GMT 2007


2007/11/28, Jan Kundrat <jkt at gentoo.org>:
> On Wed, 28 Nov 2007, Paul Fleischer wrote:
> > > g) I think we don't want to decrease displayed number of images in
> > > browser widget
> >
> > I don't quite follow?
>
> Start the demo DB, you'll see "24" as number of images on the first
> screen. Make some images children of something, return home, you see less
> than 24.

Ahh, I see. I find this logical, as there are only 24 images shown.

> > > i) No need for +class ImageInfoList; in DB/ImageInfo.h
> >
> > Indeed not. The first instance of the patch had children as
> > ImageInfoList, rather than QStringList.
>
> Actually it might make sense to use "something better" than image names
> for identifying children. Hmm, or probably not worth the effort as we
> access images based in file name on all other places anyway.

My exact same thoughts :-)

> > > l) Do we have to use "child" attribute in XML DB? Isn't "parent" enough?
> > > What happens if these two are inconsistent?
> >
> > The advantage by having the child attribute, is that we avoid having
> > to do name-lookup for the parent on each image-load. At least that was
> > my initial idea. But inconsistencies will mess things up badly, so I
> > agree that having only parent would be the best.
>
> I haven't checked the code thouroughly yet, but it seems to me that we can
> generate this mapping after having parsed the XML file. I have nothing
> against having memory structures a "bi-directional list", but I'd like to
> avoid it in the XML db.

I understand. Only disadvantage by doing it after having parsed the
XML file, is that it
requires running through all images again, to establish the
parent/child relation. But I guess, that this doesn't really matter.

> > > q) Add some actions/shortcuts to ImageView for cycling through the
> > > alternatives
> >
> > Could you elaborate?
>
> When you've launched a viewer, one image is shown and you can move back &
> forward among your "selected items" by pgup/pgdown. It might be
> interesting to add some action that would move only among "children of
> current image".

Ahh, yeah, that sounds very nice.

> > Thank you very much for your comments. I'll fix the smaller issues as
> > soon as I get a chance, and create a new patch. Also, I'll try to
> > remove the child-stuff from XMLDB, as it's both ugly and, as you
> > mention, can lead to inconsistencies.
>
> You should also talk to Tuomas Suutari (Tuomas on IRC) about his SQL DB
> (which is probably very different and would require either an expensive
> lookup or storing both "children" and "parent" stuff in the SQL).

I will get in touch with him, when I get a chance. I've ignored the
SQL stuff on purpose until now to make life simpler. But I will talk
to him in order to find a viable solution.

> Thanks for great work. How much time did it take you btw?

That's a very good question. I think I hacked together the major part
in an evening, 4 hours or so. But it was the first time I had a look
at the KPhotoAlbum source code.

/Paul



More information about the Kphotoalbum mailing list