| 1 | // Copyright (C) 2016 The Qt Company Ltd. |
|---|---|
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 | |
| 4 | #include <private/chartanimation_p.h> |
| 5 | |
| 6 | QT_BEGIN_NAMESPACE |
| 7 | |
| 8 | ChartAnimation::ChartAnimation(QObject *parent) : |
| 9 | QVariantAnimation(parent), |
| 10 | m_destructing(false) |
| 11 | { |
| 12 | } |
| 13 | |
| 14 | void ChartAnimation::stopAndDestroyLater() |
| 15 | { |
| 16 | m_destructing = true; |
| 17 | stop(); |
| 18 | deleteLater(); |
| 19 | } |
| 20 | |
| 21 | void ChartAnimation::startChartAnimation() |
| 22 | { |
| 23 | if (!m_destructing) |
| 24 | start(); |
| 25 | } |
| 26 | |
| 27 | QT_END_NAMESPACE |
| 28 | |
| 29 | |
| 30 |
