00001 #ifndef VIDEODIALOG_H_ 00002 #define VIDEODIALOG_H_ 00003 00004 #include <qstring.h> 00005 00006 #include <mythtv/mythdialogs.h> 00007 00008 #include <memory> 00009 00010 class Metadata; 00011 class VideoList; 00012 class ParentalLevel; 00013 00014 class VideoDialog : public MythDialog 00015 { 00016 Q_OBJECT 00017 00018 public: 00019 enum DialogType { DLG_BROWSER = 0x1, DLG_GALLERY = 0x2, DLG_TREE = 0x4, 00020 dtLast }; 00021 00022 static bool IsValidDialogType(int num); 00023 00024 VideoDialog(DialogType ltype, MythMainWindow *lparent, 00025 const QString &lwinName, const QString &lname, 00026 VideoList *video_list); 00027 00028 virtual void playVideo(Metadata *someItem); 00029 00030 GenericTree *getVideoTreeRoot(void); 00031 00032 void setFileBrowser(bool toWhat) { isFileBrowser = toWhat; } 00033 void setFlatList(bool toWhat) { isFlatList = toWhat;} 00034 00035 int videoExitType() { return m_exit_type; } 00036 00037 protected slots: 00038 void slotDoCancel(); 00039 void slotVideoTree(); 00040 void slotVideoGallery(); 00041 void slotVideoBrowser(); 00042 void slotViewPlot(); 00043 void slotViewCast(); 00044 void slotDoFilter(); 00045 void exitWin(); 00046 virtual void slotParentalLevelChanged(); 00047 virtual void slotWatchVideo(); 00048 00049 protected: 00050 virtual ~VideoDialog(); // use deleteLater() instead for thread safety 00051 virtual void updateBackground(void); 00052 virtual void parseContainer(QDomElement&) = 0; 00053 virtual void loadWindow(QDomElement &element); 00054 virtual void fetchVideos(); 00055 virtual void setParentalLevel(const ParentalLevel &which_level); 00056 void shiftParental(int amount); 00057 bool createPopup(); 00058 void cancelPopup(void); 00059 void doMenu(bool info); 00060 QButton *AddPopupViews(); 00061 00062 QPixmap myBackground; 00063 std::auto_ptr<ParentalLevel> currentParentalLevel; 00064 bool isFileBrowser; 00065 bool isFlatList; 00066 Metadata* curitem; 00067 MythPopupBox* popup; 00068 bool expectingPopup; 00069 QRect fullRect; 00070 int m_type; 00071 00072 bool allowPaint; 00073 00074 std::auto_ptr<XMLParse> theme; 00075 QDomElement xmldata; 00076 00077 VideoList *m_video_list; 00078 GenericTree *video_tree_root; 00079 00080 private: 00081 void jumpTo(const QString &location); 00082 void setExitType(int exit_type) { m_exit_type = exit_type; } 00083 00084 private: 00085 int m_exit_type; 00086 }; 00087 00088 #endif
1.5.5