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 | |
7 | QGraphAnimation::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 | |
14 | QGraphAnimation::~QGraphAnimation() |
15 | { |
16 | stop(); |
17 | } |
18 | |
19 | QGraphAnimation::AnimationState QGraphAnimation::animating() const |
20 | { |
21 | return m_animating; |
22 | } |
23 | |
24 | void QGraphAnimation::setAnimating(AnimationState newAnimating) |
25 | { |
26 | if (m_animating == newAnimating) |
27 | return; |
28 | m_animating = newAnimating; |
29 | emit animatingChanged(); |
30 | } |
31 |