00001 #ifndef EXPORTNATIVEWIZARD_H_ 00002 #define EXPORTNATIVEWIZARD_H_ 00003 00004 #include <mythtv/uitypes.h> 00005 #include <mythtv/uilistbtntype.h> 00006 #include <mythtv/dialogbox.h> 00007 00008 #include "archiveutil.h" 00009 00010 enum NativeItemType 00011 { 00012 RT_RECORDING = 1, 00013 RT_VIDEO, 00014 RT_FILE 00015 }; 00016 00017 typedef struct 00018 { 00019 int id; 00020 QString type; 00021 QString title; 00022 QString subtitle; 00023 QString description; 00024 QString startDate; 00025 QString startTime; 00026 QString filename; 00027 long long size; 00028 bool hasCutlist; 00029 bool useCutlist; 00030 bool editedDetails; 00031 } NativeItem; 00032 00033 class ExportNativeWizard : public MythThemedDialog 00034 { 00035 00036 Q_OBJECT 00037 00038 public: 00039 ExportNativeWizard(MythMainWindow *parent, QString window_name, 00040 QString theme_filename, const char *name = 0); 00041 00042 ~ExportNativeWizard(void); 00043 00044 void setSaveFilename(QString filename) {saveFilename = filename;} 00045 void createConfigFile(const QString &filename); 00046 00047 public slots: 00048 00049 void handleNextPage(void); 00050 void handlePrevPage(void); 00051 void handleCancel(void); 00052 void handleAddRecording(void); 00053 void handleAddVideo(void); 00054 00055 void titleChanged(UIListBtnTypeItem *item); 00056 void toggleUseCutlist(bool state); 00057 void showMenu(void); 00058 void closePopupMenu(void); 00059 void removeItem(void); 00060 void toggleCreateISO(bool state) { bCreateISO = state; }; 00061 void toggleDoBurn(bool state) { bDoBurn = state; }; 00062 void toggleEraseDvdRw(bool state) { bEraseDvdRw = state; }; 00063 void handleFind(void); 00064 void filenameEditLostFocus(void); 00065 void setDestination(int); 00066 00067 private: 00068 ArchiveDestination archiveDestination; 00069 int destination_no; 00070 int freeSpace; 00071 int usedSpace; 00072 00073 void keyPressEvent(QKeyEvent *e); 00074 void updateArchiveList(void); 00075 void getArchiveList(void); 00076 void wireUpTheme(void); 00077 void updateSizeBar(void); 00078 void loadConfiguration(void); 00079 void saveConfiguration(void); 00080 void getArchiveListFromDB(void); 00081 void runScript(); 00082 00083 vector<NativeItem *> *archiveList; 00084 UIListBtnType *archive_list; 00085 00086 bool bCreateISO; 00087 bool bDoBurn; 00088 bool bEraseDvdRw; 00089 00090 QString saveFilename; 00091 00092 UITextButtonType *next_button; 00093 UITextButtonType *prev_button; 00094 UITextButtonType *cancel_button; 00095 00096 UITextButtonType *addrecording_button; 00097 UITextButtonType *addvideo_button; 00098 00099 UISelectorType *destination_selector; 00100 UITextType *destination_text; 00101 00102 UITextType *freespace_text; 00103 00104 UIRemoteEditType *filename_edit; 00105 UITextButtonType *find_button; 00106 00107 UISelectorType *category_selector; 00108 UITextType *title_text; 00109 UITextType *datetime_text; 00110 UITextType *description_text; 00111 UITextType *usecutlist_text; 00112 UICheckBoxType *usecutlist_check; 00113 UITextType *nocutlist_text; 00114 UITextType *filesize_text; 00115 UITextType *nofiles_text; 00116 00117 UIStatusBarType *size_bar; 00118 00119 UICheckBoxType *createISO_check; 00120 UICheckBoxType *doBurn_check; 00121 UICheckBoxType *eraseDvdRw_check; 00122 UITextType *createISO_text; 00123 UITextType *doBurn_text; 00124 UITextType *eraseDvdRw_text; 00125 00126 MythPopupBox *popupMenu; 00127 }; 00128 00129 #endif
1.5.5