00001 #ifndef DIRECTORYFINDER_H_ 00002 #define DIRECTORYFINDER_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 } FileData; 00021 00022 class DirectoryFinder : public MythThemedDialog 00023 { 00024 00025 Q_OBJECT 00026 00027 public: 00028 00029 DirectoryFinder(const QString &startDir, 00030 MythMainWindow *parent, 00031 const char *name = 0); 00032 ~DirectoryFinder(); 00033 00034 QString getSelected(void); 00035 00036 private slots: 00037 void keyPressEvent(QKeyEvent *e); 00038 void OKPressed(); 00039 void cancelPressed(); 00040 void backPressed(); 00041 void homePressed(); 00042 void locationEditLostFocus(); 00043 00044 private: 00045 void updateFileList(); 00046 void updateSelectedList(); 00047 void updateWidgets(void); 00048 void wireUpTheme(void); 00049 void updateScrollArrows(void); 00050 00051 QString m_curDirectory; 00052 QStringList m_directoryList; 00053 00054 // 00055 // GUI stuff 00056 // 00057 UIListBtnType *m_fileList; 00058 UIRemoteEditType *m_locationEdit; 00059 UITextButtonType *m_okButton; 00060 UITextButtonType *m_cancelButton; 00061 UITextButtonType *m_backButton; 00062 UITextButtonType *m_homeButton; 00063 00064 QPixmap *m_directoryPixmap; 00065 }; 00066 00067 #endif
1.5.5