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
20QT_BEGIN_NAMESPACE
21
22class QXYSeriesAnimation : public QGraphAnimation
23{
24 Q_OBJECT
25public:
26 explicit QXYSeriesAnimation(QObject *parent = nullptr);
27 ~QXYSeriesAnimation() override;
28
29 void updateCurrent(QGraphTransition::TransitionType tt, int index, QPointF point);
30
31protected:
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
39public:
40 void setAnimatingValue(const QVariant &start, const QVariant &end) override = 0;
41 void animate() override = 0;
42 void end() override = 0;
43
44public Q_SLOTS:
45 void valueUpdated(const QVariant &value) override = 0;
46};
47
48QT_END_NAMESPACE
49
50#endif // QXYSERIESANIMATION_H
51

Provided by KDAB

Privacy Policy
Learn Advanced QML with KDAB
Find out more

source code of qtgraphs/src/graphs2d/animation/qxyseriesanimation_p.h