-rw-r--r-- | libopie/ofiledialog.h | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/libopie/ofiledialog.h b/libopie/ofiledialog.h new file mode 100644 index 0000000..40d147e --- a/dev/null +++ b/libopie/ofiledialog.h | |||
@@ -0,0 +1,77 @@ | |||
1 | /* | ||
2 | =. This file is part of the OPIE Project | ||
3 | .=l. Copyright (c) 2002 zecke <zecke@handhelds.org> | ||
4 | .>+-= | ||
5 | _;:, .> :=|. This library is free software; you can | ||
6 | .> <`_, > . <= redistribute it and/or modify it under | ||
7 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | ||
8 | .="- .-=="i, .._ License as published by the Free Software | ||
9 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
10 | ._= =} : or (at your option) any later version. | ||
11 | .%`+i> _;_. | ||
12 | .i_,=:_. -<s. This library is distributed in the hope that | ||
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
14 | : .. .:, . . . without even the implied warranty of | ||
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
17 | ..}^=.= = ; Library General Public License for more | ||
18 | ++= -. .` .: details. | ||
19 | : = ...= . :.=- | ||
20 | -. .:....=;==+<; You should have received a copy of the GNU | ||
21 | -_. . . )=. = Library General Public License along with | ||
22 | -- :-=` this library; see the file COPYING.LIB. | ||
23 | If not, write to the Free Software Foundation, | ||
24 | Inc., 59 Temple Place - Suite 330, | ||
25 | Boston, MA 02111-1307, USA. | ||
26 | |||
27 | */ | ||
28 | |||
29 | |||
30 | #ifndef OpieFileDialog_h | ||
31 | #define OpieFileDialog_h | ||
32 | |||
33 | #include <qdialog.h> | ||
34 | |||
35 | #include <opie/ofileselector.h> | ||
36 | |||
37 | class OFileDialog : public QDialog { | ||
38 | Q_OBJECT | ||
39 | public: | ||
40 | OFileDialog(const QString &caption, | ||
41 | QWidget *, int mode, int selector, | ||
42 | const QString &dirName, | ||
43 | const QString &fileName = QString::null, | ||
44 | const QStringList &mimetypes = QStringList() ); | ||
45 | QString mimetype() const; | ||
46 | QString fileName() const; | ||
47 | DocLnk selectedDocument()const; | ||
48 | |||
49 | // static methods | ||
50 | static QString getOpenFileName(int selector, | ||
51 | const QString& startDir = QString::null, | ||
52 | const QString &fileName = QString::null, | ||
53 | const QStringList& mimefilter = QStringList(), | ||
54 | QWidget *wid = 0, | ||
55 | const QString &caption = QString::null ); | ||
56 | |||
57 | static QString getSaveFileName(int selector, | ||
58 | const QString& startDir = QString::null, | ||
59 | const QString& fileName = QString::null, | ||
60 | const QStringList& mimefilter = QStringList(), | ||
61 | QWidget *wid = 0, | ||
62 | const QString &caption = QString::null ); | ||
63 | |||
64 | //let's OFileSelector catch up first | ||
65 | //static QString getExistingDirectory(const QString& startDir = QString::null, | ||
66 | // QWidget *parent = 0, | ||
67 | // const QString& caption = QString::null ); | ||
68 | private: | ||
69 | class OFileDialogPrivate; | ||
70 | OFileDialogPrivate *d; | ||
71 | OFileSelector *file; | ||
72 | |||
73 | private slots: | ||
74 | void slotFileSelected( const QString & ); | ||
75 | void slotDirSelected(const QString & ); | ||
76 | }; | ||
77 | #endif | ||