Flashing the thumbnail in a sequence
For this last animation, we want to display a blue flash on each filter preview when the thumbnail is updated. We do not want to flash all previews at the same time, but in a sequence, one by one. This feature will be achieved in two parts:
Create a color animation in
FilterWidget
to display a blue flashBuild a sequential animation group in
MainWindow
containing allFilterWidget
color animations
Let's start to add the color animation. Update FilterWidget.h
as shown in the following snippet:
#include <QGraphicsColorizeEffect> class FilterWidget : public QWidget { Q_OBJECT public: explicit FilterWidget(Filter& filter, QWidget *parent = 0); ~FilterWidget(); ... QPropertyAnimation* colorAnimation(); private: ... QPropertyAnimation mSelectionAnimation; QPropertyAnimation* mColorAnimation; QGraphicsColorizeEffect mColorEffect; };
This time we do not want to affect the opacity, but rather colorize...