00001 /* 00002 Derived from the file browser published by ljp@llornkcor.com but extensively 00003 modified to work in rotated views on the Zaurus 00004 */ 00005 00006 /**************************************************************************** 00007 ** Form interface generated from reading ui file 'fileBrowzer.ui' 00008 ** 00009 ** Created: Fri Dec 14 08:16:02 2001 00010 ** by: The User Interface Compiler (uic) 00011 ** 00012 ** WARNING! All changes made in this file will be lost! 00013 blah,blah,blah 00014 ****************************************************************************/ 00015 #ifndef FILEBROWSER_H 00016 #define FILEBROWSER_H 00017 00018 //#include <qvariant.h> 00019 #include <qdialog.h> 00020 #include <qfile.h> 00021 #include <qdir.h> 00022 #include <qstringlist.h> 00023 #include <qlabel.h> 00024 #include <qstring.h> 00025 00026 class QVBoxLayout; 00027 class QHBoxLayout; 00028 class QGridLayout; 00029 class QtrListView; 00030 class QListViewItem; 00031 class QPushButton; 00032 class QLineEdit; 00033 00034 class fileBrowser : public QDialog 00035 { 00036 Q_OBJECT 00037 00038 public: 00039 void populateList(); 00040 fileBrowser( bool allownew, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ,const QString filter=0, const QString iPath=0); 00041 ~fileBrowser(); 00042 00043 QPushButton* buttonOk; 00044 QPushButton* buttonShowHidden; 00045 QtrListView* ListView; 00046 QPushButton* buttonCancel; 00047 QLabel *dirLabel; 00048 QString selectedFileName, filterStr; 00049 QDir currentDir; 00050 QFile file; 00051 QString getCurrentFile(); 00052 QLineEdit* m_filename; 00053 int filterspec; 00054 // QDir::FilterSpec filterspec; 00055 00056 //QListViewItem * item; 00057 public slots: 00058 00059 private: 00060 QString filename; 00061 private slots: 00062 void upDir(); 00063 void listDoubleClicked(QListViewItem *); 00064 void listClicked(QListViewItem *); 00065 void OnRoot(); 00066 void OnCancel(); 00067 void setHidden(bool); 00068 void onReturn(); 00069 void onCF(); 00070 void onSD(); 00071 void onHome(); 00072 00073 protected slots: 00074 00075 protected: 00076 void OnOK(); 00077 virtual void resizeEvent(QResizeEvent* e); 00078 void setdir(const QString& s); 00079 }; 00080 00081 #endif // FILEBROWSER_H
1.4.2