00001 #ifndef EDITVIDEOMETADATA_H_ 00002 #define EDITVIDEOMETADATA_H_ 00003 00004 #include "mythscreentype.h" 00005 #include "metadatacommon.h" 00006 #include "metadatadownload.h" 00007 #include "metadataimagedownload.h" 00008 00009 class VideoMetadata; 00010 class VideoMetadataListManager; 00011 class MythUIButtonList; 00012 class MythUIButtonListItem; 00013 class MythUIText; 00014 class MythUITextEdit; 00015 class MythUIButton; 00016 class MythUISpinBox; 00017 class MythUICheckBox; 00018 00019 class EditMetadataDialog : public MythScreenType 00020 { 00021 Q_OBJECT 00022 00023 public: 00024 EditMetadataDialog(MythScreenStack *lparent, 00025 QString lname, 00026 VideoMetadata *source_metadata, 00027 const VideoMetadataListManager &cache); 00028 ~EditMetadataDialog(); 00029 00030 bool Create(); 00031 void customEvent(QEvent *levent); 00032 00033 void fillWidgets(); 00034 00035 protected: 00036 void createBusyDialog(QString title); 00037 00038 signals: 00039 void Finished(); 00040 00041 public slots: 00042 void SaveAndExit(); 00043 void SetTitle(); 00044 void SetSubtitle(); 00045 void SetTagline(); 00046 void SetRating(); 00047 void SetDirector(); 00048 void SetInetRef(); 00049 void SetHomepage(); 00050 void SetPlot(); 00051 void SetYear(); 00052 void SetUserRating(); 00053 void SetLength(); 00054 void SetCategory(MythUIButtonListItem*); 00055 void SetPlayer(); 00056 void SetSeason(); 00057 void SetEpisode(); 00058 void SetLevel(MythUIButtonListItem*); 00059 void SetChild(MythUIButtonListItem*); 00060 void ToggleBrowse(); 00061 void ToggleWatched(); 00062 void FindCoverArt(); 00063 void FindBanner(); 00064 void FindFanart(); 00065 void FindScreenshot(); 00066 void FindTrailer(); 00067 void NewCategoryPopup(); 00068 void AddCategory(QString category); 00069 void SetCoverArt(QString file); 00070 void SetBanner(QString file); 00071 void SetFanart(QString file); 00072 void SetScreenshot(QString file); 00073 void SetTrailer(QString file); 00074 void FindNetArt(VideoArtworkType type); 00075 void FindNetCoverArt(); 00076 void FindNetBanner(); 00077 void FindNetFanart(); 00078 void FindNetScreenshot(); 00079 void OnSearchListSelection(ArtworkInfo info, 00080 VideoArtworkType type); 00081 00082 private: 00083 void OnArtworkSearchDone(MetadataLookup *lookup); 00084 void handleDownloadedImages(MetadataLookup *lookup); 00085 00086 VideoMetadata *m_workingMetadata; 00087 VideoMetadata *m_origMetadata; 00088 00089 // 00090 // GUI stuff 00091 // 00092 00093 MythUITextEdit *m_titleEdit; 00094 MythUITextEdit *m_subtitleEdit; 00095 MythUITextEdit *m_taglineEdit; 00096 MythUITextEdit *m_playerEdit; 00097 MythUITextEdit *m_ratingEdit; 00098 MythUITextEdit *m_directorEdit; 00099 MythUITextEdit *m_inetrefEdit; 00100 MythUITextEdit *m_homepageEdit; 00101 MythUITextEdit *m_plotEdit; 00102 00103 MythUISpinBox *m_seasonSpin; 00104 MythUISpinBox *m_episodeSpin; 00105 MythUISpinBox *m_yearSpin; 00106 MythUISpinBox *m_userRatingSpin; 00107 MythUISpinBox *m_lengthSpin; 00108 MythUIButtonList *m_categoryList; 00109 MythUIButtonList *m_levelList; 00110 MythUIButtonList *m_childList; 00111 MythUICheckBox *m_browseCheck; 00112 MythUICheckBox *m_watchedCheck; 00113 MythUIButton *m_coverartButton; 00114 MythUIText *m_coverartText; 00115 MythUIButton *m_screenshotButton; 00116 MythUIText *m_screenshotText; 00117 MythUIButton *m_bannerButton; 00118 MythUIText *m_bannerText; 00119 MythUIButton *m_fanartButton; 00120 MythUIText *m_fanartText; 00121 MythUIButton *m_trailerButton; 00122 MythUIText *m_trailerText; 00123 MythUIButton *m_netCoverartButton; 00124 MythUIButton *m_netFanartButton; 00125 MythUIButton *m_netBannerButton; 00126 MythUIButton *m_netScreenshotButton; 00127 MythUIImage *m_coverart; 00128 MythUIImage *m_screenshot; 00129 MythUIImage *m_banner; 00130 MythUIImage *m_fanart; 00131 MythUIButton *m_doneButton; 00132 00133 // 00134 // Remember video-to-play-next index number when the user is toggling 00135 // child videos on and off 00136 // 00137 00138 int cachedChildSelection; 00139 00140 const VideoMetadataListManager &m_metaCache; 00141 MetadataDownload *m_query; 00142 MetadataImageDownload *m_imageDownload; 00143 00144 MythUIBusyDialog *m_busyPopup; 00145 MythScreenStack *m_popupStack; 00146 }; 00147 00148 #endif
1.6.3