00001 #ifndef EXPORTNATIVE_H_ 00002 #define EXPORTNATIVE_H_ 00003 00004 // c++ 00005 #include <vector> 00006 00007 // qt 00008 #include <QKeyEvent> 00009 00010 // mythtv 00011 #include <mythscreentype.h> 00012 00013 // mytharchive 00014 #include "archiveutil.h" 00015 00016 enum NativeItemType 00017 { 00018 RT_RECORDING = 1, 00019 RT_VIDEO, 00020 RT_FILE 00021 }; 00022 00023 class MythUIText; 00024 class MythUIButton; 00025 class MythUIButtonList; 00026 class MythUIButtonListItem; 00027 class MythUIProgressBar; 00028 00029 class ExportNative : public MythScreenType 00030 { 00031 00032 Q_OBJECT 00033 00034 public: 00035 ExportNative(MythScreenStack *parent, MythScreenType *previousScreen, 00036 ArchiveDestination archiveDestination, QString name); 00037 00038 ~ExportNative(void); 00039 00040 bool Create(void); 00041 bool keyPressEvent(QKeyEvent *); 00042 00043 void createConfigFile(const QString &filename); 00044 00045 public slots: 00046 00047 void handleNextPage(void); 00048 void handlePrevPage(void); 00049 void handleCancel(void); 00050 void handleAddRecording(void); 00051 void handleAddVideo(void); 00052 00053 void titleChanged(MythUIButtonListItem *item); 00054 void showMenu(void); 00055 void removeItem(void); 00056 void selectorClosed(bool ok); 00057 00058 private: 00059 void updateArchiveList(void); 00060 void getArchiveList(void); 00061 void updateSizeBar(void); 00062 void loadConfiguration(void); 00063 void saveConfiguration(void); 00064 void getArchiveListFromDB(void); 00065 void runScript(); 00066 00067 MythScreenType *m_previousScreen; 00068 00069 ArchiveDestination m_archiveDestination; 00070 uint m_usedSpace; 00071 00072 QList<ArchiveItem *> m_archiveList; 00073 00074 bool m_bCreateISO; 00075 bool m_bDoBurn; 00076 bool m_bEraseDvdRw; 00077 QString m_saveFilename; 00078 00079 MythUIButtonList *m_archiveButtonList; 00080 MythUIButton *m_nextButton; 00081 MythUIButton *m_prevButton; 00082 MythUIButton *m_cancelButton; 00083 MythUIButton *m_addrecordingButton; 00084 MythUIButton *m_addvideoButton; 00085 MythUIText *m_freespaceText; 00086 MythUIText *m_titleText; 00087 MythUIText *m_datetimeText; 00088 MythUIText *m_descriptionText; 00089 MythUIText *m_filesizeText; 00090 MythUIText *m_nofilesText; 00091 MythUIText *m_maxsizeText; 00092 MythUIText *m_minsizeText; 00093 MythUIText *m_currsizeText; 00094 MythUIText *m_currsizeErrText; 00095 MythUIProgressBar *m_sizeBar; 00096 }; 00097 00098 #endif
1.6.3