author | zecke <zecke> | 2002-04-11 20:30:22 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-04-11 20:30:22 (UTC) |
commit | 2599e347d9444cfa6282fec9f2bfb9df4743d6d2 (patch) (unidiff) | |
tree | f7459dc0763e2023a4cbc9171241fa3e37b3731a /libopie/ofiledialog.h | |
parent | 4db8a0f808c4fd931d10af203d94f693e92519f5 (diff) | |
download | opie-2599e347d9444cfa6282fec9f2bfb9df4743d6d2.zip opie-2599e347d9444cfa6282fec9f2bfb9df4743d6d2.tar.gz opie-2599e347d9444cfa6282fec9f2bfb9df4743d6d2.tar.bz2 |
OFileSelector const QStringList -> const QSTringList&
OFileDialog initial version
the layout is broken but don't ask me. I played with the parent
played with manual relayouting.
Currently the setYesCancelVisisble crashes but that's ok for now
OFileDialog provides static methods for
OpenFileName, SaveFileName and DIrFileName
Multiple selection will follow
Maybe a dwarf fixes the problems for me overnight
-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 | ||