27class Q_GUI_EXPORT
QMovie :
public QObject
30 Q_DECLARE_PRIVATE(QMovie)
31 Q_PROPERTY(
int speed READ speed WRITE setSpeed BINDABLE bindableSpeed)
32 Q_PROPERTY(CacheMode cacheMode READ cacheMode WRITE setCacheMode BINDABLE bindableCacheMode)
46 explicit QMovie(QObject *parent =
nullptr);
47 explicit QMovie(QIODevice *device,
const QByteArray &format = QByteArray(), QObject *parent =
nullptr);
48 explicit QMovie(
const QString &fileName,
const QByteArray &format = QByteArray(), QObject *parent =
nullptr);
51 static QList<QByteArray> supportedFormats();
53 void setDevice(QIODevice *device);
54 QIODevice *device()
const;
56 void setFileName(
const QString &fileName);
57 QString fileName()
const;
59 void setFormat(
const QByteArray &format);
60 QByteArray format()
const;
62 void setBackgroundColor(
const QColor &color);
63 QColor backgroundColor()
const;
65 MovieState state()
const;
67 QRect frameRect()
const;
68 QImage currentImage()
const;
69 QPixmap currentPixmap()
const;
72 QImageReader::ImageReaderError lastError()
const;
73 QString lastErrorString()
const;
75 bool jumpToFrame(
int frameNumber);
76 int loopCount()
const;
77 int frameCount()
const;
78 int nextFrameDelay()
const;
79 int currentFrameNumber()
const;
82 QBindable<
int> bindableSpeed();
85 void setScaledSize(
const QSize &size);
87 CacheMode cacheMode()
const;
88 void setCacheMode(CacheMode mode);
89 QBindable<CacheMode> bindableCacheMode();
93 void resized(
const QSize &size);
94 void updated(
const QRect &rect);
95 void stateChanged(QMovie::MovieState state);
96 void error(QImageReader::ImageReaderError error);
98 void frameChanged(
int frameNumber);
102 bool jumpToNextFrame();
103 void setPaused(
bool paused);
105 void setSpeed(
int percentSpeed);
108 Q_DISABLE_COPY(QMovie)
109 Q_PRIVATE_SLOT(d_func(),
void _q_loadNextFrame())