summaryrefslogtreecommitdiffstats
path: root/pacman-c++/animationmanager.h
blob: 408395ba23737d47e66e559c233105b50a480f54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef ANIMATIONMANAGER_H
#define ANIMATIONMANAGER_H

#include <QtCore/QObject>

QT_BEGIN_NAMESPACE
class QAbstractAnimation;
QT_END_NAMESPACE

class AnimationManager
  : public QObject
{
  Q_OBJECT
public:
  AnimationManager();
  void registerAnimation(QAbstractAnimation *anim);
  void unregisterAnimation(QAbstractAnimation *anim);
  void unregisterAllAnimations();
  static AnimationManager *self();

public slots:
  void pauseAll();
  void resumeAll();

private slots:
  void unregisterAnimation_helper(QObject *obj);

private:
  static AnimationManager *instance;
  QList<QAbstractAnimation *> animations;
};

#endif // ANIMATIONMANAGER_H