[Digikam-devel] Introduction and comments about bug:137320

Gilles Caulier caulier.gilles at gmail.com
Thu Mar 6 07:55:54 GMT 2008


2008/3/6, Arnd Baecker <arnd.baecker at web.de>:
>
>
>
> On Thu, 6 Mar 2008, Pau Ruŀlan Ferragut wrote:
>
> > On Wed, Mar 05, 2008 at 10:06:32PM +0100, Arnd Baecker wrote:
> >> On Wed, 5 Mar 2008, Pau Rul·lan Ferragut wrote:
> >>> 2008/3/5, Gilles Caulier <caulier.gilles at gmail.com>:
> >>>> 2008/3/5, Pau Rul·lan Ferragut <paurullan at bulma.net>:
> >
> >>>>> The first thing I would like to do is to get rid of the stoping
> thumbnail
> >>>>> bug:
> >
> >>>> - a class named PixmapManager handle thumbs image for each icon item.
> >>>> - a class named AlbumIconView manage view of icon from main
> interface.
> >
> >>> I am stuck on AlbumIconView::nextItemToThumbnail(). I would like to
> use
> >>> Iconview::firstItem() to get the first item of the album but I cannot
> find
> >>> any object or way to do it. Any ideas?
> >
> >> Looking at iconview.cpp it *seems* (Gilles, correct me!),
> >> that two new public methods
> >>    firstItem()  and lastItem()
> >> have to be introduced, which just return
> >>   d->firstContainer and    d->lastContainer ,
> >> respectively.
> >
> > These methods exists.
>
>
> Hmm, you are right, they exist.
> But do they return  d->firstContainer and    d->lastContainer ?
> They  return d->firstGroup->firstItem() and  d->lastGroup->lastItem() .
>
> Well, I better shut up, because I don't know
> the meaning of Groups and Containers
> (and I could not find any explaining comments in the code ...)
>
> Gilles, could you maybe explain?


Groups of items are used when multiple album are displayed in the same time
in icon view for ex. when you use searches tools or recursive album mode.

firstItem() return the first item from the first group available on icon
view, and lastItem() the last item from the last group. If there is just one
group you have the first item and the last item as well.




> My problem is that my experience with C++ is like zero
> > and I do not find the way to those methods without a IconView object.
> Another
> > way would be to get this IconView but I do not find from where.
> >
> > I have this from the actual implementation:
> >        AlbumIconItem* firstItem = static_cast<AlbumIconItem*>(fItem);
> >        AlbumIconItem* lastItem  = static_cast<AlbumIconItem*>(lItem);
> >        AlbumIconItem* item      = firstItem;
> >
> >
> > and want to add something like these:
> >       AlbumIconItem* firstItem = firstItem();
> >       AlbumIconItem* lastItem  = lastItem();
> >       AlbumIconItem* item      = firstItem;
>
>
> In principle
>      IconItem *fItem = firstItem();
>      IconItem *lItem = lastItem();
> would technically work, but I am not sure, whether that would
> do what we want ...


Yes this is right, but to have tested this patch on my computer, this is not
enough to solve the problem. thumbs rendering is broken.

Gilles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/digikam-devel/attachments/20080306/9591f420/attachment.html>


More information about the Digikam-devel mailing list