File indexing completed on 2024-04-14 04:01:48

0001 /* This file is part of KsirK.
0002    Copyright (C) 2007 Gael de Chalendar <kleag@free.fr>
0003 
0004    KsirK is free software; you can redistribute it and/or
0005    modify it under the terms of the GNU General Public
0006    License as published by the Free Software Foundation, either version 2
0007    of the License, or (at your option) any later version.
0008 
0009    This program is distributed in the hope that it will be useful,
0010    but WITHOUT ANY WARRANTY; without even the implied warranty of
0011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0012    General Public License for more details.
0013 
0014    You should have received a copy of the GNU General Public License
0015    along with this program; if not, write to the Free Software
0016    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
0017    02110-1301, USA
0018 */
0019 
0020 /*  begin                : Thu Feb 22 2007  */
0021 
0022 #ifndef ANIMSPRITESGROUP_H
0023 #define ANIMSPRITESGROUP_H
0024 
0025 #include "animsprite.h"
0026 #include "animspriteslist.h"
0027 
0028 #include <QObject>
0029 
0030 namespace Ksirk
0031 {
0032 
0033 class AnimSpritesGroup : public QObject, public AnimSpritesList<AnimSprite>
0034 {
0035   Q_OBJECT
0036 public:
0037   AnimSpritesGroup(QObject* target, const char* slot, QObject* parent = nullptr);
0038 
0039   ~AnimSpritesGroup() override;
0040 
0041   void addSprite(AnimSprite* sprite);
0042 
0043   void changeTarget(QObject* target, const char* slot);
0044 
0045   void clear();
0046 
0047 public slots:
0048   void oneArrived(AnimSprite* sprite);
0049 
0050 signals:
0051   void arrived(AnimSpritesGroup*);
0052 
0053 private:
0054   unsigned int m_numberArrived;
0055   QObject* m_target;
0056   const char* m_slot;
0057 };
0058 
0059 
0060 } // closing namespace Ksirk
0061 
0062 #endif // ANIMSPRITESGROUP_H
0063