/***************************************************************************
                            QFileDialog.java -  description
                             -------------------
    begin                : Wed Nov 21 17:05:56 2001
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Wed Nov 21 17:05:56 2001, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
***************************************************************************/

package org.kde.qt;

import java.util.*;
import java.lang.Error;

/**
 See {@link QFileDialogSignals} for signals emitted by QFileDialog.

 See {@link QFileDialogEventHandling} for event handlers to override in subclasses of QFileDialog.

*/
public class QFileDialog extends QDialog  {
	protected QFileDialog(Class dummy){super((Class) null);}

	private native void newQFileDialog( String dirName, String filter, QWidget parent, String name, boolean modal);
	public QFileDialog( String dirName, String filter, QWidget parent, String name, boolean modal) {
		super((Class) null);
		newQFileDialog( dirName, filter, parent, name, modal);
	}
	private native void newQFileDialog( String dirName);
	public QFileDialog( String dirName) {
		super((Class) null);
		newQFileDialog( dirName);
	}
	private native void newQFileDialog( QWidget parent, String name, boolean modal);
	public QFileDialog( QWidget parent, String name, boolean modal) {
		super((Class) null);
		newQFileDialog( parent, name, modal);
	}
	private native void newQFileDialog();
	public QFileDialog() {
		super((Class) null);
		newQFileDialog();
	}
	protected native void finalize() throws InternalError;
	public native String selectedFile();
	public native String selectedFilter();
	public native void setSelectedFilter( String arg1);
	public native void setSelectedFilter( int arg1);
	public native void setSelection( String arg1);
	public native void selectAll( boolean b);
	public native ArrayList selectedFiles();
	public native String dirPath();
	public native void setDir( QDir arg1);
	public native QDir dir();
	public native void setShowHiddenFiles( boolean s);
	public native boolean showHiddenFiles();
	public native void rereadDir();
	public native void resortDir();
	public native void setMode( int arg1);
	public native int mode();
	public native void setViewMode( int m);
	public native int viewMode();
	public native void setPreviewMode( int m);
	public native int previewMode();
	public native boolean eventFilter( QObject arg1, QEvent arg2);
	public native boolean isInfoPreviewEnabled();
	public native boolean isContentsPreviewEnabled();
	public native void setInfoPreviewEnabled( boolean arg1);
	public native void setContentsPreviewEnabled( boolean arg1);
	public native void setInfoPreview( QWidget w, QFilePreview preview);
	public native void setContentsPreview( QWidget w, QFilePreview preview);
	public native QUrlInterface url();
	public native void addFilter( String filter);
	public native void done( int arg1);
	public native void setDir( String arg1);
	public native void setUrl( QUrlOperator url);
	public native void setFilter( String arg1);
	public native void setFilters( String arg1);
//	public native void setFilters( String arg1);
	public native void setFilters( String[] arg1);
	public static native String getOpenFileName( String initially, String filter, QWidget parent, String name, String caption, String selectedFilter, boolean resolveSymlinks);
	public static String getOpenFileName( String initially, String filter, QWidget parent, String name, String caption, String selectedFilter) {
		return getOpenFileName(initially, filter, parent, name, caption, selectedFilter, true);
	}
	public static String getOpenFileName( String initially, String filter, QWidget parent, String name, String caption) {
		return getOpenFileName(initially, filter, parent, name, caption, null, true);
	}
	public static String getOpenFileName( String initially, String filter, QWidget parent, String name) {
		return getOpenFileName(initially, filter, parent, name, "", null, true);
	}
	public static String getOpenFileName( String initially, String filter, QWidget parent) {
		return getOpenFileName(initially, filter, parent, null, "", null, true);
	}
	public static String getOpenFileName( String initially, String filter) {
		return getOpenFileName(initially, filter, null, null, "", null, true);
	}
	public static String getOpenFileName( String initially) {
		return getOpenFileName(initially, "", null, null, "", null, true);
	}
	public static String getOpenFileName( ) {
		return getOpenFileName("", "", null, null, "", null, true);
	}
	public static native String getSaveFileName( String initially, String filter, QWidget parent, String name, String caption, String selectedFilter, boolean resolveSymlinks);
	public static String getSaveFileName( String initially, String filter, QWidget parent, String name, String caption, String selectedFilter) {
		return getSaveFileName(initially, filter, parent, name, caption, selectedFilter, true);
	}
	public static String getSaveFileName( String initially, String filter, QWidget parent, String name, String caption) {
		return getSaveFileName(initially, filter, parent, name, caption, null, true);
	}
	public static String getSaveFileName( String initially, String filter, QWidget parent, String name) {
		return getSaveFileName(initially, filter, parent, name, "", null, true);
	}
	public static String getSaveFileName( String initially, String filter, QWidget parent) {
		return getSaveFileName(initially, filter, parent, null, "", null, true);
	}
	public static String getSaveFileName( String initially, String filter) {
		return getSaveFileName(initially, filter, null, null, "", "", true);
	}
	public static String getSaveFileName( String initially) {
		return getSaveFileName(initially, "", null, null, "", "", true);
	}
	public static String getSaveFileName() {
		return getSaveFileName("", "", null, null, "", "", true);
	}
	public static native String getExistingDirectory( String dir, QWidget parent, String name, String caption, boolean dirOnly, boolean resolveSymlinks);
	public static String getExistingDirectory( String dir, QWidget parent) {
		return getExistingDirectory(dir, parent, "", "", true, true);
	}
	public static native ArrayList getOpenFileNames( String filter, String dir, QWidget parent, String name, String caption, String selectedFilter, boolean resolveSymlinks);
	public static ArrayList getOpenFileNames( String filter, String dir, QWidget parent) {
		return getOpenFileNames(filter, dir, parent, "", "", "", true);
	}
	public static native void setIconProvider( QFileIconProvider arg1);
	public static native QFileIconProvider iconProvider();
	protected native void addWidgets( QLabel arg1, QWidget arg2, QPushButton arg3);
	protected native void addToolButton( QButton b, boolean separator);
	protected native void addToolButton( QButton b);
	protected native void addLeftWidget( QWidget w);
	protected native void addRightWidget( QWidget w);
	public static final int AnyFile = 0;
	public static final int ExistingFile = 1;
	public static final int Directory = 2;
	public static final int ExistingFiles = 3;
	public static final int DirectoryOnly = 4;
	public static final int Detail = 0;
	public static final int List = 1;
	public static final int NoPreview = 0;
	public static final int Contents = 1;
	public static final int Info = 2;
}
