1// qmovie.sip generated by MetaSIP 2// 3// This file is part of the QtGui Python extension module. 4// 5// Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com> 6// 7// This file is part of PyQt5. 8// 9// This file may be used under the terms of the GNU General Public License 10// version 3.0 as published by the Free Software Foundation and appearing in 11// the file LICENSE included in the packaging of this file. Please review the 12// following information to ensure the GNU General Public License version 3.0 13// requirements will be met: http://www.gnu.org/copyleft/gpl.html. 14// 15// If you do not wish to use this file under the terms of the GPL version 3.0 16// then you may purchase a commercial license. For more information contact 17// info@riverbankcomputing.com. 18// 19// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 20// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 21 22 23class QMovie : QObject 24{ 25%TypeHeaderCode 26#include <qmovie.h> 27%End 28 29public: 30 enum MovieState 31 { 32 NotRunning, 33 Paused, 34 Running, 35 }; 36 37 enum CacheMode 38 { 39 CacheNone, 40 CacheAll, 41 }; 42 43 explicit QMovie(QObject *parent /TransferThis/ = 0); 44 QMovie(QIODevice *device, const QByteArray &format = QByteArray(), QObject *parent /TransferThis/ = 0); 45 QMovie(const QString &fileName, const QByteArray &format = QByteArray(), QObject *parent /TransferThis/ = 0); 46 virtual ~QMovie(); 47 static QList<QByteArray> supportedFormats(); 48 void setDevice(QIODevice *device); 49 QIODevice *device() const; 50 void setFileName(const QString &fileName); 51 QString fileName() const; 52 void setFormat(const QByteArray &format); 53 QByteArray format() const; 54 void setBackgroundColor(const QColor &color); 55 QColor backgroundColor() const; 56 QMovie::MovieState state() const; 57 QRect frameRect() const; 58 QImage currentImage() const; 59 QPixmap currentPixmap() const; 60 bool isValid() const; 61 bool jumpToFrame(int frameNumber); 62 int loopCount() const; 63 int frameCount() const; 64 int nextFrameDelay() const; 65 int currentFrameNumber() const; 66 void setSpeed(int percentSpeed); 67 int speed() const; 68 QSize scaledSize(); 69 void setScaledSize(const QSize &size); 70 QMovie::CacheMode cacheMode() const; 71 void setCacheMode(QMovie::CacheMode mode); 72 73signals: 74 void started(); 75 void resized(const QSize &size); 76 void updated(const QRect &rect); 77 void stateChanged(QMovie::MovieState state); 78 void error(QImageReader::ImageReaderError error); 79 void finished(); 80 void frameChanged(int frameNumber); 81 82public slots: 83 void start(); 84 bool jumpToNextFrame(); 85 void setPaused(bool paused); 86 void stop(); 87 88public: 89%If (Qt_5_10_0 -) 90 QImageReader::ImageReaderError lastError() const; 91%End 92%If (Qt_5_10_0 -) 93 QString lastErrorString() const; 94%End 95}; 96