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 #include <mythtv/uitypes.h> 00011 #include <mythtv/uilistbtntype.h> 00012 #include <mythtv/dialogbox.h> 00013 00014 typedef struct 00015 { 00016 int id; 00017 QString title; 00018 QString plot; 00019 QString category; 00020 QString filename; 00021 QString coverfile; 00022 int parentalLevel; 00023 unsigned long long size; 00024 } VideoInfo; 00025 00026 class VideoSelector : public MythThemedDialog 00027 { 00028 00029 Q_OBJECT 00030 00031 public: 00032 VideoSelector(MythMainWindow *parent, QString window_name, 00033 QString theme_filename, const char *name = 0); 00034 00035 ~VideoSelector(void); 00036 00037 void keyPressEvent(QKeyEvent *e); 00038 00039 public slots: 00040 void OKPressed(void); 00041 void cancelPressed(void); 00042 00043 void showMenu(void); 00044 void closePopupMenu(void); 00045 void selectAll(void); 00046 void clearAll(void); 00047 00048 void setCategory(int); 00049 void titleChanged(UIListBtnTypeItem *item); 00050 00051 private: 00052 void updateVideoList(void); 00053 void updateSelectedList(void); 00054 void toggleSelectedState(void); 00055 void getVideoList(void); 00056 void wireUpTheme(void); 00057 vector<VideoInfo *> *getVideoListFromDB(void); 00058 bool checkParentPassword(void); 00059 void setParentalLevel(int which_level); 00060 00061 vector<VideoInfo *> *videoList; 00062 QPtrList<VideoInfo> selectedList; 00063 00064 int currentParentalLevel; 00065 UITextType *pl_text; 00066 00067 UIListBtnType *video_list; 00068 UITextType *warning_text; 00069 00070 UITextButtonType *ok_button; 00071 UITextButtonType *cancel_button; 00072 00073 UISelectorType *category_selector; 00074 UITextType *title_text; 00075 UITextType *filesize_text; 00076 UITextType *plot_text; 00077 UIImageType *cover_image; 00078 00079 MythPopupBox *popupMenu; 00080 }; 00081 00082 #endif 00083 00084
1.5.5