00001 #ifndef MYTHBURN_H_ 00002 #define MYTHBURN_H_ 00003 00004 // mythtv 00005 #include <mythscreentype.h> 00006 00007 // mytharchive 00008 #include "archiveutil.h" 00009 00010 class MythUIText; 00011 class MythUIButton; 00012 class MythUICheckBox; 00013 class MythUIButtonList; 00014 class MythUIProgressBar; 00015 class MythUIButtonListItem; 00016 00017 class ProfileDialog : public MythScreenType 00018 { 00019 Q_OBJECT 00020 00021 public: 00022 ProfileDialog(MythScreenStack *parent, ArchiveItem *archiveItem, 00023 QList<EncoderProfile *> profileList); 00024 00025 bool Create(); 00026 00027 signals: 00028 void haveResult(int profile); 00029 00030 private slots: 00031 void save(void); 00032 void profileChanged(MythUIButtonListItem *item); 00033 00034 private: 00035 ArchiveItem *m_archiveItem; 00036 QList<EncoderProfile *> m_profileList; 00037 00038 MythUIText *m_captionText; 00039 MythUIText *m_descriptionText; 00040 MythUIText *m_oldSizeText; 00041 MythUIText *m_newSizeText; 00042 00043 MythUIButtonList *m_profile_list; 00044 MythUICheckBox *m_enabledCheck; 00045 MythUIButton *m_okButton; 00046 }; 00047 00048 class MythBurn : public MythScreenType 00049 { 00050 00051 Q_OBJECT 00052 00053 public: 00054 MythBurn(MythScreenStack *parent, 00055 MythScreenType *destinationScreen, MythScreenType *themeScreen, 00056 ArchiveDestination archiveDestination, QString name); 00057 00058 ~MythBurn(void); 00059 00060 bool Create(void); 00061 bool keyPressEvent(QKeyEvent *); 00062 00063 void createConfigFile(const QString &filename); 00064 00065 protected slots: 00066 void handleNextPage(void); 00067 void handlePrevPage(void); 00068 void handleCancel(void); 00069 void handleAddRecording(void); 00070 void handleAddVideo(void); 00071 void handleAddFile(void); 00072 00073 void toggleUseCutlist(void); 00074 void showMenu(void); 00075 void editDetails(void); 00076 void editThumbnails(void); 00077 void changeProfile(void); 00078 void profileChanged(int profileNo); 00079 void removeItem(void); 00080 void selectorClosed(bool ok); 00081 void editorClosed(bool ok, ArchiveItem *item); 00082 void itemClicked(MythUIButtonListItem *item); 00083 00084 private: 00085 void updateArchiveList(void); 00086 void updateSizeBar(); 00087 void loadConfiguration(void); 00088 void saveConfiguration(void); 00089 EncoderProfile *getProfileFromName(const QString &profileName); 00090 QString loadFile(const QString &filename); 00091 bool isArchiveItemValid(const QString &type, const QString &filename); 00092 void loadEncoderProfiles(void); 00093 EncoderProfile *getDefaultProfile(ArchiveItem *item); 00094 void setProfile(EncoderProfile *profile, ArchiveItem *item); 00095 void runScript(); 00096 00097 MythScreenType *m_destinationScreen; 00098 MythScreenType *m_themeScreen; 00099 ArchiveDestination m_archiveDestination; 00100 00101 QList<ArchiveItem *> m_archiveList; 00102 QList<EncoderProfile *> m_profileList; 00103 00104 bool m_bCreateISO; 00105 bool m_bDoBurn; 00106 bool m_bEraseDvdRw; 00107 QString m_saveFilename; 00108 QString m_theme; 00109 00110 bool m_moveMode; 00111 00112 MythUIButton *m_nextButton; 00113 MythUIButton *m_prevButton; 00114 MythUIButton *m_cancelButton; 00115 00116 MythUIButtonList *m_archiveButtonList; 00117 MythUIText *m_nofilesText; 00118 MythUIButton *m_addrecordingButton; 00119 MythUIButton *m_addvideoButton; 00120 MythUIButton *m_addfileButton; 00121 00122 // size bar 00123 MythUIProgressBar *m_sizeBar; 00124 MythUIText *m_maxsizeText; 00125 MythUIText *m_minsizeText; 00126 MythUIText *m_currentsizeErrorText; 00127 MythUIText *m_currentsizeText; 00128 }; 00129 00131 00132 class BurnMenu : public QObject 00133 { 00134 Q_OBJECT 00135 00136 public: 00137 BurnMenu(void); 00138 ~BurnMenu(void); 00139 00140 void start(void); 00141 00142 private: 00143 void customEvent(QEvent *event); 00144 void doBurn(int mode); 00145 }; 00146 00147 #endif 00148 00149
1.6.3