File indexing completed on 2025-01-18 10:07:34
0001
0002
0003
0004 #ifndef QPROPERTYANIMATION_H
0005 #define QPROPERTYANIMATION_H
0006
0007 #include <QtCore/qvariantanimation.h>
0008
0009 QT_REQUIRE_CONFIG(animation);
0010
0011 QT_BEGIN_NAMESPACE
0012
0013 class QPropertyAnimationPrivate;
0014 class Q_CORE_EXPORT QPropertyAnimation : public QVariantAnimation
0015 {
0016 Q_OBJECT
0017 Q_PROPERTY(QByteArray propertyName READ propertyName WRITE setPropertyName
0018 BINDABLE bindablePropertyName)
0019 Q_PROPERTY(QObject* targetObject READ targetObject WRITE setTargetObject
0020 BINDABLE bindableTargetObject)
0021
0022 public:
0023 QPropertyAnimation(QObject *parent = nullptr);
0024 QPropertyAnimation(QObject *target, const QByteArray &propertyName, QObject *parent = nullptr);
0025 ~QPropertyAnimation();
0026
0027 QObject *targetObject() const;
0028 void setTargetObject(QObject *target);
0029 QBindable<QObject *> bindableTargetObject();
0030
0031 QByteArray propertyName() const;
0032 void setPropertyName(const QByteArray &propertyName);
0033 QBindable<QByteArray> bindablePropertyName();
0034
0035 protected:
0036 bool event(QEvent *event) override;
0037 void updateCurrentValue(const QVariant &value) override;
0038 void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState) override;
0039
0040 private:
0041 Q_DISABLE_COPY(QPropertyAnimation)
0042 Q_DECLARE_PRIVATE(QPropertyAnimation)
0043 };
0044
0045 QT_END_NAMESPACE
0046
0047 #endif