summaryrefslogtreecommitdiffstats
path: root/tdejava/koala/org/trinitydesktop/koala/KFileDialog.java
blob: 9dc71540e92280729af2afeaa5c9af7d725f32dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
//Auto-generated by kalyptus. DO NOT EDIT.
package org.trinitydesktop.koala;

import org.trinitydesktop.qt.Qt;
import org.trinitydesktop.qt.TQMetaObject;
import org.trinitydesktop.qt.QtSupport;
import java.util.ArrayList;
import org.trinitydesktop.qt.TQKeyEvent;
import org.trinitydesktop.qt.TQWidget;

/**

 Provides a user (and developer) friendly way to
 select files and directories.
 The widget can be used as a drop in replacement for the
 TQFileDialog widget, but has greater functionality and a nicer GUI.
 You will usually want to use one of the static methods
 getOpenFileName(), getSaveFileName(), getOpenURL()
 or for multiple files getOpenFileNames() or getOpenURLs().
 The dialog has been designed to allow applications to customise it
 by subclassing. It uses geometry management to ensure that subclasses
 can easily add children that will be incorporated into the layout.
 \image html tdefiledialog.png "KDE File Dialog"
 See {@link KFileDialogSignals} for signals emitted by KFileDialog
		@author Richard J. Moore <rich@kde.org>, Carsten Pfeiffer <pfeiffer@kde.org>

		@short A file selection dialog.

*/
public class KFileDialog extends KDialogBase  {
	protected KFileDialog(Class dummy){super((Class) null);}
	/**
		 Defines some default behavior of the filedialog.
		 E.g. in mode <code>Opening</code> and <code>Saving</code>, the selected files/urls will
		 be added to the "recent documents" list. The Saving mode also implies
		 setKeepLocation() being set.
			 <code>Other</code> means that no default actions are performed.
				@short    Defines some default behavior of the filedialog.
		@see #setOperationMode
		@see #operationMode
	*/
	public static final int Other = 0;
	public static final int Opening = 1;
	public static final int Saving = 2;

	public native TQMetaObject metaObject();
	public native String className();
	/**
		 Constructs a file dialog.
			@param startDir This can either be

			<li>
			The URL of the directory to start in.
			</li>

			<li>
			null to start in the current working
					    directory, or the last directory where a file has been
					    selected.
			</li>

			<li>
			':&lt;keyword&gt;' to start in the directory last used
			             by a filedialog in the same application that specified
			             the same keyword.
			</li>

			<li>
			'.&lt;keyword&gt;' to start in the directory last used
			             by a filedialog in any application that specified the
			             same keyword.
			</li>
				@param filter A shell glob or a mime-type-filter that specifies
		               which files to display.
			@param parent The parent widget of this dialog
			@param name The name of this object
			@param modal Whether to create a modal dialog or not
		 See setFilter() for details on how to use this argument.
			      		@short    Constructs a file dialog.
	*/
	public KFileDialog(String startDir, String filter, TQWidget parent, String name, boolean modal) {
		super((Class) null);
		newKFileDialog(startDir,filter,parent,name,modal);
	}
	private native void newKFileDialog(String startDir, String filter, TQWidget parent, String name, boolean modal);
	/**
		 Constructs a file dialog.
			 The parameters here are identical to the first constructor except
		 for the addition of a TQWidget parameter.
			 Historical note: The original version of KFileDialog did not have this extra
		 parameter. It was added later, and, in order to maintain binary compatibility,
		 it was placed in a new constructor instead of added to the original one.
			@param startDir This can either be

			<li>
			The URL of the directory to start in.
			</li>

			<li>
			null to start in the current working
			             directory, or the last directory where a file has been
			             selected.
			</li>

			<li>
			':&lt;keyword&gt;' to start in the directory last used
			             by a filedialog in the same application that specified
			             the same keyword.
			</li>

			<li>
			'.&lt;keyword&gt;' to start in the directory last used
			             by a filedialog in any application that specified the
			             same keyword.
			</li>
				@param filter A shell glob or a mime-type-filter that specifies
		               which files to display.
		 See setFilter() for details on how to use this argument.
			@param widget A widget, or a widget of widgets, for displaying custom
		               data in the dialog. This can be used, for example, to
		               display a check box with the caption "Open as read-only".
		               When creating this widget, you don't need to specify a parent,
		               since the widget's parent will be set automatically by KFileDialog.
			@param parent The parent widget of this dialog
			@param name The name of this object
			@param modal Whether to create a modal dialog or not
				@short    Constructs a file dialog.
	*/
	public KFileDialog(String startDir, String filter, TQWidget parent, String name, boolean modal, TQWidget widget) {
		super((Class) null);
		newKFileDialog(startDir,filter,parent,name,modal,widget);
	}
	private native void newKFileDialog(String startDir, String filter, TQWidget parent, String name, boolean modal, TQWidget widget);
	/**
				@return The selected fully qualified filename.

		@short
	*/
	public native KURL selectedURL();
	/**
				@return The list of selected URLs.

		@short
	*/
	public native ArrayList selectedURLs();
	/**
				@return the currently shown directory.

		@short
	*/
	public native KURL baseURL();
	/**
		 Returns the full path of the selected file in the local filesystem.
		 (Local files only)
		     		@short    Returns the full path of the selected file in the local filesystem.
	*/
	public native String selectedFile();
	/**
		 Returns a list of all selected local files.
		     		@short    Returns a list of all selected local files.
	*/
	public native ArrayList selectedFiles();
	/**
		 Sets the directory to view.
			@param url URL to show.
			@param clearforward Indicates whether the forward queue
		 should be cleared.
		     		@short    Sets the directory to view.
	*/
	public native void setURL(KURL url, boolean clearforward);
	public native void setURL(KURL url);
	/**
		 Sets the file name to preselect to <code>name</code>
			 This takes absolute URLs and relative file names.
		     		@short    Sets the file name to preselect to <code>name</code>
	*/
	public native void setSelection(String name);
	/**
		 Sets the operational mode of the filedialog to <code>Saving</code>, <code>Opening</code>
		 or <code>Other.</code> This will set some flags that are specific to loading
		 or saving files. E.g. setKeepLocation() makes mostly sense for
		 a save-as dialog. So setOperationMode( KFileDialog.Saving ); sets
		 setKeepLocation for example.
			 The mode <code>Saving</code>, together with a default filter set via
		 setMimeFilter() will make the filter combobox read-only.
			 The default mode is <code>Opening.</code>
			 Call this method right after instantiating KFileDialog.
				@short    Sets the operational mode of the filedialog to <code>Saving</code>, <code>Opening</code>  or <code>Other.</code>
		@see #operationMode
		@see KFileDialog#OperationMode
	*/
	public native void setOperationMode(int arg1);
	/**
				@return the current operation mode, Opening, Saving or Other. Default
 is Other.

		@short
		@see #operationMode
		@see KFileDialog#OperationMode
	*/
	public native int operationMode();
	/**
		 Sets whether the filename/url should be kept when changing directories.
		 This is for example useful when having a predefined filename where
		 the full path for that file is searched.
			 This is implicitly set when operationMode() is KFileDialog.Saving
			 getSaveFileName() and getSaveURL() set this to true by default, so that
		 you can type in the filename and change the directory without having
		 to type the name again.
		     		@short    Sets whether the filename/url should be kept when changing directories.
	*/
	public native void setKeepLocation(boolean keep);
	/**
				@return whether the contents of the location edit are kept when
 changing directories.

		@short
	*/
	public native boolean keepsLocation();
	/**
		 Sets the filter to be used to <code>filter.</code>
			 You can set more
		 filters for the user to select separated by '\n'. Every
		 filter entry is defined through namefilter|text to diplay.
		 If no | is found in the expression, just the namefilter is
		 shown. Examples:
			 <pre>
		 tdefile.setFilter("*.cpp|C++ Source Files\n.h|Header files");
		 tdefile.setFilter("*.cpp");
		 tdefile.setFilter("*.cpp|Sources (.cpp)");
		 tdefile.setFilter("*.cpp|" + i18n("Sources (.cpp)"));
		 tdefile.setFilter("*.cpp .cc .C|C++ Source Files\n.h .H|Header files");
		 </pre>
			 Note: The text to display is not parsed in any way. So, if you
		 want to show the suffix to select by a specific filter, you must
		 repeat it.
			 If the filter contains an unescaped '/', a mimetype-filter is assumed.
		 If you would like a '/' visible in your filter it can be escaped with
		 a '\'. You can specify multiple mimetypes like this (separated with
		 space):
			 <pre>
		 tdefile.setFilter( "image/png text/html text/plain" );
		 tdefile.setFilter( "*.cue|CUE\\/BIN Files (.cue)" );
		 </pre>
				@short    Sets the filter to be used to <code>filter.</code>
		@see #filterChanged
		@see #setMimeFilter
	*/
	public native void setFilter(String filter);
	/**
		 Returns the current filter as entered by the user or one of the
		 predefined set via setFilter().
				@short    Returns the current filter as entered by the user or one of the  predefined set via setFilter().
		@see #setFilter
		@see #filterChanged
	*/
	public native String currentFilter();
	/**
		 Returns the mimetype for the desired output format.
			 This is only valid if setFilterMimeType() has been called
		 previously.
				@short    Returns the mimetype for the desired output format.
		@see #setFilterMimeType
	*/
	// KMimeType::Ptr currentFilterMimeType(); >>>> NOT CONVERTED
	/**
		 Sets the filter up to specify the output type.
			@param types a list of mimetypes that can be used as output format
			@param defaultType the default mimetype to use as output format, if any.
		 If <code>defaultType</code> is set, it will be set as the current item.
		 Otherwise, a first item showing all the mimetypes will be created.
		 Typically, <code>defaultType</code> should be empty for loading and set for saving.
			 Do not use in conjunction with setFilter()
		     		@short    Sets the filter up to specify the output type.
	*/
	public native void setMimeFilter(String[] types, String defaultType);
	public native void setMimeFilter(String[] types);
	/**
		 The mimetype for the desired output format.
			 This is only valid if setMimeFilter() has been called
		 previously.
				@short    The mimetype for the desired output format.
		@see #setMimeFilter
	*/
	public native String currentMimeFilter();
	/**
		  Clears any mime- or namefilter. Does not reload the directory.
		     		@short     Clears any mime- or namefilter.
	*/
	public native void clearFilter();
	/**
		 Adds a preview widget and enters the preview mode.
			 In this mode the dialog is split and the right part contains your
		 preview widget.
			 Ownership is transferred to KFileDialog. You need to create the
		 preview-widget with "new", i.e. on the heap.
			@param w The widget to be used for the preview.
		     		@short    Adds a preview widget and enters the preview mode.
	*/
	public native void setPreviewWidget(KPreviewWidgetBase w);
	public native void show();
	/**
		 Convenient overload of the other setMode(unsigned int) method.
		     		@short    Convenient overload of the other setMode(unsigned int) method.
	*/
	public native void setMode(int m);
	/**
		 Returns the mode of the filedialog.
				@short    Returns the mode of the filedialog.
		@see #setMode
	*/
	public native int mode();
	/**
		 Sets the text to be displayed in front of the selection.
			 The default is "Location".
		 Most useful if you want to make clear what
		 the location is used for.
		     		@short    Sets the text to be displayed in front of the selection.
	*/
	public native void setLocationLabel(String text);
	/**
		 Returns a pointer to the toolbar.
			 You can use this to insert custom
		 items into it, e.g.:
		 <pre>
		      yourAction = new TDEAction( i18n("Your Action"), 0,
		                                this, SLOT("yourSlot()"),
		                                this, "action name" );
		      yourAction.plug( tdefileDialog.toolBar() );
		 </pre>
		     		@short    Returns a pointer to the toolbar.
	*/
	public native TDEToolBar toolBar();
	/**
				@return a pointer to the OK-Button in the filedialog. You may use it
 e.g. to set a custom text to it.

		@short
	*/
	public native KPushButton okButton();
	/**
				@return a pointer to the Cancel-Button in the filedialog. You may use
 it e.g. to set a custom text to it.

		@short
	*/
	public native KPushButton cancelButton();
	/**
			 Note that this method may return a null-pointer if the user configured
		 to not use the speed-bar.
				@return the KURLBar object used as the "speed bar". You can add custom
 entries to it like that:
 <pre>
 KURLBar *urlBar = fileDialog.speedBar();
 if ( urlBar )
     urlBar.insertDynamicItem( someURL, i18n("The URL's description") );
 </pre>

		@short
		@see KURLBar
		@see KURLBar#insertDynamicItem
	*/
	public native KURLBar speedBar();
	/**
				@return a pointer to the action collection, holding all the used
 TDEActions.

		@short
	*/
	public native TDEActionCollection actionCollection();
	/**
				@return the index of the path combobox so when inserting widgets into
 the dialog (e.g. subclasses) they can do so without hardcoding in an index

		@short
	*/
	public native int pathComboIndex();
	/**
		 Creates a modal file dialog and return the selected
		 filename or an empty string if none was chosen.
			 Note that with
		 this method the user must select an existing filename.
			@param startDir This can either be

			<li>
			The URL of the directory to start in.
			</li>

			<li>
			null to start in the current working
					    directory, or the last directory where a file has been
					    selected.
			</li>

			<li>
			':&lt;keyword&gt;' to start in the directory last used
			             by a filedialog in the same application that specified
			             the same keyword.
			</li>

			<li>
			'.&lt;keyword&gt;' to start in the directory last used
			             by a filedialog in any application that specified the
			             same keyword.
			</li>
				@param filter This is a space separated list of shell globs.
		 You can set the text to be displayed for the glob, and
		 provide multiple globs.  See setFilter() for details on
		 how to do this...
			@param parent The widget the dialog will be centered on initially.
			@param caption The name of the dialog widget.
		     		@short    Creates a modal file dialog and return the selected  filename or an empty string if none was chosen.
	*/
	public static native String getOpenFileName(String startDir, String filter, TQWidget parent, String caption);
	public static native String getOpenFileName(String startDir, String filter, TQWidget parent);
	public static native String getOpenFileName(String startDir, String filter);
	public static native String getOpenFileName(String startDir);
	public static native String getOpenFileName();
	/**
		 Use this version only if you have no TQWidget available as
		 parent widget. This can be the case if the parent widget is
		 a widget in another process or if the parent widget is a
		 non-Qt widget. For example, in a GTK program.
				@short    Use this version only if you have no TQWidget available as  parent widget.
	*/
	public static native String getOpenFileNameWId(String startDir, String filter, long parent_id, String caption);
	/**
		 Creates a modal file dialog and returns the selected
		 filenames or an empty list if none was chosen.
			 Note that with
		 this method the user must select an existing filename.
			@param startDir This can either be

			<li>
			The URL of the directory to start in.
			</li>

			<li>
			null to start in the current working
					    directory, or the last directory where a file has been
					    selected.
			</li>

			<li>
			':&lt;keyword&gt;' to start in the directory last used
			             by a filedialog in the same application that specified
			             the same keyword.
			</li>

			<li>
			'.&lt;keyword&gt;' to start in the directory last used
			             by a filedialog in any application that specified the
			             same keyword.
			</li>
				@param filter This is a space separated list of shell globs.
		 You can set the text to be displayed for the glob, and
		 provide multiple globs.  See setFilter() for details on
		 how to do this...
			@param parent The widget the dialog will be centered on initially.
			@param caption The name of the dialog widget.
		     		@short    Creates a modal file dialog and returns the selected  filenames or an empty list if none was chosen.
	*/
	public static native ArrayList getOpenFileNames(String startDir, String filter, TQWidget parent, String caption);
	public static native ArrayList getOpenFileNames(String startDir, String filter, TQWidget parent);
	public static native ArrayList getOpenFileNames(String startDir, String filter);
	public static native ArrayList getOpenFileNames(String startDir);
	public static native ArrayList getOpenFileNames();
	/**
		 Creates a modal file dialog and returns the selected
		 URL or an empty string if none was chosen.
			 Note that with
		 this method the user must select an existing URL.
			@param startDir This can either be

			<li>
			The URL of the directory to start in.
			</li>

			<li>
			null to start in the current working
					    directory, or the last directory where a file has been
					    selected.
			</li>

			<li>
			':&lt;keyword&gt;' to start in the directory last used
			             by a filedialog in the same application that specified
			             the same keyword.
			</li>

			<li>
			'.&lt;keyword&gt;' to start in the directory last used
			             by a filedialog in any application that specified the
			             same keyword.
			</li>
				@param filter This is a space separated list of shell globs.
		 You can set the text to be displayed for the glob, and
		 provide multiple globs.  See setFilter() for details on
		 how to do this...
			@param parent The widget the dialog will be centered on initially.
			@param caption The name of the dialog widget.
		     		@short    Creates a modal file dialog and returns the selected  URL or an empty string if none was chosen.
	*/
	public static native KURL getOpenURL(String startDir, String filter, TQWidget parent, String caption);
	public static native KURL getOpenURL(String startDir, String filter, TQWidget parent);
	public static native KURL getOpenURL(String startDir, String filter);
	public static native KURL getOpenURL(String startDir);
	public static native KURL getOpenURL();
	/**
		 Creates a modal file dialog and returns the selected
		 URLs or an empty list if none was chosen.
			 Note that with
		 this method the user must select an existing filename.
			@param startDir This can either be

			<li>
			The URL of the directory to start in.
			</li>

			<li>
			null to start in the current working
					    directory, or the last directory where a file has been
					    selected.
			</li>

			<li>
			':&lt;keyword&gt;' to start in the directory last used
			             by a filedialog in the same application that specified
			             the same keyword.
			</li>

			<li>
			'.&lt;keyword&gt;' to start in the directory last used
			             by a filedialog in any application that specified the
			             same keyword.
			</li>
				@param filter This is a space separated list of shell globs.
		 You can set the text to be displayed for the glob, and
		 provide multiple globs.  See setFilter() for details on
		 how to do this...
			@param parent The widget the dialog will be centered on initially.
			@param caption The name of the dialog widget.
		     		@short    Creates a modal file dialog and returns the selected  URLs or an empty list if none was chosen.
	*/
	public static native ArrayList getOpenURLs(String startDir, String filter, TQWidget parent, String caption);
	public static native ArrayList getOpenURLs(String startDir, String filter, TQWidget parent);
	public static native ArrayList getOpenURLs(String startDir, String filter);
	public static native ArrayList getOpenURLs(String startDir);
	public static native ArrayList getOpenURLs();
	/**
		 Creates a modal file dialog and returns the selected
		 filename or an empty string if none was chosen.
			 Note that with this
		 method the user need not select an existing filename.
			@param startDir This can either be

			<li>
			The URL of the directory to start in.
			</li>

			<li>
			a relative path or a filename determining the
			             directory to start in and the file to be selected.
			</li>

			<li>
			null to start in the current working
					    directory, or the last directory where a file has been
					    selected.
			</li>

			<li>
			':&lt;keyword&gt;' to start in the directory last used
			             by a filedialog in the same application that specified
			             the same keyword.
			</li>

			<li>
			'.&lt;keyword&gt;' to start in the directory last used
			             by a filedialog in any application that specified the
			             same keyword.
			</li>
				@param filter This is a space separated list of shell globs.
		 You can set the text to be displayed for the glob, and
		 provide multiple globs.  See setFilter() for details on
		 how to do this...
			@param parent The widget the dialog will be centered on initially.
			@param caption The name of the dialog widget.
		     		@short    Creates a modal file dialog and returns the selected  filename or an empty string if none was chosen.
	*/
	public static native String getSaveFileName(String startDir, String filter, TQWidget parent, String caption);
	public static native String getSaveFileName(String startDir, String filter, TQWidget parent);
	public static native String getSaveFileName(String startDir, String filter);
	public static native String getSaveFileName(String startDir);
	public static native String getSaveFileName();
	/**
		 This function accepts the window id of the parent window, instead
		 of TQWidget. It should be used only when necessary.
				@short    This function accepts the window id of the parent window, instead  of TQWidget .
	*/
	public static native String getSaveFileNameWId(String dir, String filter, long parent_id, String caption);
	/**
		 Creates a modal file dialog and returns the selected
		 filename or an empty string if none was chosen.
			 Note that with this
		 method the user need not select an existing filename.
			@param startDir This can either be

			<li>
			The URL of the directory to start in.
			</li>

			<li>
			a relative path or a filename determining the
			             directory to start in and the file to be selected.
			</li>

			<li>
			null to start in the current working
					    directory, or the last directory where a file has been
					    selected.
			</li>

			<li>
			':&lt;keyword&gt;' to start in the directory last used
			             by a filedialog in the same application that specified
			             the same keyword.
			</li>

			<li>
			'.&lt;keyword&gt;' to start in the directory last used
			             by a filedialog in any application that specified the
			             same keyword.
			</li>
				@param filter This is a space separated list of shell globs.
		 You can set the text to be displayed for the glob, and
		 provide multiple globs.  See setFilter() for details on
		 how to do this...
			@param parent The widget the dialog will be centered on initially.
			@param caption The name of the dialog widget.
		     		@short    Creates a modal file dialog and returns the selected  filename or an empty string if none was chosen.
	*/
	public static native KURL getSaveURL(String startDir, String filter, TQWidget parent, String caption);
	public static native KURL getSaveURL(String startDir, String filter, TQWidget parent);
	public static native KURL getSaveURL(String startDir, String filter);
	public static native KURL getSaveURL(String startDir);
	public static native KURL getSaveURL();
	/**
		 Creates a modal file dialog and returns the selected
		 directory or an empty string if none was chosen.
			@param startDir This can either be

			<li>
			The URL of the directory to start in.
			</li>

			<li>
			null to start in the current working
					    directory, or the last directory where a file has been
					    selected.
			</li>

			<li>
			':&lt;keyword&gt;' to start in the directory last used
			             by a filedialog in the same application that specified
			             the same keyword.
			</li>

			<li>
			'.&lt;keyword&gt;' to start in the directory last used
			             by a filedialog in any application that specified the
			             same keyword.
			</li>
				@param parent The widget the dialog will be centered on initially.
			@param caption The name of the dialog widget.
		     		@short    Creates a modal file dialog and returns the selected  directory or an empty string if none was chosen.
	*/
	public static native String getExistingDirectory(String startDir, TQWidget parent, String caption);
	public static native String getExistingDirectory(String startDir, TQWidget parent);
	public static native String getExistingDirectory(String startDir);
	public static native String getExistingDirectory();
	/**
		 Creates a modal file dialog and returns the selected
		 directory or an empty string if none was chosen.
			 Contrary to getExistingDirectory(), this method allows the
		 selection of a remote directory.
			@param startDir This can either be

			<li>
			The URL of the directory to start in.
			</li>

			<li>
			null to start in the current working
					    directory, or the last directory where a file has been
					    selected.
			</li>

			<li>
			':&lt;keyword&gt;' to start in the directory last used
			             by a filedialog in the same application that specified
			             the same keyword.
			</li>

			<li>
			'.&lt;keyword&gt;' to start in the directory last used
			             by a filedialog in any application that specified the
			             same keyword.
			</li>
				@param parent The widget the dialog will be centered on initially.
			@param caption The name of the dialog widget.
				@short    Creates a modal file dialog and returns the selected  directory or an empty string if none was chosen.
	*/
	public static native KURL getExistingURL(String startDir, TQWidget parent, String caption);
	public static native KURL getExistingURL(String startDir, TQWidget parent);
	public static native KURL getExistingURL(String startDir);
	public static native KURL getExistingURL();
	/**
		 Creates a modal file dialog with an image previewer and returns the
		 selected url or an empty string if none was chosen.
			@param startDir This can either be

			<li>
			The URL of the directory to start in.
			</li>

			<li>
			null to start in the current working
					    directory, or the last directory where a file has been
					    selected.
			</li>

			<li>
			':&lt;keyword&gt;' to start in the directory last used
			             by a filedialog in the same application that specified
			             the same keyword.
			</li>

			<li>
			'.&lt;keyword&gt;' to start in the directory last used
			             by a filedialog in any application that specified the
			             same keyword.
			</li>
				@param parent The widget the dialog will be centered on initially.
			@param caption The name of the dialog widget.
		     		@short    Creates a modal file dialog with an image previewer and returns the  selected url or an empty string if none was chosen.
	*/
	public static native KURL getImageOpenURL(String startDir, TQWidget parent, String caption);
	public static native KURL getImageOpenURL(String startDir, TQWidget parent);
	public static native KURL getImageOpenURL(String startDir);
	public static native KURL getImageOpenURL();
	/**
		 This method implements the logic to determine the user's default directory
		 to be listed. E.g. the documents direcory, home directory or a recently
		 used directory.
			@param startDir A url/directory, to be used. May use the ':' and '.' syntax
		        as documented in the KFileDialog() constructor.
			@param recentDirClass If the ':' or '.' syntax is used, recentDirClass
		        will contain the string to be used later for TDERecentDir.dir()
				@return The URL that should be listed by default (e.g. by KFileDialog or
         KDirSelectDialog).

		@short    This method implements the logic to determine the user's default directory  to be listed.
	*/
	public static native KURL getStartURL(String startDir, StringBuffer recentDirClass);
	/**
			 Used by KDirSelectDialog to share the dialog's start directory.
		     		@short
	*/
	public static native void setStartDir(KURL directory);
	/**
		 Reimplemented to animate the cancel button.
		     		@short    Reimplemented to animate the cancel button.
	*/
	protected native void keyPressEvent(TQKeyEvent e);
	/**
		 Perform basic initialization tasks. Called by constructors.
				@short    Perform basic initialization tasks.
	*/
	protected native void init(String startDir, String filter, TQWidget widget);
	/**
		 rebuild geometry management.
			      		@short    rebuild geometry management.
	*/
	protected native void initGUI();
	/**
		 called when an item is highlighted/selected in multiselection mode.
		 handles setting the locationEdit.
		     		@short    called when an item is highlighted/selected in multiselection mode.
	*/
	protected native void multiSelectionChanged();
	/**
		 Reads configuration and applies it (size, recent directories, ...)
		     		@short    Reads configuration and applies it (size, recent directories, .
	*/
	protected native void readConfig(TDEConfig arg1, String group);
	protected native void readConfig(TDEConfig arg1);
	/**
		 Saves the current configuration
		     		@short    Saves the current configuration
	*/
	protected native void writeConfig(TDEConfig arg1, String group);
	protected native void writeConfig(TDEConfig arg1);
	/**
		 Reads the recent used files and inserts them into the location combobox
		     		@short    Reads the recent used files and inserts them into the location combobox
	*/
	protected native void readRecentFiles(TDEConfig arg1);
	/**
		 Saves the entries from the location combobox.
		     		@short    Saves the entries from the location combobox.
	*/
	protected native void saveRecentFiles(TDEConfig arg1);
	/**
		 Parses the string "line" for files. If line doesn't contain any ", the
		 whole line will be interpreted as one file. If the number of " is odd,
		 an empty list will be returned. Otherwise, all items enclosed in " "
		 will be returned as correct urls.
		     		@short    Parses the string "line" for files.
	*/
	protected native ArrayList tokenize(String line);
	/**
		 Returns the absolute version of the URL specified in locationEdit.
				@short    Returns the absolute version of the URL specified in locationEdit.
	*/
	protected native KURL getCompleteURL(String arg1);
	/**
		 Returns the filename extension associated with the currentFilter().
		 null is returned if an extension is not available or if
		 operationMode() != Saving.
				@short    Returns the filename extension associated with the currentFilter().
	*/
	protected native String currentFilterExtension();
	/**
		 Updates the currentFilterExtension and the availability of the
		 Automatically Select Extension Checkbox (visible if operationMode()
		 == Saving and enabled if an extension _will_ be associated with the
		 currentFilter(), _after_ this call).  You should call this after
		 filterWidget.setCurrentItem().
				@short    Updates the currentFilterExtension and the availability of the  Automatically Select Extension Checkbox (visible if operationMode()  == Saving and enabled if an extension _will_ be associated with the  currentFilter(), _after_ this call).
	*/
	protected native void updateAutoSelectExtension();
	protected native ArrayList parseSelectedURLs();
	protected native void urlEntered(KURL arg1);
	protected native void enterURL(KURL url);
	protected native void enterURL(String url);
	protected native void locationActivated(String url);
	protected native void slotFilterChanged();
	protected native void fileHighlighted(KFileItem i);
	protected native void fileSelected(KFileItem i);
	protected native void slotStatResult(Job job);
	protected native void slotLoadingFinished();
	protected native void fileCompletion(String arg1);
	/**
				@short
	*/
	protected native void toggleSpeedbar(boolean arg1);
	/**
				@short
	*/
	protected native void toggleBookmarks(boolean show);
	protected native void slotOk();
	protected native void accept();
	protected native void slotCancel();
	protected native void slotAutoSelectExtClicked();
	protected native void addToRecentDocuments();
	protected native void initSpeedbar();
	/** Deletes the wrapped C++ instance */
	protected native void finalize() throws InternalError;
	/** Delete the wrapped C++ instance ahead of finalize() */
	public native void dispose();
	/** Has the wrapped C++ instance been deleted? */
	public native boolean isDisposed();
}