00001 #ifndef MYTHUI_IMAGE_H_
00002 #define MYTHUI_IMAGE_H_
00003
00004 #include <qstring.h>
00005 #include <qdatetime.h>
00006 #include <qvaluevector.h>
00007
00008 #include "mythuitype.h"
00009 #include "mythimage.h"
00010
00011 class MythScreenType;
00012
00013 class MythUIImage : public MythUIType
00014 {
00015 public:
00016 MythUIImage(const QString &filepattern, int low, int high, int delayms,
00017 MythUIType *parent, const char *name);
00018 MythUIImage(const QString &filename, MythUIType *parent, const char *name);
00019 MythUIImage(MythUIType *parent, const char *name);
00020 ~MythUIImage();
00021
00022
00023 void SetFilename(const QString &filename);
00024 void SetFilepattern(const QString &filepattern, int low, int high);
00025
00026 void SetDelay(int delayms);
00027
00028
00029 void ResetFilename();
00030
00031 void SetImage(MythImage *img);
00032 void SetImages(QValueVector<MythImage *> &images);
00033
00034 void SetSize(int width, int height);
00035 void SetSkip(int x, int y);
00036
00037 void Reset(void);
00038 void Load(void);
00039
00040 virtual void Pulse(void);
00041
00042 protected:
00043 virtual void DrawSelf(MythPainter *p, int xoffset, int yoffset,
00044 int alphaMod, QRect clipRect);
00045
00046 void Init(void);
00047 void Clear(void);
00048
00049 virtual bool ParseElement(QDomElement &element);
00050 virtual void CopyFrom(MythUIType *base);
00051 virtual void CreateCopy(MythUIType *parent);
00052 virtual void Finalize(void);
00053
00054 QString m_Filename;
00055 QString m_OrigFilename;
00056
00057 QValueVector<MythImage *> m_Images;
00058
00059 QPoint m_Skip;
00060 QSize m_ForceSize;
00061
00062 int m_Delay;
00063 int m_LowNum;
00064 int m_HighNum;
00065
00066 unsigned int m_CurPos;
00067 QTime m_LastDisplay;
00068
00069 bool m_NeedLoad;
00070 };
00071
00072 #endif