From kde-core-devel Thu Aug 20 15:58:39 2009 From: "Sebastian Trueg" Date: Thu, 20 Aug 2009 15:58:39 +0000 To: kde-core-devel Subject: Re: Review Request: KPixmapSequence: painting spinners made easy Message-Id: <20090820155839.27124.52551 () localhost> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=125078396722215 ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviewboard.kde.org/r/1345/ ----------------------------------------------------------- (Updated 2009-08-20 15:58:39.477436) Review request for kdelibs. Changes ------- * ran astyle to fix all remaining code style issues * check for invalid sequences in KPixmapSequenceWidget::setSequence * do not return valid frames for index bigger than the frame count. * implemented loading of multi-row pixmaps. Would it be preferable to have a method setFrameSize and do lazy extracting of the frames as done in KAnimatedButton? 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 (updated) ----- 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