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 CANDLESTICKBODYWICKSANIMATION_P_H |
14 | #define CANDLESTICKBODYWICKSANIMATION_P_H |
15 | |
16 | #include <private/candlestickdata_p.h> |
17 | #include <private/chartanimation_p.h> |
18 | #include <QtCharts/private/qchartglobal_p.h> |
19 | |
20 | QT_BEGIN_NAMESPACE |
21 | |
22 | class Candlestick; |
23 | class CandlestickAnimation; |
24 | |
25 | class Q_CHARTS_PRIVATE_EXPORT CandlestickBodyWicksAnimation : public ChartAnimation |
26 | { |
27 | Q_OBJECT |
28 | |
29 | public: |
30 | CandlestickBodyWicksAnimation(Candlestick *candlestick, CandlestickAnimation *animation, |
31 | int duration, QEasingCurve &curve); |
32 | ~CandlestickBodyWicksAnimation(); |
33 | |
34 | void setup(const CandlestickData &startData, const CandlestickData &endData); |
35 | void setStartData(const CandlestickData &startData); |
36 | void setEndData(const CandlestickData &endData); |
37 | |
38 | // from QVariantAnimation |
39 | void updateCurrentValue(const QVariant &value) override; |
40 | QVariant interpolated(const QVariant &from, const QVariant &to, qreal progress) const override; |
41 | |
42 | protected: |
43 | Candlestick *m_candlestick; |
44 | CandlestickAnimation *m_candlestickAnimation; |
45 | bool m_changeAnimation; |
46 | |
47 | friend class CandlestickAnimation; |
48 | }; |
49 | |
50 | QT_END_NAMESPACE |
51 | |
52 | #endif // CANDLESTICKBODYWICKSANIMATION_P_H |
53 |