File indexing completed on 2024-04-14 03:59:23

0001 /******************************************************************************
0002 *   KBlocks, a falling blocks game by KDE                                     *
0003 *   SPDX-FileCopyrightText: 2009-2021 Mauricio Piacentini <mauricio@tabuleiro.com>      *
0004 *                           Zhongjie Cai <squall.leonhart.cai@gmail.com>      *
0005 *                           Julian Helfferich <julian.helfferich@mailbox.org> *
0006 *                                                                             *
0007 *   SPDX-License-Identifier: GPL-2.0-or-later
0008 ******************************************************************************/
0009 #ifndef KBLOCKSANIMFADE_H
0010 #define KBLOCKSANIMFADE_H
0011 
0012 #include <QTimeLine>
0013 
0014 class SvgItemInterface;
0015 
0016 class KBlocksAnimFade : public QObject
0017 {
0018     Q_OBJECT
0019 
0020 public:
0021     KBlocksAnimFade(const QList<SvgItemInterface *> &items, int duration, QTimeLine::Direction direction);
0022     ~KBlocksAnimFade() override;
0023 
0024 Q_SIGNALS:
0025     void animationFinished();
0026 
0027 private Q_SLOTS:
0028     void valueChanged(qreal value);
0029     void endAnimation();
0030 
0031 private:
0032     QTimeLine *mpTimeLine;
0033     QList<SvgItemInterface *> mItemList;
0034 };
0035 
0036 #endif