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 PIESLICEANIMATION_P_H |
14 | #define PIESLICEANIMATION_P_H |
15 | |
16 | #include <private/chartanimation_p.h> |
17 | #include <private/piesliceitem_p.h> |
18 | #include <QtCharts/private/qchartglobal_p.h> |
19 | |
20 | QT_BEGIN_NAMESPACE |
21 | |
22 | class PieChartItem; |
23 | |
24 | class Q_CHARTS_PRIVATE_EXPORT PieSliceAnimation : public ChartAnimation |
25 | { |
26 | public: |
27 | PieSliceAnimation(PieSliceItem *sliceItem); |
28 | ~PieSliceAnimation(); |
29 | void setValue(const PieSliceData &startValue, const PieSliceData &endValue); |
30 | void updateValue(const PieSliceData &endValue); |
31 | PieSliceData currentSliceValue(); |
32 | |
33 | protected: |
34 | QVariant interpolated(const QVariant &start, const QVariant &end, qreal progress) const override; |
35 | void updateCurrentValue(const QVariant &value) override; |
36 | |
37 | private: |
38 | PieSliceItem *m_sliceItem; |
39 | PieSliceData m_currentValue; |
40 | }; |
41 | |
42 | QT_END_NAMESPACE |
43 | |
44 | #endif |
45 | |