1// Copyright (C) 2024 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#include "qgraphanimation_p.h"
5#include <private/qgraphanimation_p.h>
6
7QGraphAnimation::QGraphAnimation(QObject *parent)
8 : QVariantAnimation(parent)
9{
10 connect(sender: this, signal: &QVariantAnimation::valueChanged, context: this, slot: &QGraphAnimation::valueUpdated);
11 connect(sender: this, signal: &QVariantAnimation::finished, context: this, slot: &QGraphAnimation::end);
12}
13
14QGraphAnimation::~QGraphAnimation()
15{
16 stop();
17}
18
19QGraphAnimation::AnimationState QGraphAnimation::animating() const
20{
21 return m_animating;
22}
23
24void QGraphAnimation::setAnimating(AnimationState newAnimating)
25{
26 if (m_animating == newAnimating)
27 return;
28 m_animating = newAnimating;
29 emit animatingChanged();
30}
31

Provided by KDAB

Privacy Policy
Learn to use CMake with our Intro Training
Find out more

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