00001 /* 00002 videoselector.h 00003 00004 header for the video selector interface screen 00005 */ 00006 00007 #ifndef VIDEOSELECTOR_H_ 00008 #define VIDEOSELECTOR_H_ 00009 00010 // c++ 00011 #include <vector> 00012 00013 // mythtv 00014 #include <mythscreentype.h> 00015 #include <metadata/parentalcontrols.h> 00016 00017 // mytharchive 00018 #include "archiveutil.h" 00019 00020 class ProgramInfo; 00021 class MythUIText; 00022 class MythUIButton; 00023 class MythUIButtonList; 00024 class MythUIButtonListItem; 00025 00026 typedef struct 00027 { 00028 int id; 00029 QString title; 00030 QString plot; 00031 QString category; 00032 QString filename; 00033 QString coverfile; 00034 int parentalLevel; 00035 uint64_t size; 00036 } VideoInfo; 00037 00038 class VideoSelector : public MythScreenType 00039 { 00040 Q_OBJECT 00041 00042 public: 00043 VideoSelector(MythScreenStack *parent, QList<ArchiveItem *> *archiveList); 00044 00045 ~VideoSelector(void); 00046 00047 bool Create(); 00048 bool keyPressEvent(QKeyEvent *e); 00049 00050 signals: 00051 void haveResult(bool ok); 00052 00053 public slots: 00054 void OKPressed(void); 00055 void cancelPressed(void); 00056 00057 void showMenu(void); 00058 void selectAll(void); 00059 void clearAll(void); 00060 00061 void setCategory(MythUIButtonListItem *item); 00062 void titleChanged(MythUIButtonListItem *item); 00063 void toggleSelected(MythUIButtonListItem *item); 00064 00065 void parentalLevelChanged(bool passwordValid, ParentalLevel::Level newLevel); 00066 00067 private: 00068 void updateVideoList(void); 00069 void updateSelectedList(void); 00070 void getVideoList(void); 00071 void wireUpTheme(void); 00072 std::vector<VideoInfo *> *getVideoListFromDB(void); 00073 void setParentalLevel(ParentalLevel::Level level); 00074 00075 ParentalLevelChangeChecker *m_parentalLevelChecker; 00076 00077 QList<ArchiveItem *> *m_archiveList; 00078 std::vector<VideoInfo *> *m_videoList; 00079 QList<VideoInfo *> m_selectedList; 00080 00081 ParentalLevel::Level m_currentParentalLevel; 00082 00083 MythUIText *m_plText; 00084 MythUIButtonList *m_videoButtonList; 00085 MythUIText *m_warningText; 00086 MythUIButton *m_okButton; 00087 MythUIButton *m_cancelButton; 00088 MythUIButtonList *m_categorySelector; 00089 MythUIText *m_titleText; 00090 MythUIText *m_filesizeText; 00091 MythUIText *m_plotText; 00092 MythUIImage *m_coverImage; 00093 }; 00094 00095 Q_DECLARE_METATYPE(VideoInfo*) 00096 00097 #endif 00098 00099
1.6.3