qabstractanimation.sip 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. // qabstractanimation.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 QAbstractAnimation : public QObject
  22. {
  23. %TypeHeaderCode
  24. #include <qabstractanimation.h>
  25. %End
  26. public:
  27. enum Direction
  28. {
  29. Forward,
  30. Backward,
  31. };
  32. enum State
  33. {
  34. Stopped,
  35. Paused,
  36. Running,
  37. };
  38. enum DeletionPolicy
  39. {
  40. KeepWhenStopped,
  41. DeleteWhenStopped,
  42. };
  43. QAbstractAnimation(QObject *parent /TransferThis/ = 0);
  44. virtual ~QAbstractAnimation();
  45. QAbstractAnimation::State state() const;
  46. QAnimationGroup *group() const;
  47. QAbstractAnimation::Direction direction() const;
  48. void setDirection(QAbstractAnimation::Direction direction);
  49. int currentTime() const;
  50. int currentLoopTime() const;
  51. int loopCount() const;
  52. void setLoopCount(int loopCount);
  53. int currentLoop() const;
  54. virtual int duration() const = 0;
  55. int totalDuration() const;
  56. signals:
  57. void finished();
  58. void stateChanged(QAbstractAnimation::State newState, QAbstractAnimation::State oldState);
  59. void currentLoopChanged(int currentLoop);
  60. void directionChanged(QAbstractAnimation::Direction);
  61. public slots:
  62. void start(QAbstractAnimation::DeletionPolicy policy = QAbstractAnimation::KeepWhenStopped);
  63. void pause();
  64. void resume();
  65. void setPaused(bool);
  66. void stop();
  67. void setCurrentTime(int msecs);
  68. protected:
  69. virtual bool event(QEvent *event);
  70. virtual void updateCurrentTime(int currentTime) = 0;
  71. virtual void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState);
  72. virtual void updateDirection(QAbstractAnimation::Direction direction);
  73. };