1 | // Copyright (C) 2024 The Qt Company Ltd. |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
3 | |
4 | #include "qxyseriesanimation_p.h" |
5 | |
6 | QXYSeriesAnimation::QXYSeriesAnimation(QObject *parent) |
7 | : QGraphAnimation(parent) |
8 | {} |
9 | |
10 | QXYSeriesAnimation::~QXYSeriesAnimation() {} |
11 | |
12 | void QXYSeriesAnimation::updateCurrent(QGraphTransition::TransitionType tt, int index, QPointF point) |
13 | { |
14 | m_currentTransitionType = tt; |
15 | m_newPointIndex = index; |
16 | m_newPoint = point; |
17 | |
18 | if (m_previousTransitionType == QGraphTransition::TransitionType::None) |
19 | m_previousTransitionType = m_currentTransitionType; |
20 | |
21 | if (animating() == QGraphAnimation::AnimationState::Stopped) |
22 | m_activePointIndex = index; |
23 | } |
24 |