| 1 | // Copyright (C) 2016 The Qt Company Ltd. |
|---|---|
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 | |
| 4 | // W A R N I N G |
| 5 | // ------------- |
| 6 | // |
| 7 | // This file is not part of the Qt Chart API. It exists purely as an |
| 8 | // implementation detail. This header file may change from version to |
| 9 | // version without notice, or even be removed. |
| 10 | // |
| 11 | // We mean it. |
| 12 | |
| 13 | #ifndef CANDLESTICKANIMATION_P_H |
| 14 | #define CANDLESTICKANIMATION_P_H |
| 15 | |
| 16 | #include <private/chartanimation_p.h> |
| 17 | #include <QtCharts/private/qchartglobal_p.h> |
| 18 | #include <QtCore/qobject.h> |
| 19 | #include <QtCore/qhash.h> |
| 20 | |
| 21 | QT_BEGIN_NAMESPACE |
| 22 | |
| 23 | class Candlestick; |
| 24 | class CandlestickChartItem; |
| 25 | class CandlestickBodyWicksAnimation; |
| 26 | |
| 27 | class Q_CHARTS_EXPORT CandlestickAnimation : public QObject |
| 28 | { |
| 29 | Q_OBJECT |
| 30 | |
| 31 | public: |
| 32 | CandlestickAnimation(CandlestickChartItem *item, int duration, QEasingCurve &curve); |
| 33 | ~CandlestickAnimation(); |
| 34 | |
| 35 | void addCandlestick(Candlestick *candlestick); |
| 36 | ChartAnimation *candlestickAnimation(Candlestick *candlestick); |
| 37 | ChartAnimation *candlestickChangeAnimation(Candlestick *candlestick); |
| 38 | |
| 39 | void setAnimationStart(Candlestick *candlestick); |
| 40 | void stopAll(); |
| 41 | void removeCandlestickAnimation(Candlestick *candlestick); |
| 42 | |
| 43 | protected: |
| 44 | QHash<Candlestick *, CandlestickBodyWicksAnimation *> m_animations; |
| 45 | CandlestickChartItem *m_item; |
| 46 | int m_animationDuration; |
| 47 | QEasingCurve m_animationCurve; |
| 48 | }; |
| 49 | |
| 50 | QT_END_NAMESPACE |
| 51 | |
| 52 | #endif // CANDLESTICKANIMATION_P_H |
| 53 |
