qtimeline.sip 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. // qtimeline.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtCore 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 QTimeLine : public QObject
  22. {
  23. %TypeHeaderCode
  24. #include <qtimeline.h>
  25. %End
  26. public:
  27. enum Direction
  28. {
  29. Forward,
  30. Backward,
  31. };
  32. enum State
  33. {
  34. NotRunning,
  35. Paused,
  36. Running,
  37. };
  38. QTimeLine(int duration = 1000, QObject *parent /TransferThis/ = 0);
  39. virtual ~QTimeLine();
  40. QTimeLine::State state() const;
  41. int loopCount() const;
  42. void setLoopCount(int count);
  43. QTimeLine::Direction direction() const;
  44. void setDirection(QTimeLine::Direction direction);
  45. int duration() const;
  46. void setDuration(int duration);
  47. int startFrame() const;
  48. void setStartFrame(int frame);
  49. int endFrame() const;
  50. void setEndFrame(int frame);
  51. void setFrameRange(int startFrame, int endFrame);
  52. int updateInterval() const;
  53. void setUpdateInterval(int interval);
  54. int currentTime() const;
  55. int currentFrame() const;
  56. qreal currentValue() const;
  57. int frameForTime(int msec) const;
  58. virtual qreal valueForTime(int msec) const;
  59. public slots:
  60. void resume();
  61. void setCurrentTime(int msec);
  62. void setPaused(bool paused);
  63. void start();
  64. void stop();
  65. void toggleDirection();
  66. signals:
  67. void finished();
  68. void frameChanged(int);
  69. void stateChanged(QTimeLine::State newState);
  70. void valueChanged(qreal x);
  71. protected:
  72. virtual void timerEvent(QTimerEvent *event);
  73. public:
  74. QEasingCurve easingCurve() const;
  75. void setEasingCurve(const QEasingCurve &curve);
  76. };