00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef RUNANIMATIONHANDLER_H
00021 #define RUNANIMATIONHANDLER_H
00022
00023 #include "src/config.h"
00024
00025 #include <qobject.h>
00026 #include <qpushbutton.h>
00027 #include <qtimer.h>
00028 #include <qstatusbar.h>
00029
00037 class RunAnimationHandler : public QObject
00038 {
00039 Q_OBJECT
00040 public:
00047 RunAnimationHandler ( QObject *parent = 0, QStatusBar *sb = 0, const char *name = 0 );
00048
00049
00055 void setPlayButton(QPushButton *playButton);
00056
00063 void setRemoveFramesButton(QPushButton *removeFramesButton);
00064
00069 void setLoopButton(QPushButton *loopButton);
00070
00075 void setPauseButton(QPushButton *pauseButton);
00076
00077 public slots:
00078
00084 void toggleRunning();
00085
00089 void runAnimation();
00090
00094 void stopAnimation();
00095
00099 void pauseAnimation();
00100
00104 void selectPreviousFrame();
00105
00109 void selectNextFrame();
00110
00114 void selectPreviousScene();
00115
00119 void selectNextScene();
00120
00125 void setSpeed(int fps);
00126
00131 void toggleLooping();
00132
00133 private:
00134 QStatusBar *statusBar;
00135 QPushButton *playButton;
00136 QPushButton *removeFramesButton;
00137 QPushButton *loopButton;
00138 QPushButton *pauseButton;
00139 QTimer *timer;
00140 unsigned int frameNr;
00141 int fps;
00142 bool isLooping;
00143
00144
00145 private slots:
00149 void playNextFrame();
00150 };
00151
00152 #endif