Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

runanimationhandler.h

00001 /***************************************************************************
00002  *   Copyright (C) 2005 by Bjoern Erik Nilsen & Fredrik Berg Kjoelstad     *
00003  *   bjoern_erik_nilsen@hotmail.com & fredrikbk@hotmail.com                *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
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

Generated on Thu May 19 01:51:20 2005 for stopmotion.kdevelop by  doxygen 1.4.2