1 /* This file is part of KsirK.
2    Copyright (C) 2007 Gael de Chalendar <kleag@free.fr>
3 
4    KsirK is free software; you can redistribute it and/or
5    modify it under the terms of the GNU General Public
6    License as published by the Free Software Foundation, either version 2
7    of the License, or (at your option) any later version.
8 
9    This program is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12    General Public License for more details.
13 
14    You should have received a copy of the GNU General Public License
15    along with this program; if not, write to the Free Software
16    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17    02110-1301, USA
18 */
19 
20 /*  begin                : Thu Feb 22 2007  */
21 
22 #ifndef ANIMSPRITESGROUP_H
23 #define ANIMSPRITESGROUP_H
24 
25 #include "animsprite.h"
26 #include "animspriteslist.h"
27 
28 #include <QObject>
29 
30 namespace Ksirk
31 {
32 
33 class AnimSpritesGroup : public QObject, public AnimSpritesList<AnimSprite>
34 {
35   Q_OBJECT
36 public:
37   AnimSpritesGroup(QObject* target, const char* slot, QObject* parent = 0);
38 
39   ~AnimSpritesGroup() override;
40 
41   void addSprite(AnimSprite* sprite);
42 
43   void changeTarget(QObject* target, const char* slot);
44 
45   void clear();
46 
47 public slots:
48   void oneArrived(AnimSprite* sprite);
49 
50 signals:
51   void arrived(AnimSpritesGroup*);
52 
53 private:
54   unsigned int m_numberArrived;
55   QObject* m_target;
56   const char* m_slot;
57 };
58 
59 
60 } // closing namespace Ksirk
61 
62 #endif // ANIMSPRITESGROUP_H
63 
64