21 <body> |
21 <body> |
22 <a NAME="top" ID="top"></a> |
22 <a NAME="top" ID="top"></a> |
23 <h1>eric7.EricWidgets.EricFileDialog</h1> |
23 <h1>eric7.EricWidgets.EricFileDialog</h1> |
24 |
24 |
25 <p> |
25 <p> |
26 Module implementing alternative functions for the QFileDialog static methods |
26 Module implementing alternative functions for the QFileDialog static methods. |
27 to cope with distributor's usage of KDE wrapper dialogs for Qt file dialogs. |
|
28 </p> |
27 </p> |
29 <h3>Global Attributes</h3> |
28 <h3>Global Attributes</h3> |
30 |
29 |
31 <table> |
30 <table> |
32 <tr><td>DontConfirmOverwrite</td></tr><tr><td>DontResolveSymlinks</td></tr><tr><td>DontUseCustomDirectoryIcons</td></tr><tr><td>DontUseNativeDialog</td></tr><tr><td>HideNameFilterDetails</td></tr><tr><td>Option</td></tr><tr><td>ReadOnly</td></tr><tr><td>ShowDirsOnly</td></tr> |
31 <tr><td>DontConfirmOverwrite</td></tr><tr><td>DontResolveSymlinks</td></tr><tr><td>DontUseCustomDirectoryIcons</td></tr><tr><td>DontUseNativeDialog</td></tr><tr><td>HideNameFilterDetails</td></tr><tr><td>Option</td></tr><tr><td>ReadOnly</td></tr><tr><td>ShowDirsOnly</td></tr> |
47 <tr> |
46 <tr> |
48 <td><a href="#getExistingDirectory">getExistingDirectory</a></td> |
47 <td><a href="#getExistingDirectory">getExistingDirectory</a></td> |
49 <td>Module function to get the name of a directory.</td> |
48 <td>Module function to get the name of a directory.</td> |
50 </tr> |
49 </tr> |
51 <tr> |
50 <tr> |
|
51 <td><a href="#getOpenFileAndDirNames">getOpenFileAndDirNames</a></td> |
|
52 <td>Module function to get the names of files and directories for opening.</td> |
|
53 </tr> |
|
54 <tr> |
52 <td><a href="#getOpenFileName">getOpenFileName</a></td> |
55 <td><a href="#getOpenFileName">getOpenFileName</a></td> |
53 <td>Module function to get the name of a file for opening it.</td> |
56 <td>Module function to get the name of a file for opening it.</td> |
54 </tr> |
57 </tr> |
55 <tr> |
58 <tr> |
56 <td><a href="#getOpenFileNameAndFilter">getOpenFileNameAndFilter</a></td> |
59 <td><a href="#getOpenFileNameAndFilter">getOpenFileNameAndFilter</a></td> |
83 Private function to reorder the file filter to cope with a KDE issue |
86 Private function to reorder the file filter to cope with a KDE issue |
84 introduced by distributor's usage of KDE file dialogs. |
87 introduced by distributor's usage of KDE file dialogs. |
85 </p> |
88 </p> |
86 <dl> |
89 <dl> |
87 |
90 |
88 <dt><i>filterStr</i></dt> |
91 <dt><i>filterStr</i> (str)</dt> |
89 <dd> |
92 <dd> |
90 Qt file filter (string) |
93 Qt file filter |
91 </dd> |
94 </dd> |
92 <dt><i>initialFilter</i></dt> |
95 <dt><i>initialFilter</i> (str)</dt> |
93 <dd> |
96 <dd> |
94 initial filter (string) |
97 initial filter |
95 </dd> |
98 </dd> |
96 </dl> |
99 </dl> |
97 <dl> |
100 <dl> |
98 <dt>Return:</dt> |
101 <dt>Return:</dt> |
99 <dd> |
102 <dd> |
100 the rearranged Qt file filter (string) |
103 the rearranged Qt file filter |
|
104 </dd> |
|
105 </dl> |
|
106 <dl> |
|
107 <dt>Return Type:</dt> |
|
108 <dd> |
|
109 str |
101 </dd> |
110 </dd> |
102 </dl> |
111 </dl> |
103 <div align="right"><a href="#top">Up</a></div> |
112 <div align="right"><a href="#top">Up</a></div> |
104 <hr /> |
113 <hr /> |
105 <hr /> |
114 <hr /> |
110 <p> |
119 <p> |
111 Module function to get the name of a directory. |
120 Module function to get the name of a directory. |
112 </p> |
121 </p> |
113 <dl> |
122 <dl> |
114 |
123 |
115 <dt><i>parent</i></dt> |
124 <dt><i>parent</i> (QWidget)</dt> |
116 <dd> |
125 <dd> |
117 parent widget of the dialog (QWidget) |
126 parent widget of the dialog |
118 </dd> |
127 </dd> |
119 <dt><i>caption</i></dt> |
128 <dt><i>caption</i> (str)</dt> |
120 <dd> |
129 <dd> |
121 window title of the dialog (string) |
130 window title of the dialog |
122 </dd> |
131 </dd> |
123 <dt><i>directory</i></dt> |
132 <dt><i>directory</i> (str)</dt> |
124 <dd> |
133 <dd> |
125 working directory of the dialog (string) |
134 working directory of the dialog |
126 </dd> |
135 </dd> |
127 <dt><i>options</i></dt> |
136 <dt><i>options</i> (QFileDialog.Options)</dt> |
128 <dd> |
137 <dd> |
129 various options for the dialog (QFileDialog.Options) |
138 various options for the dialog |
130 </dd> |
139 </dd> |
131 </dl> |
140 </dl> |
132 <dl> |
141 <dl> |
133 <dt>Return:</dt> |
142 <dt>Return:</dt> |
134 <dd> |
143 <dd> |
135 name of selected directory (string) |
144 name of selected directory |
|
145 </dd> |
|
146 </dl> |
|
147 <dl> |
|
148 <dt>Return Type:</dt> |
|
149 <dd> |
|
150 str |
|
151 </dd> |
|
152 </dl> |
|
153 <div align="right"><a href="#top">Up</a></div> |
|
154 <hr /> |
|
155 <hr /> |
|
156 <a NAME="getOpenFileAndDirNames" ID="getOpenFileAndDirNames"></a> |
|
157 <h2>getOpenFileAndDirNames</h2> |
|
158 <b>getOpenFileAndDirNames</b>(<i>parent=None, caption="", directory="", filterStr="", options=None</i>) |
|
159 |
|
160 <p> |
|
161 Module function to get the names of files and directories for opening. |
|
162 </p> |
|
163 <dl> |
|
164 |
|
165 <dt><i>parent</i> (QWidget)</dt> |
|
166 <dd> |
|
167 parent widget of the dialog |
|
168 </dd> |
|
169 <dt><i>caption</i> (str)</dt> |
|
170 <dd> |
|
171 window title of the dialog |
|
172 </dd> |
|
173 <dt><i>directory</i> (str)</dt> |
|
174 <dd> |
|
175 working directory of the dialog |
|
176 </dd> |
|
177 <dt><i>filterStr</i> (str)</dt> |
|
178 <dd> |
|
179 filter string for the dialog |
|
180 </dd> |
|
181 <dt><i>options</i> (QFileDialog.Options)</dt> |
|
182 <dd> |
|
183 various options for the dialog |
|
184 </dd> |
|
185 </dl> |
|
186 <dl> |
|
187 <dt>Return:</dt> |
|
188 <dd> |
|
189 names of the selected files and folders |
|
190 </dd> |
|
191 </dl> |
|
192 <dl> |
|
193 <dt>Return Type:</dt> |
|
194 <dd> |
|
195 list of str |
136 </dd> |
196 </dd> |
137 </dl> |
197 </dl> |
138 <div align="right"><a href="#top">Up</a></div> |
198 <div align="right"><a href="#top">Up</a></div> |
139 <hr /> |
199 <hr /> |
140 <hr /> |
200 <hr /> |
145 <p> |
205 <p> |
146 Module function to get the name of a file for opening it. |
206 Module function to get the name of a file for opening it. |
147 </p> |
207 </p> |
148 <dl> |
208 <dl> |
149 |
209 |
150 <dt><i>parent</i></dt> |
210 <dt><i>parent</i> (QWidget)</dt> |
151 <dd> |
211 <dd> |
152 parent widget of the dialog (QWidget) |
212 parent widget of the dialog |
153 </dd> |
213 </dd> |
154 <dt><i>caption</i></dt> |
214 <dt><i>caption</i> (str)</dt> |
155 <dd> |
215 <dd> |
156 window title of the dialog (string) |
216 window title of the dialog |
157 </dd> |
217 </dd> |
158 <dt><i>directory</i></dt> |
218 <dt><i>directory</i> (str)</dt> |
159 <dd> |
219 <dd> |
160 working directory of the dialog (string) |
220 working directory of the dialog |
161 </dd> |
221 </dd> |
162 <dt><i>filterStr</i></dt> |
222 <dt><i>filterStr</i> (str)</dt> |
163 <dd> |
223 <dd> |
164 filter string for the dialog (string) |
224 filter string for the dialog |
165 </dd> |
225 </dd> |
166 <dt><i>options</i></dt> |
226 <dt><i>options</i> (QFileDialog.Options)</dt> |
167 <dd> |
227 <dd> |
168 various options for the dialog (QFileDialog.Options) |
228 various options for the dialog |
169 </dd> |
229 </dd> |
170 </dl> |
230 </dl> |
171 <dl> |
231 <dl> |
172 <dt>Return:</dt> |
232 <dt>Return:</dt> |
173 <dd> |
233 <dd> |
174 name of file to be opened (string) |
234 name of file to be opened |
|
235 </dd> |
|
236 </dl> |
|
237 <dl> |
|
238 <dt>Return Type:</dt> |
|
239 <dd> |
|
240 str |
175 </dd> |
241 </dd> |
176 </dl> |
242 </dl> |
177 <div align="right"><a href="#top">Up</a></div> |
243 <div align="right"><a href="#top">Up</a></div> |
178 <hr /> |
244 <hr /> |
179 <hr /> |
245 <hr /> |
185 Module function to get the name of a file for opening it and the selected |
251 Module function to get the name of a file for opening it and the selected |
186 file name filter. |
252 file name filter. |
187 </p> |
253 </p> |
188 <dl> |
254 <dl> |
189 |
255 |
190 <dt><i>parent</i></dt> |
256 <dt><i>parent</i> (QWidget)</dt> |
191 <dd> |
257 <dd> |
192 parent widget of the dialog (QWidget) |
258 parent widget of the dialog |
193 </dd> |
259 </dd> |
194 <dt><i>caption</i></dt> |
260 <dt><i>caption</i> (str)</dt> |
195 <dd> |
261 <dd> |
196 window title of the dialog (string) |
262 window title of the dialog |
197 </dd> |
263 </dd> |
198 <dt><i>directory</i></dt> |
264 <dt><i>directory</i> (str)</dt> |
199 <dd> |
265 <dd> |
200 working directory of the dialog (string) |
266 working directory of the dialog |
201 </dd> |
267 </dd> |
202 <dt><i>filterStr</i></dt> |
268 <dt><i>filterStr</i> (str)</dt> |
203 <dd> |
269 <dd> |
204 filter string for the dialog (string) |
270 filter string for the dialog |
205 </dd> |
271 </dd> |
206 <dt><i>initialFilter</i></dt> |
272 <dt><i>initialFilter</i> (str)</dt> |
207 <dd> |
273 <dd> |
208 initial filter for the dialog (string) |
274 initial filter for the dialog |
209 </dd> |
275 </dd> |
210 <dt><i>options</i></dt> |
276 <dt><i>options</i> (QFileDialog.Options)</dt> |
211 <dd> |
277 <dd> |
212 various options for the dialog (QFileDialog.Options) |
278 various options for the dialog |
213 </dd> |
279 </dd> |
214 </dl> |
280 </dl> |
215 <dl> |
281 <dl> |
216 <dt>Return:</dt> |
282 <dt>Return:</dt> |
217 <dd> |
283 <dd> |
218 name of file to be opened and selected filter (string, string) |
284 name of file to be opened and selected filter |
|
285 </dd> |
|
286 </dl> |
|
287 <dl> |
|
288 <dt>Return Type:</dt> |
|
289 <dd> |
|
290 tuple of (str, str) |
219 </dd> |
291 </dd> |
220 </dl> |
292 </dl> |
221 <div align="right"><a href="#top">Up</a></div> |
293 <div align="right"><a href="#top">Up</a></div> |
222 <hr /> |
294 <hr /> |
223 <hr /> |
295 <hr /> |
228 <p> |
300 <p> |
229 Module function to get a list of names of files for opening. |
301 Module function to get a list of names of files for opening. |
230 </p> |
302 </p> |
231 <dl> |
303 <dl> |
232 |
304 |
233 <dt><i>parent</i></dt> |
305 <dt><i>parent</i> (QWidget)</dt> |
234 <dd> |
306 <dd> |
235 parent widget of the dialog (QWidget) |
307 parent widget of the dialog |
236 </dd> |
308 </dd> |
237 <dt><i>caption</i></dt> |
309 <dt><i>caption</i> (str)</dt> |
238 <dd> |
310 <dd> |
239 window title of the dialog (string) |
311 window title of the dialog |
240 </dd> |
312 </dd> |
241 <dt><i>directory</i></dt> |
313 <dt><i>directory</i> (str)</dt> |
242 <dd> |
314 <dd> |
243 working directory of the dialog (string) |
315 working directory of the dialog |
244 </dd> |
316 </dd> |
245 <dt><i>filterStr</i></dt> |
317 <dt><i>filterStr</i> (str)</dt> |
246 <dd> |
318 <dd> |
247 filter string for the dialog (string) |
319 filter string for the dialog |
248 </dd> |
320 </dd> |
249 <dt><i>options</i></dt> |
321 <dt><i>options</i> (QFileDialog.Options)</dt> |
250 <dd> |
322 <dd> |
251 various options for the dialog (QFileDialog.Options) |
323 various options for the dialog |
252 </dd> |
324 </dd> |
253 </dl> |
325 </dl> |
254 <dl> |
326 <dl> |
255 <dt>Return:</dt> |
327 <dt>Return:</dt> |
256 <dd> |
328 <dd> |
257 list of file names to be opened (list of string) |
329 list of file names to be opened |
|
330 </dd> |
|
331 </dl> |
|
332 <dl> |
|
333 <dt>Return Type:</dt> |
|
334 <dd> |
|
335 list of str |
258 </dd> |
336 </dd> |
259 </dl> |
337 </dl> |
260 <div align="right"><a href="#top">Up</a></div> |
338 <div align="right"><a href="#top">Up</a></div> |
261 <hr /> |
339 <hr /> |
262 <hr /> |
340 <hr /> |
268 Module function to get a list of names of files for opening and the |
346 Module function to get a list of names of files for opening and the |
269 selected file name filter. |
347 selected file name filter. |
270 </p> |
348 </p> |
271 <dl> |
349 <dl> |
272 |
350 |
273 <dt><i>parent</i></dt> |
351 <dt><i>parent</i> (QWidget)</dt> |
274 <dd> |
352 <dd> |
275 parent widget of the dialog (QWidget) |
353 parent widget of the dialog |
276 </dd> |
354 </dd> |
277 <dt><i>caption</i></dt> |
355 <dt><i>caption</i> (str)</dt> |
278 <dd> |
356 <dd> |
279 window title of the dialog (string) |
357 window title of the dialog |
280 </dd> |
358 </dd> |
281 <dt><i>directory</i></dt> |
359 <dt><i>directory</i> (str)</dt> |
282 <dd> |
360 <dd> |
283 working directory of the dialog (string) |
361 working directory of the dialog |
284 </dd> |
362 </dd> |
285 <dt><i>filterStr</i></dt> |
363 <dt><i>filterStr</i> (str)</dt> |
286 <dd> |
364 <dd> |
287 filter string for the dialog (string) |
365 filter string for the dialog |
288 </dd> |
366 </dd> |
289 <dt><i>initialFilter</i></dt> |
367 <dt><i>initialFilter</i> (str)</dt> |
290 <dd> |
368 <dd> |
291 initial filter for the dialog (string) |
369 initial filter for the dialog |
292 </dd> |
370 </dd> |
293 <dt><i>options</i></dt> |
371 <dt><i>options</i> (QFileDialog.Options)</dt> |
294 <dd> |
372 <dd> |
295 various options for the dialog (QFileDialog.Options) |
373 various options for the dialog |
296 </dd> |
374 </dd> |
297 </dl> |
375 </dl> |
298 <dl> |
376 <dl> |
299 <dt>Return:</dt> |
377 <dt>Return:</dt> |
300 <dd> |
378 <dd> |
301 list of file names to be opened and selected filter |
379 list of file names to be opened and selected filter |
302 (list of string, string) |
380 </dd> |
|
381 </dl> |
|
382 <dl> |
|
383 <dt>Return Type:</dt> |
|
384 <dd> |
|
385 tuple of (list of str, str) |
303 </dd> |
386 </dd> |
304 </dl> |
387 </dl> |
305 <div align="right"><a href="#top">Up</a></div> |
388 <div align="right"><a href="#top">Up</a></div> |
306 <hr /> |
389 <hr /> |
307 <hr /> |
390 <hr /> |
312 <p> |
395 <p> |
313 Module function to get the name of a file for saving it. |
396 Module function to get the name of a file for saving it. |
314 </p> |
397 </p> |
315 <dl> |
398 <dl> |
316 |
399 |
317 <dt><i>parent</i></dt> |
400 <dt><i>parent</i> (QWidget)</dt> |
318 <dd> |
401 <dd> |
319 parent widget of the dialog (QWidget) |
402 parent widget of the dialog |
320 </dd> |
403 </dd> |
321 <dt><i>caption</i></dt> |
404 <dt><i>caption</i> (str)</dt> |
322 <dd> |
405 <dd> |
323 window title of the dialog (string) |
406 window title of the dialog |
324 </dd> |
407 </dd> |
325 <dt><i>directory</i></dt> |
408 <dt><i>directory</i> (str)</dt> |
326 <dd> |
409 <dd> |
327 working directory of the dialog (string) |
410 working directory of the dialog |
328 </dd> |
411 </dd> |
329 <dt><i>filterStr</i></dt> |
412 <dt><i>filterStr</i> (str)</dt> |
330 <dd> |
413 <dd> |
331 filter string for the dialog (string) |
414 filter string for the dialog |
332 </dd> |
415 </dd> |
333 <dt><i>options</i></dt> |
416 <dt><i>options</i> (QFileDialog.Options)</dt> |
334 <dd> |
417 <dd> |
335 various options for the dialog (QFileDialog.Options) |
418 various options for the dialog |
336 </dd> |
419 </dd> |
337 </dl> |
420 </dl> |
338 <dl> |
421 <dl> |
339 <dt>Return:</dt> |
422 <dt>Return:</dt> |
340 <dd> |
423 <dd> |
341 name of file to be saved (string) |
424 name of file to be saved |
|
425 </dd> |
|
426 </dl> |
|
427 <dl> |
|
428 <dt>Return Type:</dt> |
|
429 <dd> |
|
430 str |
342 </dd> |
431 </dd> |
343 </dl> |
432 </dl> |
344 <div align="right"><a href="#top">Up</a></div> |
433 <div align="right"><a href="#top">Up</a></div> |
345 <hr /> |
434 <hr /> |
346 <hr /> |
435 <hr /> |
352 Module function to get the name of a file for saving it and the selected |
441 Module function to get the name of a file for saving it and the selected |
353 file name filter. |
442 file name filter. |
354 </p> |
443 </p> |
355 <dl> |
444 <dl> |
356 |
445 |
357 <dt><i>parent</i></dt> |
446 <dt><i>parent</i> (QWidget)</dt> |
358 <dd> |
447 <dd> |
359 parent widget of the dialog (QWidget) |
448 parent widget of the dialog |
360 </dd> |
449 </dd> |
361 <dt><i>caption</i></dt> |
450 <dt><i>caption</i> (str)</dt> |
362 <dd> |
451 <dd> |
363 window title of the dialog (string) |
452 window title of the dialog |
364 </dd> |
453 </dd> |
365 <dt><i>directory</i></dt> |
454 <dt><i>directory</i> (str)</dt> |
366 <dd> |
455 <dd> |
367 working directory of the dialog (string) |
456 working directory of the dialog |
368 </dd> |
457 </dd> |
369 <dt><i>filterStr</i></dt> |
458 <dt><i>filterStr</i> (str)</dt> |
370 <dd> |
459 <dd> |
371 filter string for the dialog (string) |
460 filter string for the dialog |
372 </dd> |
461 </dd> |
373 <dt><i>initialFilter</i></dt> |
462 <dt><i>initialFilter</i> (str)</dt> |
374 <dd> |
463 <dd> |
375 initial filter for the dialog (string) |
464 initial filter for the dialog |
376 </dd> |
465 </dd> |
377 <dt><i>options</i></dt> |
466 <dt><i>options</i> (QFileDialog.Options)</dt> |
378 <dd> |
467 <dd> |
379 various options for the dialog (QFileDialog.Options) |
468 various options for the dialog |
380 </dd> |
469 </dd> |
381 </dl> |
470 </dl> |
382 <dl> |
471 <dl> |
383 <dt>Return:</dt> |
472 <dt>Return:</dt> |
384 <dd> |
473 <dd> |
385 name of file to be saved and selected filter (string, string) |
474 name of file to be saved and selected filte |
|
475 </dd> |
|
476 </dl> |
|
477 <dl> |
|
478 <dt>Return Type:</dt> |
|
479 <dd> |
|
480 tuple of (str, str) |
386 </dd> |
481 </dd> |
387 </dl> |
482 </dl> |
388 <div align="right"><a href="#top">Up</a></div> |
483 <div align="right"><a href="#top">Up</a></div> |
389 <hr /> |
484 <hr /> |
390 </body></html> |
485 </body></html> |