summaryrefslogtreecommitdiff
path: root/libopie/ofiledialog.h
Unidiff
Diffstat (limited to 'libopie/ofiledialog.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/ofiledialog.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/libopie/ofiledialog.h b/libopie/ofiledialog.h
index 309086b..91e0586 100644
--- a/libopie/ofiledialog.h
+++ b/libopie/ofiledialog.h
@@ -23,49 +23,49 @@
23 If not, write to the Free Software Foundation, 23 If not, write to the Free Software Foundation,
24 Inc., 59 Temple Place - Suite 330, 24 Inc., 59 Temple Place - Suite 330,
25 Boston, MA 02111-1307, USA. 25 Boston, MA 02111-1307, USA.
26 26
27*/ 27*/
28 28
29 29
30#ifndef OpieFileDialog_h 30#ifndef OpieFileDialog_h
31#define OpieFileDialog_h 31#define OpieFileDialog_h
32 32
33#include <qdialog.h> 33#include <qdialog.h>
34 34
35#include <opie/ofileselector.h> 35#include <opie/ofileselector.h>
36 36
37/** 37/**
38 * This class places a OFileSelector inside a QDialog. 38 * This class places a OFileSelector inside a QDialog.
39 * It provides static method for letting a user chose 39 * It provides static method for letting a user chose
40 * a file for either opening or saving. 40 * a file for either opening or saving.
41 * Most of the time the c'tor will not be used instead using 41 * Most of the time the c'tor will not be used instead using
42 * the static member functions is prefered. 42 * the static member functions is prefered.
43 * 43 *
44 * <pre> 44 * <pre>
45 * QMap<QString, QStringList> mimeTypes; 45 * QMap<QString, QStringList> mimeTypes;
46 * QStringList types; 46 * QStringList types;
47 * types << "text/* "; 47 * types << "text[slash]* ";
48 * mimeTypes.insert( tr("Text"), types ); 48 * mimeTypes.insert( tr("Text"), types );
49 * mimeTypes.insert( tr("All"), " * / * " ); // remove the spaces in the 2nd comment 49 * mimeTypes.insert( tr("All"), " * / * " ); // remove the spaces in the 2nd comment
50 * QString fileName= OFileDialog::getOpenFileName( OFileSelector::EXTENDED_ALL, 50 * QString fileName= OFileDialog::getOpenFileName( OFileSelector::EXTENDED_ALL,
51 * "foo","bar", mimeTypes); 51 * "foo","bar", mimeTypes);
52 * </pre> 52 * </pre>
53 * 53 *
54 * @short A small QDialog swalloing a FileSelector 54 * @short A small QDialog swalloing a FileSelector
55 * @see QDialog 55 * @see QDialog
56 * @see OFileSelector 56 * @see OFileSelector
57 * @version 0.1-unfinished 57 * @version 0.1-unfinished
58 * @author Holger Freyther ( zecke@handhelds.org ) 58 * @author Holger Freyther ( zecke@handhelds.org )
59 */ 59 */
60class OFileDialog : public QDialog { 60class OFileDialog : public QDialog {
61 Q_OBJECT 61 Q_OBJECT
62 public: 62 public:
63 OFileDialog(const QString &caption, 63 OFileDialog(const QString &caption,
64 QWidget *, int mode, int selector, 64 QWidget *, int mode, int selector,
65 const QString &dirName, 65 const QString &dirName,
66 const QString &fileName = QString::null, 66 const QString &fileName = QString::null,
67 const MimeTypes &mimetypes = MimeTypes() ); 67 const MimeTypes &mimetypes = MimeTypes() );
68 QString mimetype() const; 68 QString mimetype() const;
69 QString fileName() const; 69 QString fileName() const;
70 DocLnk selectedDocument()const; 70 DocLnk selectedDocument()const;
71 71
@@ -75,26 +75,27 @@ class OFileDialog : public QDialog {
75 const QString &fileName = QString::null, 75 const QString &fileName = QString::null,
76 const MimeTypes& mime = MimeTypes(), 76 const MimeTypes& mime = MimeTypes(),
77 QWidget *wid = 0, 77 QWidget *wid = 0,
78 const QString &caption = QString::null ); 78 const QString &caption = QString::null );
79 79
80 static QString getSaveFileName(int selector, 80 static QString getSaveFileName(int selector,
81 const QString& startDir = QString::null, 81 const QString& startDir = QString::null,
82 const QString& fileName = QString::null, 82 const QString& fileName = QString::null,
83 const MimeTypes& mimefilter = MimeTypes(), 83 const MimeTypes& mimefilter = MimeTypes(),
84 QWidget *wid = 0, 84 QWidget *wid = 0,
85 const QString &caption = QString::null ); 85 const QString &caption = QString::null );
86 86
87 //let's OFileSelector catch up first 87 //let's OFileSelector catch up first
88 //static QString getExistingDirectory(const QString& startDir = QString::null, 88 //static QString getExistingDirectory(const QString& startDir = QString::null,
89 // QWidget *parent = 0, 89 // QWidget *parent = 0,
90 // const QString& caption = QString::null ); 90 // const QString& caption = QString::null );
91 private: 91 private:
92 class OFileDialogPrivate; 92 class OFileDialogPrivate;
93 OFileDialogPrivate *d; 93 OFileDialogPrivate *d;
94 OFileSelector *file; 94 OFileSelector *file;
95 95
96 private slots: 96 private slots:
97 void slotFileSelected( const QString & ); 97 void slotFileSelected( const QString & );
98 void slotDirSelected(const QString & ); 98 void slotDirSelected(const QString & );
99 void slotSelectorOk();
99}; 100};
100#endif 101#endif