00001 #ifndef IMPORTNATIVEWIZARD_H_ 00002 #define IMPORTNATIVEWIZARD_H_ 00003 00004 #include <iostream> 00005 00006 // qt 00007 #include <qstring.h> 00008 #include <qstringlist.h> 00009 00010 // myth 00011 #include <mythtv/mythdialogs.h> 00012 #include <mythtv/uilistbtntype.h> 00013 00014 typedef struct 00015 { 00016 bool directory; 00017 bool selected; 00018 QString filename; 00019 long long size; 00020 } FileInfo; 00021 00022 class ImportNativeWizard : public MythThemedDialog 00023 { 00024 00025 Q_OBJECT 00026 00027 public: 00028 00029 ImportNativeWizard(const QString &startDir, 00030 const QString &filemask, MythMainWindow *parent, 00031 const QString &window_name, const QString &theme_filename, 00032 const char *name = 0); 00033 ~ImportNativeWizard(); 00034 00035 private slots: 00036 void keyPressEvent(QKeyEvent *e); 00037 void nextPressed(); 00038 void prevPressed(); 00039 void cancelPressed(); 00040 void backPressed(); 00041 void homePressed(); 00042 void locationEditLostFocus(); 00043 void selectedChanged(UIListBtnTypeItem *item); 00044 void searchChanID(); 00045 void searchChanNo(); 00046 void searchName(); 00047 void searchCallsign(); 00048 00049 private: 00050 void updateFileList(); 00051 void updateWidgets(void); 00052 void wireUpTheme(void); 00053 void updateScrollArrows(void); 00054 void loadXML(const QString &filename); 00055 void findChannelMatch(const QString &chanid, const QString &chanNo, 00056 const QString &name, const QString &callsign); 00057 void fillSearchList(const QString &field); 00058 bool showList(const QString &caption, QString &value); 00059 00060 QString m_filemask; 00061 QString m_curDirectory; 00062 QPtrList<FileInfo> m_fileData; 00063 QStringList m_selectedList; 00064 00065 // 00066 // GUI stuff 00067 // 00068 00069 // first page 00070 UIListBtnType *m_fileList; 00071 UIRemoteEditType *m_locationEdit; 00072 UITextButtonType *m_backButton; 00073 UITextButtonType *m_homeButton; 00074 UITextType *m_title_text; 00075 UITextType *m_subtitle_text; 00076 UITextType *m_starttime_text; 00077 00078 // second page 00079 UITextType *m_progTitle_text; 00080 UITextType *m_progDateTime_text; 00081 UITextType *m_progDescription_text; 00082 00083 UITextType *m_chanID_text; 00084 UITextType *m_chanNo_text; 00085 UITextType *m_chanName_text; 00086 UITextType *m_callsign_text; 00087 00088 UITextType *m_localChanID_text; 00089 UITextType *m_localChanNo_text; 00090 UITextType *m_localChanName_text; 00091 UITextType *m_localCallsign_text; 00092 00093 UIPushButtonType *m_searchChanID_button; 00094 UIPushButtonType *m_searchChanNo_button; 00095 UIPushButtonType *m_searchChanName_button; 00096 UIPushButtonType *m_searchCallsign_button; 00097 00098 // common buttons 00099 UITextButtonType *m_nextButton; 00100 UITextButtonType *m_prevButton; 00101 UITextButtonType *m_cancelButton; 00102 00103 QPixmap *m_directoryPixmap; 00104 00105 QStringList m_searchList; 00106 bool m_isValidXMLSelected; 00107 }; 00108 00109 #endif
1.5.5