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 BOXPLOTANIMATION_P_H |
14 | #define BOXPLOTANIMATION_P_H |
15 | |
16 | #include <private/chartanimation_p.h> |
17 | #include <private/boxwhiskers_p.h> |
18 | #include <private/boxwhiskersdata_p.h> |
19 | #include <private/boxwhiskersanimation_p.h> |
20 | #include <QtCharts/private/qchartglobal_p.h> |
21 | #include <QtCore/qhash.h> |
22 | |
23 | QT_BEGIN_NAMESPACE |
24 | |
25 | class BoxPlotChartItem; |
26 | |
27 | class Q_CHARTS_PRIVATE_EXPORT BoxPlotAnimation : public QObject |
28 | { |
29 | Q_OBJECT |
30 | public: |
31 | BoxPlotAnimation(BoxPlotChartItem *item, int duration, QEasingCurve &curve); |
32 | ~BoxPlotAnimation(); |
33 | |
34 | void addBox(BoxWhiskers *box); |
35 | ChartAnimation *boxAnimation(BoxWhiskers *box); |
36 | ChartAnimation *boxChangeAnimation(BoxWhiskers *box); |
37 | |
38 | void setAnimationStart(BoxWhiskers *box); |
39 | void stopAll(); |
40 | void removeBoxAnimation(BoxWhiskers *box); |
41 | |
42 | protected: |
43 | BoxPlotChartItem *m_item; |
44 | QHash<BoxWhiskers *, BoxWhiskersAnimation *> m_animations; |
45 | int m_animationDuration; |
46 | QEasingCurve m_animationCurve; |
47 | }; |
48 | |
49 | QT_END_NAMESPACE |
50 | |
51 | #endif // BOXPLOTANIMATION_P_H |
52 | |