00001 #ifndef MINIPLAYER_H_
00002 #define MINIPLAYER_H_
00003
00004 #include <qstring.h>
00005
00006 #include "mythtv/mythdialogs.h"
00007
00008 class MusicPlayer;
00009 class QTimer;
00010 class Metadata;
00011
00012 class MPUBLIC MiniPlayer : public MythThemedDialog
00013 {
00014 Q_OBJECT
00015
00016 public:
00017 MiniPlayer(MythMainWindow *parent,
00018 MusicPlayer *parentPlayer,
00019 const char *name = 0,
00020 bool setsize = true);
00021 ~MiniPlayer();
00022
00023 public slots:
00024 virtual void show();
00025 virtual void hide();
00026 void timerTimeout(void);
00027 void showPlayer(int showTime);
00028 void showInfoTimeout(void);
00029
00030 protected:
00031 virtual void keyPressEvent(QKeyEvent *e);
00032 virtual void customEvent(QCustomEvent *event);
00033
00034 private:
00035 void wireupTheme(void);
00036 QString getTimeString(int exTime, int maxTime);
00037 void updateTrackInfo(Metadata *mdata);
00038 void seekforward(void);
00039 void seekback(void);
00040 void seek(int pos);
00041 void increaseRating(void);
00042 void decreaseRating(void);
00043 void showShuffleMode(void);
00044 void showRepeatMode(void);
00045 void showVolume(void);
00046 void showSpeed(void);
00047 void showAutoMode(void);
00048
00049 int m_currTime, m_maxTime;
00050
00051 MusicPlayer *m_parentPlayer;
00052
00053 QTimer *m_displayTimer;
00054 QTimer *m_infoTimer;
00055 int m_showTime;
00056
00057 bool m_showingInfo;
00058
00059 UITextType *m_titleText;
00060 UITextType *m_artistText;
00061 UITextType *m_albumText;
00062 UITextType *m_timeText;
00063 UITextType *m_infoText;
00064 UITextType *m_volText;
00065 UIImageType *m_coverImage;
00066
00067 UIStatusBarType *m_progressBar;
00068 UIRepeatedImageType *m_ratingsImage;
00069
00070 QString m_volFormat;
00071 };
00072
00073 #endif