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 BOXWHISKERSANIMATION_P_H
14#define BOXWHISKERSANIMATION_P_H
15
16#include <private/chartanimation_p.h>
17#include <private/boxwhiskers_p.h>
18#include <private/boxwhiskersdata_p.h>
19#include <QtCharts/private/qchartglobal_p.h>
20
21QT_BEGIN_NAMESPACE
22
23class BoxPlotChartItem;
24class BoxPlotAnimation;
25
26class Q_CHARTS_PRIVATE_EXPORT BoxWhiskersAnimation : public ChartAnimation
27{
28 Q_OBJECT
29
30public:
31 BoxWhiskersAnimation(BoxWhiskers *box, BoxPlotAnimation *boxPlotAnimation, int duration,
32 QEasingCurve &curve);
33 ~BoxWhiskersAnimation();
34
35public: // from QVariantAnimation
36 QVariant interpolated(const QVariant &from, const QVariant &to, qreal progress) const override;
37 void updateCurrentValue(const QVariant &value) override;
38
39 void setup(const BoxWhiskersData &startData, const BoxWhiskersData &endData);
40 void setEndData(const BoxWhiskersData &endData);
41 void setStartData(const BoxWhiskersData &endData);
42
43 void moveMedianLine(bool move);
44
45protected:
46 friend class BoxPlotAnimation;
47 BoxWhiskers *m_box;
48 bool m_changeAnimation;
49 BoxPlotAnimation *m_boxPlotAnimation;
50};
51
52QT_END_NAMESPACE
53
54#endif // BOXWHISKERSANIMATION_P_H
55

source code of qtcharts/src/charts/animations/boxwhiskersanimation_p.h