diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2020-07-15 13:01:09 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2020-07-16 17:39:11 +0200 |
commit | d6502614d0f04695bdb362778ecfc0dbc0b3de21 (patch) | |
tree | 43abc77a769f30778f84e86a5b0516120a7abf9c /src/corelib/tools/qtimeline.h | |
parent | ea2ae140e99bbd21515a99c5480e53129ef843c3 (diff) |
Deprecate QTimeLine's curveShape in favor of its easingCurve
QEasingCurve has a richer variety of curves and curveShape was already
implemented by changing the easingCurve property.
[ChangeLog][QtCore][QTimeLine] Deprecated QTimeLine's curveShape
property in favor of the easingCurve property.
Pick-to: 5.15
Change-Id: I7261c0f24d7e02bc94624f0b74d699df62de1a52
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/corelib/tools/qtimeline.h')
-rw-r--r-- | src/corelib/tools/qtimeline.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/corelib/tools/qtimeline.h b/src/corelib/tools/qtimeline.h index 9a60cd679f..b5f691769b 100644 --- a/src/corelib/tools/qtimeline.h +++ b/src/corelib/tools/qtimeline.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtCore module of the Qt Toolkit. @@ -59,7 +59,9 @@ class Q_CORE_EXPORT QTimeLine : public QObject Q_PROPERTY(int currentTime READ currentTime WRITE setCurrentTime) Q_PROPERTY(Direction direction READ direction WRITE setDirection) Q_PROPERTY(int loopCount READ loopCount WRITE setLoopCount) +#if QT_DEPRECATED_SINCE(5, 15) Q_PROPERTY(CurveShape curveShape READ curveShape WRITE setCurveShape) +#endif Q_PROPERTY(QEasingCurve easingCurve READ easingCurve WRITE setEasingCurve) public: enum State { @@ -71,6 +73,7 @@ public: Forward, Backward }; +#if QT_DEPRECATED_SINCE(5, 15) enum CurveShape { EaseInCurve, EaseOutCurve, @@ -79,6 +82,7 @@ public: SineCurve, CosineCurve }; +#endif explicit QTimeLine(int duration = 1000, QObject *parent = nullptr); virtual ~QTimeLine(); @@ -103,8 +107,12 @@ public: int updateInterval() const; void setUpdateInterval(int interval); +#if QT_DEPRECATED_SINCE(5, 15) + QT_DEPRECATED_X("Access easingCurve directly") CurveShape curveShape() const; + QT_DEPRECATED_X("Access easingCurve directly") void setCurveShape(CurveShape shape); +#endif QEasingCurve easingCurve() const; void setEasingCurve(const QEasingCurve &curve); |