00001 /* 00002 mythburnwizard.h 00003 00004 header for the mythburn interface screen 00005 */ 00006 00007 #ifndef MYTHBURNWIZARD_H_ 00008 #define MYTHBURNWIZARD_H_ 00009 00010 #include <mythtv/uitypes.h> 00011 #include <mythtv/uilistbtntype.h> 00012 #include <mythtv/dialogbox.h> 00013 00014 #include "archiveutil.h" 00015 00016 class MythburnWizard : public MythThemedDialog 00017 { 00018 00019 Q_OBJECT 00020 00021 public: 00022 MythburnWizard(MythMainWindow *parent, QString window_name, 00023 QString theme_filename, const char *name = 0); 00024 00025 ~MythburnWizard(void); 00026 00027 void keyPressEvent(QKeyEvent *e); 00028 void createConfigFile(const QString &filename); 00029 00030 void setSaveFilename(QString filename) {saveFilename = filename;} 00031 00032 public slots: 00033 void handleNextPage(void); 00034 void handlePrevPage(void); 00035 void handleCancel(void); 00036 void handleAddRecording(void); 00037 void handleAddVideo(void); 00038 void handleAddFile(void); 00039 00040 void setTheme(int); 00041 void setProfile(int); 00042 void titleChanged(UIListBtnTypeItem *item); 00043 void selectedChanged(UIListBtnTypeItem *item); 00044 void toggleUseCutlist(bool state); 00045 void showMenu(void); 00046 void closePopupMenu(void); 00047 void editDetails(void); 00048 void removeItem(void); 00049 void handleFind(void); 00050 void filenameEditLostFocus(void); 00051 void setDestination(int); 00052 00053 void toggleCreateISO(bool state) { bCreateISO = state; }; 00054 void toggleDoBurn(bool state) { bDoBurn = state; }; 00055 void toggleEraseDvdRw(bool state) { bEraseDvdRw = state; }; 00056 00057 private: 00058 void getThemeList(void); 00059 void updateArchiveList(void); 00060 void getArchiveList(void); 00061 void wireUpTheme(void); 00062 void updateSizeBar(); 00063 void loadConfiguration(void); 00064 void saveConfiguration(void); 00065 void updateSelectedArchiveList(void); 00066 void toggleReorderState(void); 00067 void reloadSelectedList(void); 00068 void showEditMetadataDialog(); 00069 QString loadFile(const QString &filename); 00070 void getArchiveListFromDB(void); 00071 bool doRemoveArchiveItem(const QString &filename); 00072 bool isArchiveItemValid(const QString &type, const QString &filename); 00073 bool hasCutList(QString &type, QString &filename); 00074 void loadEncoderProfiles(void); 00075 EncoderProfile *getDefaultProfile(ArchiveItem *item); 00076 long long recalcSize(EncoderProfile *profile, ArchiveItem *a); 00077 void recalcItemSize(ArchiveItem *item); 00078 void setProfile(EncoderProfile *profile, ArchiveItem *item); 00079 void runScript(); 00080 00081 ArchiveDestination archiveDestination; 00082 int destination_no; 00083 QString themeDir; 00084 int freeSpace; 00085 int usedSpace; 00086 00087 vector<ArchiveItem *> *archiveList; 00088 vector<EncoderProfile *> *profileList; 00089 00090 UISelectorType *destination_selector; 00091 UITextType *destination_text; 00092 00093 UITextType *freespace_text; 00094 00095 UIRemoteEditType *filename_edit; 00096 UITextButtonType *find_button; 00097 00098 UISelectorType *theme_selector; 00099 UIImageType *theme_image; 00100 int theme_no; 00101 QStringList theme_list; 00102 00103 UIImageType *intro_image; 00104 UIImageType *mainmenu_image; 00105 UIImageType *chapter_image; 00106 UIImageType *details_image; 00107 UITextType *themedesc_text; 00108 00109 UIListBtnType *archive_list; 00110 UIListBtnType *selected_list; 00111 00112 // selected list reordering state 00113 bool bReordering; 00114 QPixmap *movePixmap; 00115 00116 bool bCreateISO; 00117 bool bDoBurn; 00118 bool bEraseDvdRw; 00119 00120 QString saveFilename; 00121 00122 UITextButtonType *next_button; 00123 UITextButtonType *prev_button; 00124 UITextButtonType *cancel_button; 00125 00126 UITextType *title_text; 00127 UITextType *datetime_text; 00128 UITextType *description_text; 00129 UITextType *usecutlist_text; 00130 UICheckBoxType *usecutlist_check; 00131 UITextType *nocutlist_text; 00132 UITextType *filesize_text; 00133 UITextType *nofiles_text; 00134 UITextButtonType *addrecording_button; 00135 UITextButtonType *addvideo_button; 00136 UITextButtonType *addfile_button; 00137 00138 // size bar 00139 UIStatusBarType *size_bar; 00140 UITextType *maxsize_text; 00141 UITextType *minsize_text; 00142 UITextType *currentsize_error_text; 00143 UITextType *currentsize_text; 00144 00145 // profile 00146 UISelectorType *profile_selector; 00147 UITextType *profile_text; 00148 UITextType *oldsize_text; 00149 UITextType *newsize_text; 00150 00151 UICheckBoxType *createISO_check; 00152 UICheckBoxType *doBurn_check; 00153 UICheckBoxType *eraseDvdRw_check; 00154 UITextType *createISO_text; 00155 UITextType *doBurn_text; 00156 UITextType *eraseDvdRw_text; 00157 00158 MythPopupBox *popupMenu; 00159 }; 00160 00161 #endif 00162 00163
1.5.5