00001 #ifndef INTRO_SPRITE_H
00002 #define INTRO_SPRITE_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include <QPointF>
00025 #include <QSizeF>
00026 #include <QGraphicsPixmapItem>
00027
00028
00029 #include "thememanager.h"
00030 #include "pixmapsprite.h"
00031
00032
00035 class IntroSprite : public PixmapSprite
00036 {
00037
00038 public:
00046 IntroSprite(QString id, ThemeManager* theme, int advancePeriod, int no, QGraphicsScene* scence);
00047
00050 ~IntroSprite();
00051
00063 void startIntro(QPointF start, QPointF end, double radius, double duration, double delay);
00064
00070 void startLinear(QPointF start, QPointF end, double duration);
00071
00076 void startLinear(QPointF end, double duration);
00077
00078
00079 enum MovementState {Idle, IntroDelay, IntroLinear1, IntroCircle, IntroLinear2, LinearMove};
00080
00084 virtual void advance(int phase);
00085
00089 virtual int type() const {return QGraphicsItem::UserType+1;}
00090
00094 int number() {return mNo;}
00095
00099 virtual void changeTheme();
00100
00101 private:
00102
00103
00104 double mDuration;
00105
00106 double mTime;
00107
00108 double mDelay;
00109
00110
00111 QPointF mStart;
00112
00113 QPointF mEnd;
00114
00115 double mRadius;
00116
00117
00118 MovementState mAnimationState;
00119
00120 };
00121
00122 #endif