diff options
author | J-P Nurmi <jpnurmi@digia.com> | 2012-10-17 16:41:42 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-02 15:57:11 +0100 |
commit | d53ac9d8cac3efea68e614bd0423c94a56e32220 (patch) | |
tree | 0d9c39985942f785cfa876f35bb2c7d647b97b82 /src/widgets/styles/qstyleanimation_p.h | |
parent | 3cf5ef7fe51882c2671772f0dc9a6297e898d6bb (diff) |
Introduce QBlendStyleAnimation (based on QWindowsVistaAnimation)
Change-Id: Ie289debe69ea7f6bb7833f979e39bb91290cc49c
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'src/widgets/styles/qstyleanimation_p.h')
-rw-r--r-- | src/widgets/styles/qstyleanimation_p.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/widgets/styles/qstyleanimation_p.h b/src/widgets/styles/qstyleanimation_p.h index d9869533ef..9dddc7b62c 100644 --- a/src/widgets/styles/qstyleanimation_p.h +++ b/src/widgets/styles/qstyleanimation_p.h @@ -44,6 +44,7 @@ #include "qabstractanimation.h" #include "qdatetime.h" +#include "qimage.h" QT_BEGIN_NAMESPACE @@ -134,6 +135,33 @@ private: mutable qreal _prev; }; +class QBlendStyleAnimation : public QStyleAnimation +{ + Q_OBJECT + +public: + enum Type { Transition, Pulse }; + + QBlendStyleAnimation(Type type, QObject *target); + + QImage startImage() const; + void setStartImage(const QImage& image); + + QImage endImage() const; + void setEndImage(const QImage& image); + + QImage currentImage() const; + +protected: + virtual void updateCurrentTime(int time); + +private: + Type _type; + QImage _start; + QImage _end; + QImage _current; +}; + QT_END_NAMESPACE #endif // QSTYLEANIMATION_P_H |