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
6QXYSeriesAnimation::QXYSeriesAnimation(QObject *parent)
7 : QGraphAnimation(parent)
8{}
9
10QXYSeriesAnimation::~QXYSeriesAnimation() {}
11
12void 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

Provided by KDAB

Privacy Policy
Learn Advanced QML with KDAB
Find out more

source code of qtgraphs/src/graphs2d/animation/qxyseriesanimation.cpp