From 4232f8450d896068713d988cf5541835c3818682 Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 5 Apr 2011 01:29:33 +0200 Subject: - we love ogg, we hate mp3/wav - a lot of coding style/intent fix - add constant.h to pro files --- pacman-c++/animationmanager.cpp | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'pacman-c++/animationmanager.cpp') diff --git a/pacman-c++/animationmanager.cpp b/pacman-c++/animationmanager.cpp index 69bec53..f4ddef7 100644 --- a/pacman-c++/animationmanager.cpp +++ b/pacman-c++/animationmanager.cpp @@ -11,46 +11,46 @@ AnimationManager::AnimationManager() AnimationManager *AnimationManager::self() { - if (!instance) - instance = new AnimationManager; - return instance; + if (!instance) + instance = new AnimationManager; + return instance; } void AnimationManager::registerAnimation(QAbstractAnimation *anim) { - QObject::connect(anim, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterAnimation_helper(QObject*))); - animations.append(anim); + QObject::connect(anim, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterAnimation_helper(QObject*))); + animations.append(anim); } void AnimationManager::unregisterAnimation_helper(QObject *obj) { - unregisterAnimation(static_cast(obj)); + unregisterAnimation(static_cast(obj)); } void AnimationManager::unregisterAnimation(QAbstractAnimation *anim) { - QObject::disconnect(anim, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterAnimation_helper(QObject*))); - animations.removeAll(anim); + QObject::disconnect(anim, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterAnimation_helper(QObject*))); + animations.removeAll(anim); } void AnimationManager::unregisterAllAnimations() { - animations.clear(); + animations.clear(); } void AnimationManager::pauseAll() { - foreach (QAbstractAnimation* animation, animations) - { - if (animation->state() == QAbstractAnimation::Running) - animation->pause(); - } + foreach (QAbstractAnimation* animation, animations) + { + if (animation->state() == QAbstractAnimation::Running) + animation->pause(); + } } void AnimationManager::resumeAll() { - foreach (QAbstractAnimation* animation, animations) - { - if (animation->state() == QAbstractAnimation::Paused) - animation->resume(); - } + foreach (QAbstractAnimation* animation, animations) + { + if (animation->state() == QAbstractAnimation::Paused) + animation->resume(); + } } -- cgit v1.2.3