Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:07:35

0001 // Copyright (C) 2016 The Qt Company Ltd.
0002 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
0003 
0004 #ifndef QSEQUENTIALANIMATIONGROUP_H
0005 #define QSEQUENTIALANIMATIONGROUP_H
0006 
0007 #include <QtCore/qanimationgroup.h>
0008 
0009 QT_REQUIRE_CONFIG(animation);
0010 
0011 QT_BEGIN_NAMESPACE
0012 
0013 class QPauseAnimation;
0014 class QSequentialAnimationGroupPrivate;
0015 
0016 class Q_CORE_EXPORT QSequentialAnimationGroup : public QAnimationGroup
0017 {
0018     Q_OBJECT
0019     Q_PROPERTY(QAbstractAnimation *currentAnimation READ currentAnimation
0020                NOTIFY currentAnimationChanged BINDABLE bindableCurrentAnimation)
0021 
0022 public:
0023     QSequentialAnimationGroup(QObject *parent = nullptr);
0024     ~QSequentialAnimationGroup();
0025 
0026     QPauseAnimation *addPause(int msecs);
0027     QPauseAnimation *insertPause(int index, int msecs);
0028 
0029     QAbstractAnimation *currentAnimation() const;
0030     QBindable<QAbstractAnimation *> bindableCurrentAnimation() const;
0031     int duration() const override;
0032 
0033 Q_SIGNALS:
0034     void currentAnimationChanged(QAbstractAnimation *current);
0035 
0036 protected:
0037     QSequentialAnimationGroup(QSequentialAnimationGroupPrivate &dd, QObject *parent);
0038     bool event(QEvent *event) override;
0039 
0040     void updateCurrentTime(int) override;
0041     void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState) override;
0042     void updateDirection(QAbstractAnimation::Direction direction) override;
0043 
0044 private:
0045     Q_DISABLE_COPY(QSequentialAnimationGroup)
0046     Q_DECLARE_PRIVATE(QSequentialAnimationGroup)
0047     Q_PRIVATE_SLOT(d_func(), void _q_uncontrolledAnimationFinished())
0048 };
0049 
0050 QT_END_NAMESPACE
0051 
0052 #endif //QSEQUENTIALANIMATIONGROUP_H