~ubuntu-branches/ubuntu/hardy/libterralib/hardy

« back to all changes in this revision

Viewing changes to src/terralib/application/qt/TeQtAnimaThread.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T Chen
  • Date: 2005-11-25 22:32:59 UTC
  • Revision ID: james.westby@ubuntu.com-20051125223259-3zubal8ux4ki4fjg
Tags: upstream-3.0.3b2
ImportĀ upstreamĀ versionĀ 3.0.3b2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef  __TERRALIB_INTERNAL_QTANIMATHREAD_H
 
2
#define  __TERRALIB_INTERNAL_QTANIMATHREAD_H
 
3
#include <qthread.h>
 
4
#include<qdir.h>
 
5
#include<qstringlist.h>
 
6
class TeQtCanvas;
 
7
class Animation;
 
8
 
 
9
class TeQtAnimaThread : public QThread
 
10
{
 
11
public:
 
12
        TeQtAnimaThread(){
 
13
                canvas_ = 0;
 
14
                pause_ = false;
 
15
                stop_ = true;
 
16
                rate_ = 1;
 
17
                frame_ = 0;
 
18
                frames_ = 0;
 
19
                pauseFrame_ = 0;
 
20
        }
 
21
 
 
22
        void run();
 
23
        void stop();
 
24
        void pause(bool b) {pause_ = b;}
 
25
        bool pause() {return pause_;}
 
26
        void frame(int n) {frame_ = n;}
 
27
        int frame() {return frame_;}
 
28
        void frames(int n) {frames_ = n;}
 
29
        int frames() {return frames_;}
 
30
        int pauseFrame(int pf) {return pauseFrame_ = pf;}
 
31
        void canvas(TeQtCanvas* c) {canvas_ = c;}
 
32
        void setAnimation(Animation* a, QDir d);
 
33
        void showFrame(int i);
 
34
 
 
35
private:
 
36
        bool            pause_;
 
37
        bool            stop_;
 
38
        int                     rate_;
 
39
        int                     frame_;
 
40
        int                     frames_;
 
41
        int                     pauseFrame_;
 
42
        TeQtCanvas*     canvas_;
 
43
        Animation*      animation_;
 
44
        QDir            dir_;
 
45
        QStringList     fileList_;
 
46
        void sleep(int t);
 
47
};
 
48
#endif