#include <animatedpixmap.h>
Signals | |
| void | frameChanged (int frameNumber) |
Public Member Functions | |
| AnimatedPixmap () | |
| AnimatedPixmap (const QString &fileName) | |
| void | start () |
| void | stop () |
| int | frameCount () const |
| QPixmap | currentFrame () const |
| void | setFrameDelay (int frameDelay) |
| void | setPixmap (const QPixmap &pixmap) |
Private Slots | |
| void | frameTimeout () |
Private Attributes | |
| QPixmap | _pixmap |
| int | _frameNumber |
| QTimer | _frameTimer |
Definition at line 38 of file animatedpixmap.h.
| AnimatedPixmap::AnimatedPixmap | ( | ) |
Default constructor.
Definition at line 34 of file animatedpixmap.cpp.
References _frameTimer, and frameTimeout().
| AnimatedPixmap::AnimatedPixmap | ( | const QString & | fileName | ) |
Creates an animated pixmap from the specified file.
Definition at line 42 of file animatedpixmap.cpp.
References _frameTimer, frameTimeout(), and setPixmap().
| void AnimatedPixmap::start | ( | ) |
Starts the animation.
Definition at line 51 of file animatedpixmap.cpp.
References _frameNumber, and _frameTimer.
Referenced by VClickLabel::setAnimation().
| void AnimatedPixmap::stop | ( | ) |
Stops the animated image.
Definition at line 59 of file animatedpixmap.cpp.
References _frameTimer.
Referenced by VClickLabel::setPixmap().
| int AnimatedPixmap::frameCount | ( | ) | const |
Returns the number of frames in the animation.
Definition at line 81 of file animatedpixmap.cpp.
References _pixmap.
Referenced by frameTimeout().
| QPixmap AnimatedPixmap::currentFrame | ( | ) | const |
Returns the current animation frame.
Definition at line 96 of file animatedpixmap.cpp.
References _frameNumber, and _pixmap.
Referenced by VClickLabel::animationFrameChanged().
| void AnimatedPixmap::setFrameDelay | ( | int | frameDelay | ) |
Sets the duration of each animation frame to frameDelay.
Definition at line 66 of file animatedpixmap.cpp.
References _frameTimer.
| void AnimatedPixmap::setPixmap | ( | const QPixmap & | pixmap | ) |
Sets the source image for the animation to pixmap.
Definition at line 73 of file animatedpixmap.cpp.
References _frameNumber, and _pixmap.
Referenced by AnimatedPixmap(), and VClickLabel::setAnimation().
| void AnimatedPixmap::frameChanged | ( | int | frameNumber | ) | [signal] |
Emitted when the current frame has changed. frameNumber contains the current frame number.
Referenced by frameTimeout().
| void AnimatedPixmap::frameTimeout | ( | ) | [private, slot] |
Called when the current animation frame should be changed.
Definition at line 88 of file animatedpixmap.cpp.
References _frameNumber, frameChanged(), and frameCount().
Referenced by AnimatedPixmap().
QPixmap AnimatedPixmap::_pixmap [private] |
Source image for the animation frames.
Definition at line 71 of file animatedpixmap.h.
Referenced by currentFrame(), frameCount(), and setPixmap().
int AnimatedPixmap::_frameNumber [private] |
Current animation frame number.
Definition at line 72 of file animatedpixmap.h.
Referenced by currentFrame(), frameTimeout(), setPixmap(), and start().
QTimer AnimatedPixmap::_frameTimer [private] |
Timer to control the delay between frames.
Definition at line 73 of file animatedpixmap.h.
Referenced by AnimatedPixmap(), setFrameDelay(), start(), and stop().
1.5.3