28class Q_GUI_EXPORT
QMovie :
public QObject
31 Q_DECLARE_PRIVATE(QMovie)
32 Q_PROPERTY(
int speed READ speed WRITE setSpeed BINDABLE bindableSpeed)
33 Q_PROPERTY(CacheMode cacheMode READ cacheMode WRITE setCacheMode BINDABLE bindableCacheMode)
47 explicit QMovie(QObject *parent =
nullptr);
48 explicit QMovie(QIODevice *device,
const QByteArray &format = QByteArray(), QObject *parent =
nullptr);
49 explicit QMovie(
const QString &fileName,
const QByteArray &format = QByteArray(), QObject *parent =
nullptr);
52 static QList<QByteArray> supportedFormats();
54 void setDevice(QIODevice *device);
55 QIODevice *device()
const;
57 void setFileName(
const QString &fileName);
58 QString fileName()
const;
60 void setFormat(
const QByteArray &format);
61 QByteArray format()
const;
63 void setBackgroundColor(
const QColor &color);
64 QColor backgroundColor()
const;
66 MovieState state()
const;
68 QRect frameRect()
const;
69 QImage currentImage()
const;
70 QPixmap currentPixmap()
const;
73 QImageReader::ImageReaderError lastError()
const;
74 QString lastErrorString()
const;
76 bool jumpToFrame(
int frameNumber);
77 int loopCount()
const;
78 int frameCount()
const;
79 int nextFrameDelay()
const;
80 int currentFrameNumber()
const;
83 QBindable<
int> bindableSpeed();
86 void setScaledSize(
const QSize &size);
88 CacheMode cacheMode()
const;
89 void setCacheMode(CacheMode mode);
90 QBindable<CacheMode> bindableCacheMode();
94 void resized(
const QSize &size);
95 void updated(
const QRect &rect);
96 void stateChanged(QMovie::MovieState state);
97 void error(QImageReader::ImageReaderError error);
99 void frameChanged(
int frameNumber);
103 bool jumpToNextFrame();
104 void setPaused(
bool paused);
106 void setSpeed(
int percentSpeed);
109 Q_DISABLE_COPY(QMovie)
110 Q_PRIVATE_SLOT(d_func(),
void _q_loadNextFrame())