1 | // Copyright (C) 2024 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 QtGraphs 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 QXYSERIESANIMATION_H |
14 | #define QXYSERIESANIMATION_H |
15 | |
16 | #include <QtCore/QObject> |
17 | #include <QtCore/QPointF> |
18 | #include "private/qgraphtransition_p.h" |
19 | |
20 | QT_BEGIN_NAMESPACE |
21 | |
22 | class QXYSeriesAnimation : public QGraphAnimation |
23 | { |
24 | Q_OBJECT |
25 | public: |
26 | explicit QXYSeriesAnimation(QObject *parent = nullptr); |
27 | ~QXYSeriesAnimation() override; |
28 | |
29 | void updateCurrent(QGraphTransition::TransitionType tt, int index, QPointF point); |
30 | |
31 | protected: |
32 | QGraphTransition::TransitionType m_currentTransitionType; |
33 | QGraphTransition::TransitionType m_previousTransitionType; |
34 | int m_activePointIndex; |
35 | int m_newPointIndex; |
36 | QPointF m_newPoint; |
37 | |
38 | // QGraphAnimation interface |
39 | public: |
40 | void setAnimatingValue(const QVariant &start, const QVariant &end) override = 0; |
41 | void animate() override = 0; |
42 | void end() override = 0; |
43 | |
44 | public Q_SLOTS: |
45 | void valueUpdated(const QVariant &value) override = 0; |
46 | }; |
47 | |
48 | QT_END_NAMESPACE |
49 | |
50 | #endif // QXYSERIESANIMATION_H |
51 |
Definitions
Learn Advanced QML with KDAB
Find out more