2 Copyright (c) 2006 Paolo Capriotti <p.capriotti@gmail.com>
3 (c) 2006 Maurizio Monge <maurizio.monge@kdemail.net>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
11 #ifndef MAINANIMATION_H
12 #define MAINANIMATION_H
17 #include "animation.h"
18 #include <boost/shared_ptr.hpp>
21 * @a MainAnimation is a persistent animation used to activate
22 * all chessboard animations.
24 class MainAnimation
: public QObject
, protected AnimationGroup
{
32 MainAnimation(double speed
= 1.0);
35 * Activate the animation @a a.
37 void addAnimation(const boost::shared_ptr
<Animation
>& a
);
40 * Stop all animations.
45 * Sets the overall speed factor (default is 1.0).
46 * This function is implemented to avoid time gaps.
48 void setSpeed(double speed
);
51 * Sets the frame delay.
53 void setDelay(int delay
);
56 * Return a global MasterAnimation, i.e. not tied to a particular board.
58 static MainAnimation
& global();
63 #endif // MAINANIMATION_H