Review Request: KPixmapSequence: painting spinners made easy
Sebastian Trueg
trueg at kde.org
Mon Aug 17 15:51:50 BST 2009
> On 2009-08-17 11:14:00, Michael Leupold wrote:
> > Not really a full review, but I spotted some coding style issues, mostly:
> > - mixed use of tabs/spaces to indent
> > - there shouldn't be whitespaces around function arguments f( a )
> > - for pointers and references use a space before '*' and '&'
> >
> > It seems the KPixmapSequence and the painter share some functionality with QMovie. Having used either, do you think it would be possible to use the upstream class or does it have too many drawbacks? (one I can spot right away is that upstream is missing loading from a QPixmap)
I thought I fixed all the tab issues. Well, will fix that.
Yeah, I know, kdelibs style guide uses spaces a different way than I do. I will change it, grinding my teeth in the process. ;)
We tried to use QMovie, it is not possible as QMovie does only support loading from gif and friends. KPixmapSequence on the other hand loads from on of these pngs like the konqueror spinner where the frames are put into one column.
Sure, if QMovie was adjusted to support those or had API to add frames we could use QMovie...
> On 2009-08-17 11:14:00, Michael Leupold wrote:
> > trunk/KDE/kdelibs/kdeui/util/kpixmapsequencewidget.cpp, line 90
> > <http://reviewboard.kde.org/r/1345/diff/2/?file=10189#file10189line90>
> >
> > I think that's superfluous.
I agree. It was just added for convenience.
- Sebastian
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/1345/#review2050
-----------------------------------------------------------
On 2009-08-17 10:21:03, Sebastian Trueg wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/1345/
> -----------------------------------------------------------
>
> (Updated 2009-08-17 10:21:03)
>
>
> Review request for kdelibs.
>
>
> Summary
> -------
>
> Showing a spinner to indicate a work in progrss is a typical task. Gwenview does have a nice spinner when loading images. Aurelien and I extracted the code from Gwenview and molded it into three nice classes that allow to create spinners very easily in any situation. At the moment the classes are used in Gwenview and in Nepomuk.
>
> KPixmapSequence: a simple container class that loads a sequence of pixmaps and provides the frames through a simple interface.
> KPixmapSequenceOverlayPainter: Installs an event filter to paint a KPixmapSequence onto any widget using Qt::Alignment or a relative placement.
> KPixmapSequenceWidget: A simple widget using the overlay painter to draw a spinner while the widget is visible.
>
> We propose an addition to kdeui.
>
>
> Diffs
> -----
>
> trunk/KDE/kdelibs/kdeui/CMakeLists.txt 1006831
> trunk/KDE/kdelibs/kdeui/util/kpixmapsequence.h PRE-CREATION
> trunk/KDE/kdelibs/kdeui/util/kpixmapsequence.cpp PRE-CREATION
> trunk/KDE/kdelibs/kdeui/util/kpixmapsequenceoverlaypainter.h PRE-CREATION
> trunk/KDE/kdelibs/kdeui/util/kpixmapsequenceoverlaypainter.cpp PRE-CREATION
> trunk/KDE/kdelibs/kdeui/util/kpixmapsequencewidget.h PRE-CREATION
> trunk/KDE/kdelibs/kdeui/util/kpixmapsequencewidget.cpp PRE-CREATION
>
> Diff: http://reviewboard.kde.org/r/1345/diff
>
>
> Testing
> -------
>
>
> Thanks,
>
> Sebastian
>
>
More information about the kde-core-devel
mailing list