-rw-r--r-- | libopie/ofiledialog.cc | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/libopie/ofiledialog.cc b/libopie/ofiledialog.cc index 4783004..9e725c2 100644 --- a/libopie/ofiledialog.cc +++ b/libopie/ofiledialog.cc | |||
@@ -32,8 +32,19 @@ | |||
32 | #include <qlayout.h> | 32 | #include <qlayout.h> |
33 | 33 | ||
34 | #include "ofiledialog.h" | 34 | #include "ofiledialog.h" |
35 | 35 | ||
36 | /** | ||
37 | * This constructs a modal dialog | ||
38 | * | ||
39 | * @param caption The caption of the dialog | ||
40 | * @param wid The parent widget | ||
41 | * @param mode The mode of the OFileSelector @see OFileSelector | ||
42 | * @param selector The selector of the OFileSelector | ||
43 | * @param dirName the dir or resource to start from | ||
44 | * @param fileName a proposed or existing filename | ||
45 | * @param mimetypes The mimeTypes | ||
46 | */ | ||
36 | OFileDialog::OFileDialog(const QString &caption, | 47 | OFileDialog::OFileDialog(const QString &caption, |
37 | QWidget *wid, int mode, int selector, | 48 | QWidget *wid, int mode, int selector, |
38 | const QString &dirName, | 49 | const QString &dirName, |
39 | const QString &fileName, | 50 | const QString &fileName, |
@@ -59,20 +70,44 @@ OFileDialog::OFileDialog(const QString &caption, | |||
59 | 70 | ||
60 | 71 | ||
61 | file->setYesCancelVisible( false ); // relayout | 72 | file->setYesCancelVisible( false ); // relayout |
62 | } | 73 | } |
74 | /** | ||
75 | * @returns the mimetype of the selected | ||
76 | * currently it return QString::null | ||
77 | */ | ||
63 | QString OFileDialog::mimetype()const | 78 | QString OFileDialog::mimetype()const |
64 | { | 79 | { |
65 | return QString::null; | 80 | return QString::null; |
66 | } | 81 | } |
82 | |||
83 | /** | ||
84 | * @return the fileName | ||
85 | */ | ||
67 | QString OFileDialog::fileName()const | 86 | QString OFileDialog::fileName()const |
68 | { | 87 | { |
69 | return file->selectedName(); | 88 | return file->selectedName(); |
70 | } | 89 | } |
90 | |||
91 | /** | ||
92 | * return a DocLnk to the current file | ||
93 | */ | ||
71 | DocLnk OFileDialog::selectedDocument()const | 94 | DocLnk OFileDialog::selectedDocument()const |
72 | { | 95 | { |
73 | return file->selectedDocument(); | 96 | return file->selectedDocument(); |
74 | } | 97 | } |
98 | |||
99 | /** | ||
100 | * This opens up a filedialog in Open mode | ||
101 | * | ||
102 | * @param selector the Selector Mode | ||
103 | * @param startDir Where to start from | ||
104 | * @param file A proposed filename | ||
105 | * @param mimes A list of MimeTypes | ||
106 | * @param wid the parent | ||
107 | * @param caption of the dialog if QString::null tr("Open") will be used | ||
108 | * @return the fileName or QString::null | ||
109 | */ | ||
75 | QString OFileDialog::getOpenFileName(int selector, | 110 | QString OFileDialog::getOpenFileName(int selector, |
76 | const QString &startDir, | 111 | const QString &startDir, |
77 | const QString &file, | 112 | const QString &file, |
78 | const MimeTypes &mimes, | 113 | const MimeTypes &mimes, |
@@ -87,8 +122,13 @@ QString OFileDialog::getOpenFileName(int selector, | |||
87 | ret = dlg.fileName(); | 122 | ret = dlg.fileName(); |
88 | 123 | ||
89 | return ret; | 124 | return ret; |
90 | } | 125 | } |
126 | |||
127 | /** | ||
128 | * This opens up a file dialog in save mode | ||
129 | * @see getOpenFileName | ||
130 | */ | ||
91 | QString OFileDialog::getSaveFileName(int selector, | 131 | QString OFileDialog::getSaveFileName(int selector, |
92 | const QString &startDir, | 132 | const QString &startDir, |
93 | const QString &file, | 133 | const QString &file, |
94 | const MimeTypes &mimes, | 134 | const MimeTypes &mimes, |