00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef OFILEDIALOG_H
00030 #define OFILEDIALOG_H
00031
00032
00033 #include <opie2/ofileselector.h>
00034
00035
00036 #include <qdialog.h>
00037
00038 namespace Opie {
00039 namespace Ui {
00040
00064 class OFileDialog : public QDialog
00065 {
00066 Q_OBJECT
00067 public:
00068 OFileDialog(const QString &caption,
00069 QWidget *, int mode, int selector,
00070 const QString &dirName,
00071 const QString &fileName = QString::null,
00072 const MimeTypes &mimetypes = MimeTypes() );
00073 QString mimetype() const;
00074 QString fileName() const;
00075 DocLnk selectedDocument()const;
00076
00077
00078 static QString getOpenFileName(int selector,
00079 const QString& startDir = QString::null,
00080 const QString &fileName = QString::null,
00081 const MimeTypes& mime = MimeTypes(),
00082 QWidget *wid = 0,
00083 const QString &caption = QString::null );
00084
00085 static QString getSaveFileName(int selector,
00086 const QString& startDir = QString::null,
00087 const QString& fileName = QString::null,
00088 const MimeTypes& mimefilter = MimeTypes(),
00089 QWidget *wid = 0,
00090 const QString &caption = QString::null );
00091
00092 static QString getDirectory(int selector,
00093 const QString &startDir = QString::null,
00094 QWidget *wid = 0,
00095 const QString &caption = QString::null );
00096
00097
00098
00099
00100
00101 private:
00102 class OFileDialogPrivate;
00103 OFileDialogPrivate *d;
00104 OFileSelector *file;
00105
00106 private slots:
00107 void slotFileSelected( const QString & );
00108 void slotDirSelected(const QString & );
00109 void slotSelectorOk();
00110 };
00111
00112 }
00113 }
00114
00115 #endif