qmovie.sip 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. // qmovie.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtGui Python extension module.
  4. //
  5. // Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
  6. //
  7. // This file is part of PyQt6.
  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. class QMovie : public QObject
  22. {
  23. %TypeHeaderCode
  24. #include <qmovie.h>
  25. %End
  26. public:
  27. enum MovieState
  28. {
  29. NotRunning,
  30. Paused,
  31. Running,
  32. };
  33. enum CacheMode
  34. {
  35. CacheNone,
  36. CacheAll,
  37. };
  38. explicit QMovie(QObject *parent /TransferThis/ = 0);
  39. QMovie(QIODevice *device, const QByteArray &format = QByteArray(), QObject *parent /TransferThis/ = 0);
  40. QMovie(const QString &fileName, const QByteArray &format = QByteArray(), QObject *parent /TransferThis/ = 0);
  41. virtual ~QMovie();
  42. static QList<QByteArray> supportedFormats();
  43. void setDevice(QIODevice *device);
  44. QIODevice *device() const;
  45. void setFileName(const QString &fileName);
  46. QString fileName() const;
  47. void setFormat(const QByteArray &format);
  48. QByteArray format() const;
  49. void setBackgroundColor(const QColor &color);
  50. QColor backgroundColor() const;
  51. QMovie::MovieState state() const;
  52. QRect frameRect() const;
  53. QImage currentImage() const;
  54. QPixmap currentPixmap() const;
  55. bool isValid() const;
  56. bool jumpToFrame(int frameNumber);
  57. int loopCount() const;
  58. int frameCount() const;
  59. int nextFrameDelay() const;
  60. int currentFrameNumber() const;
  61. void setSpeed(int percentSpeed);
  62. int speed() const;
  63. QSize scaledSize();
  64. void setScaledSize(const QSize &size);
  65. QMovie::CacheMode cacheMode() const;
  66. void setCacheMode(QMovie::CacheMode mode);
  67. signals:
  68. void started();
  69. void resized(const QSize &size);
  70. void updated(const QRect &rect);
  71. void stateChanged(QMovie::MovieState state);
  72. void error(QImageReader::ImageReaderError error);
  73. void finished();
  74. void frameChanged(int frameNumber);
  75. public slots:
  76. void start();
  77. bool jumpToNextFrame();
  78. void setPaused(bool paused);
  79. void stop();
  80. public:
  81. QImageReader::ImageReaderError lastError() const;
  82. QString lastErrorString() const;
  83. };