<class name="QFileDialog" doc="/** <p>The <a href="QFileDialog.html#QFileDialog(com.trolltech.qt.gui.QWidget, java.lang.String, java.lang.String, java.lang.String)"><tt>QFileDialog</tt></a> class provides a dialog that allow users to select files or directories.</p> <p>The <a href="QFileDialog.html#QFileDialog(com.trolltech.qt.gui.QWidget, java.lang.String, java.lang.String, java.lang.String)"><tt>QFileDialog</tt></a> class enables a user to traverse the file system in order to select one or many files or a directory.</p> <p>The easiest way to create a <a href="QFileDialog.html#QFileDialog(com.trolltech.qt.gui.QWidget, java.lang.String, java.lang.String, java.lang.String)"><tt>QFileDialog</tt></a> is to use the static functions. On Windows, these static functions will call the native Windows file dialog, and on Mac OS X these static function will call the native Mac OS X file dialog.</p> <pre> fileName = QFileDialog::getOpenFileName(this, tr(&quot;Open Image&quot;), &quot;/home/jana&quot;, tr(&quot;Image Files (*.png *.jpg *.bmp)&quot;));</pre> <p>In the above example, a modal <a href="QFileDialog.html#QFileDialog(com.trolltech.qt.gui.QWidget, java.lang.String, java.lang.String, java.lang.String)"><tt>QFileDialog</tt></a> is created using a static function. The dialog initially displays the contents of the &quot;/home/jana&quot; directory, and displays files matching the patterns given in the string &quot;Image Files (*.png *.jpg *.bmp)&quot;. The parent of the file dialog is set to <i>this</i>, and the window title is set to &quot;Open Image&quot;.</p> <p>If you want to use multiple filters, separate each one with <i>two</i> semicolons. For example:</p> <pre> &quot;Images (*.png *.xpm *.jpg);;Text files (*.txt);;XML files (*.xml)&quot;</pre> <p>You can create your own <a href="QFileDialog.html#QFileDialog(com.trolltech.qt.gui.QWidget, java.lang.String, java.lang.String, java.lang.String)"><tt>QFileDialog</tt></a> without using the static functions. By calling <a href="QFileDialog.html#setFileMode(com.trolltech.qt.gui.QFileDialog.FileMode)"><tt>setFileMode</tt></a>, you can specify what the user must select in the dialog:</p> <pre> QFileDialog dialog(this); dialog.setFileMode(QFileDialog::AnyFile);</pre> <p>In the above example, the mode of the file dialog is set to <a href="QFileDialog.html#FileMode-enum"><tt>AnyFile</tt></a>, meaning that the user can select any file, or even specify a file that doesn't exist. This mode is useful for creating a &quot;Save As&quot; file dialog. Use <a href="QFileDialog.html#FileMode-enum"><tt>ExistingFile</tt></a> if the user must select an existing file, or <a href="QFileDialog.html#FileMode-enum">Directory</tt></a> if only a directory may be selected. See the <tt>QFileDialog::FileMode</tt> enum for the complete list of modes.</p> <p>The <a href="QFileDialog.html#fileMode()"><tt>fileMode</tt></a> property contains the mode of operation for the dialog; this indicates what types of objects the user is expected to select. Use <a href="QFileDialog.html#setFilter(java.lang.String)"><tt>setFilter</tt></a> to set the dialog's file filter. For example:</p> <pre> dialog.setFilter(tr(&quot;Images (*.png *.xpm *.jpg)&quot;));</pre> <p>In the above example, the filter is set to <tt>&quot;Images (*.png *.xpm *.jpg)&quot;</tt>, this means that only files with the extension <tt>png</tt>, <tt>xpm</tt>, or <tt>jpg</tt> will be shown in the <a href="QFileDialog.html#QFileDialog(com.trolltech.qt.gui.QWidget, java.lang.String, java.lang.String, java.lang.String)"><tt>QFileDialog</tt></a>. You can apply several filters by using <a href="QFileDialog.html#setFilters(java.util.List<java.lang.String>)"><tt>setFilters</tt></a>. Use <a href="QFileDialog.html#selectFilter(java.lang.String)"><tt>selectFilter</tt></a> to select one of the filters you've given as the file dialog's default filter.</p> <p>The file dialog has two view modes: List</tt> and Detail</tt>. List</tt> presents the contents of the current directory as a list of file and directory names. Detail</tt> also displays a list of file and directory names, but provides additional information alongside each name, such as the file size and modification date. Set the mode with <a href="QFileDialog.html#setViewMode(com.trolltech.qt.gui.QFileDialog.ViewMode)"><tt>setViewMode</tt></a>:</p> <pre> dialog.setViewMode(QFileDialog::Detail);</pre> <p>The last important function you will need to use when creating your own file dialog is <a href="QFileDialog.html#selectedFiles()"><tt>selectedFiles</tt></a>.</p> <pre> QStringList fileNames; if (dialog.exec()) fileNames = dialog.selectedFiles();</pre> <p>In the above example, a modal file dialog is created and shown. If the user clicked OK, the file they selected is put in <tt>fileName</tt>.</p> <p>The dialog's working directory can be set with <a href="QFileDialog.html#setDirectory(java.lang.String)"><tt>setDirectory</tt></a>. Each file in the current directory can be selected using the <a href="QFileDialog.html#selectFile(java.lang.String)"><tt>selectFile</tt></a> function.</p> <p>The Standard Dialogs</tt> example shows how to use <a href="QFileDialog.html#QFileDialog(com.trolltech.qt.gui.QWidget, java.lang.String, java.lang.String, java.lang.String)"><tt>QFileDialog</tt></a> as well as other built-in Qt dialogs.</p> @see <a href="%2E%2E/core/QDir.html"><tt>QDir</tt></a> @see <a href="%2E%2E/core/QFileInfo.html"><tt>QFileInfo</tt></a> @see <a href="%2E%2E/core/QFile.html"><tt>QFile</tt></a> @see <a href="QPrintDialog.html"><tt>QPrintDialog</tt></a> @see <a href="QColorDialog.html"><tt>QColorDialog</tt></a> @see <a href="QFontDialog.html"><tt>QFontDialog</tt></a> @see Standard Dialogs Example</tt> @see <a href="%2E%2E/qtjambi-application.html">Application Example</tt></a> */"> <signal name="protected final void accepted()" doc="/** <p>This signal is emitted when the dialog has been accepted either by the user or by calling <a href="QFileDialog.html#accept()"><tt>accept</tt></a> or <a href="QFileDialog.html#done(int)"><tt>done</tt></a> with the QDialog::Accepted argument.</p> <p>Note that this signal is <i>not</i> emitted when hiding the dialog with <a href="QWidget.html#hide()"><tt>hide</tt></a> or <a href="QDialog.html#setVisible(boolean)"><tt>setVisible</tt></a>(false). This includes deleting the dialog while it is visible.</p> <dl> <dt><b>Compatible Slot Signature:</b></dt> <dd><tt>void mySlot()</tt></dd> </dl> <dl> <dt><b>See Also:</b></dt> <dd><a href="QFileDialog.html#finished(int)"><tt>finished</tt></a>, <a href="QFileDialog.html#rejected()"><tt>rejected</tt></a></dd> </dl> */"/> <signal name="protected final void currentChanged(java.lang.String path)" doc="/** <p>When the current file changes, this signal is emitted with the new file name as the <tt>path</tt> parameter.</p> <dl> <dt><b>Compatible Slot Signatures:</b></dt> <dd><tt>void mySlot(java.lang.String path)</tt></dd> <dd><tt>void mySlot()</tt></dd> </dl> <dl> <dt><b>See Also:</b></dt> <dd><a href="QFileDialog.html#filesSelected(java.util.List)"><tt>filesSelected</tt></a></dd> </dl> */"/> <signal name="protected final void customContextMenuRequested(com.trolltech.qt.core.QPoint pos)" doc="/** <p>This signal is emitted when the widget's <a href="QWidget.html#contextMenuPolicy()"><tt>contextMenuPolicy</tt></a> is Qt::CustomContextMenu, and the user has requested a context menu on the widget. The position <tt>pos</tt> is the position of the context menu event that the widget receives. Normally this is in widget coordinates. The exception to this rule is <a href="QAbstractScrollArea.html"><tt>QAbstractScrollArea</tt></a> and its subclasses that map the context menu event to coordinates of the viewport()</tt> .</p> <dl> <dt><b>Compatible Slot Signatures:</b></dt> <dd><tt>void mySlot(com.trolltech.qt.core.QPoint pos)</tt></dd> <dd><tt>void mySlot()</tt></dd> </dl> <dl> <dt><b>See Also:</b></dt> <dd><a href="QWidget.html#mapToGlobal(com.trolltech.qt.core.QPoint)"><tt>mapToGlobal</tt></a>, <a href="QMenu.html"><tt>QMenu</tt></a>, <a href="QWidget.html#contextMenuPolicy()"><tt>contextMenuPolicy</tt></a></dd> </dl> */"/> <signal name="protected final void directoryEntered(java.lang.String directory)" doc="/** <p>This signal is emitted when the user enters a <tt>directory</tt>.</p> <dl> <dt><b>Compatible Slot Signatures:</b></dt> <dd><tt>void mySlot(java.lang.String directory)</tt></dd> <dd><tt>void mySlot()</tt></dd> </dl> */"/> <signal name="protected final void filesSelected(java.util.List files)" doc="/** <p>When the selection changes, this signal is emitted with the (possibly empty) list of <tt>files</tt> files.</p> <dl> <dt><b>Compatible Slot Signatures:</b></dt> <dd><tt>void mySlot(java.util.List files)</tt></dd> <dd><tt>void mySlot()</tt></dd> </dl> <dl> <dt><b>See Also:</b></dt> <dd><a href="QFileDialog.html#currentChanged(java.lang.String)"><tt>currentChanged</tt></a></dd> </dl> */"/> <signal name="protected final void filterSelected(java.lang.String filter)" doc="/** <p>This signal is emitted when the user selects a <tt>filter</tt>.</p> <dl> <dt><b>Compatible Slot Signatures:</b></dt> <dd><tt>void mySlot(java.lang.String filter)</tt></dd> <dd><tt>void mySlot()</tt></dd> </dl> */"/> <signal name="protected final void finished(int result)" doc="/** <p>This signal is emitted when the dialog's <tt>result</tt> code has been set, either by the user or by calling <a href="QFileDialog.html#done(int)"><tt>done</tt></a>, <a href="QFileDialog.html#accept()"><tt>accept</tt></a>, or <a href="QDialog.html#reject()"><tt>reject</tt></a>.</p> <p>Note that this signal is <i>not</i> emitted when hiding the dialog with <a href="QWidget.html#hide()"><tt>hide</tt></a> or <a href="QDialog.html#setVisible(boolean)"><tt>setVisible</tt></a>(false). This includes deleting the dialog while it is visible.</p> <dl> <dt><b>Compatible Slot Signatures:</b></dt> <dd><tt>void mySlot(int result)</tt></dd> <dd><tt>void mySlot()</tt></dd> </dl> <dl> <dt><b>See Also:</b></dt> <dd><a href="QFileDialog.html#accepted()"><tt>accepted</tt></a>, <a href="QFileDialog.html#rejected()"><tt>rejected</tt></a></dd> </dl> */"/> <signal name="protected final void rejected()" doc="/** <p>This signal is emitted when the dialog has been rejected either by the user or by calling <a href="QDialog.html#reject()"><tt>reject</tt></a> or <a href="QFileDialog.html#done(int)"><tt>done</tt></a> with the QDialog::Rejected argument.</p> <p>Note that this signal is <i>not</i> emitted when hiding the dialog with <a href="QWidget.html#hide()"><tt>hide</tt></a> or <a href="QDialog.html#setVisible(boolean)"><tt>setVisible</tt></a>(false). This includes deleting the dialog while it is visible.</p> <dl> <dt><b>Compatible Slot Signature:</b></dt> <dd><tt>void mySlot()</tt></dd> </dl> <dl> <dt><b>See Also:</b></dt> <dd><a href="QFileDialog.html#finished(int)"><tt>finished</tt></a>, <a href="QFileDialog.html#accepted()"><tt>accepted</tt></a></dd> </dl> */"/> <method name="public QFileDialog(com.trolltech.qt.gui.QWidget parent, com.trolltech.qt.core.Qt.WindowFlags f)" doc="/** <p>Constructs a file dialog with the given <tt>parent</tt> and widget <tt>f</tt>.</p> */"/> <method name="public QFileDialog(com.trolltech.qt.gui.QWidget parent, java.lang.String caption, java.lang.String directory, java.lang.String filter)" doc="/** <p>Constructs a file dialog with the given <tt>parent</tt> and <tt>caption</tt> that initially displays the contents of the specified <tt>directory</tt>. The contents of the directory are filtered before being shown in the dialog, using a semicolon-separated list of filters specified by <tt>filter</tt>.</p> */"/> <method name="public QFileDialog(com.trolltech.qt.gui.QWidget parent, java.lang.String caption, java.lang.String directory)" doc="/** <p>Equivalent to <a href="QFileDialog.html#QFileDialog(com.trolltech.qt.gui.QWidget, java.lang.String, java.lang.String, java.lang.String)"><tt>QFileDialog</tt></a>(<tt>parent</tt>, <tt>caption</tt>, <tt>directory</tt>, QString()). */"/> <method name="public QFileDialog(com.trolltech.qt.gui.QWidget parent, java.lang.String caption)" doc="/** <p>Equivalent to <a href="QFileDialog.html#QFileDialog(com.trolltech.qt.gui.QWidget, java.lang.String, java.lang.String, java.lang.String)"><tt>QFileDialog</tt></a>(<tt>parent</tt>, <tt>caption</tt>, QString(), QString()). */"/> <method name="public QFileDialog(com.trolltech.qt.gui.QWidget parent)" doc="/** <p>Equivalent to <a href="QFileDialog.html#QFileDialog(com.trolltech.qt.gui.QWidget, java.lang.String, java.lang.String, java.lang.String)"><tt>QFileDialog</tt></a>(<tt>parent</tt>, QString(), QString(), QString()). */"/> <method name="public QFileDialog()" doc="/** <p>Equivalent to <a href="QFileDialog.html#QFileDialog(com.trolltech.qt.gui.QWidget, java.lang.String, java.lang.String, java.lang.String)"><tt>QFileDialog</tt></a>(0, QString(), QString(), QString()). */"/> <method name="public final com.trolltech.qt.gui.QFileDialog.AcceptMode acceptMode()" doc="/** <p>Returns the accept mode of the dialog.</p> <p>The action mode defines whether the dialog is for opening or saving files.</p> @see <a href="QFileDialog.html#setAcceptMode(com.trolltech.qt.gui.QFileDialog.AcceptMode)"><tt>setAcceptMode</tt></a> @see <a href="QFileDialog.html#AcceptMode-enum"><tt>AcceptMode</tt></a> */"/> <method name="public final boolean confirmOverwrite()" doc="/** <p>Returns whether the filedialog should ask before accepting a selected file, when the accept mode is <a href="QFileDialog.html#AcceptMode-enum"><tt>AcceptSave</tt></a>.</p> <p>If this property is set to true and the accept mode is <a href="QFileDialog.html#AcceptMode-enum"><tt>AcceptSave</tt></a>, the filedialog will ask whether the user wants to overwrite the fike before accepting the file.</p> @see <a href="QFileDialog.html#setConfirmOverwrite(boolean)"><tt>setConfirmOverwrite</tt></a> */"/> <method name="public final java.lang.String defaultSuffix()" doc="/** <p>Returns suffix added to the filename if no other suffix was specified.</p> <p>This property specifies a string that will be added to the filename if it has no suffix already. The suffix is typically used to indicate the file type (e.g&#x2e; &quot;txt&quot; indicates a text file).</p> @see <a href="QFileDialog.html#setDefaultSuffix(java.lang.String)"><tt>setDefaultSuffix</tt></a> */"/> <method name="public final com.trolltech.qt.core.QDir directory()" doc="/** <p>Returns the directory currently being displayed in the dialog.</p> @see <a href="QFileDialog.html#setDirectory(java.lang.String)"><tt>setDirectory</tt></a> */"/> <method name="public final com.trolltech.qt.gui.QFileDialog.FileMode fileMode()" doc="/** <p>Returns the file mode of the dialog.</p> <p>The file mode defines the number and type of items that the user is expected to select in the dialog.</p> @see <a href="QFileDialog.html#setFileMode(com.trolltech.qt.gui.QFileDialog.FileMode)"><tt>setFileMode</tt></a> @see <a href="QFileDialog.html#FileMode-enum"><tt>FileMode</tt></a> */"/> <method name="public final java.util.List<java.lang.String> filters()" doc="/** <p>Returns the file type filters that are in operation on this file dialog.</p> @see <a href="QFileDialog.html#setFilters(java.util.List<java.lang.String>)"><tt>setFilters</tt></a> */"/> <method name="public final java.util.List<java.lang.String> history()" doc="/** <p>returns the browsing history of the filedialog as a list of paths.</p> @see <a href="QFileDialog.html#setHistory(java.util.List<java.lang.String>)"><tt>setHistory</tt></a> */"/> <method name="public final com.trolltech.qt.gui.QFileIconProvider iconProvider()" doc="/** <p>returns the icon provider used by the filedialog.</p> @see <a href="QFileDialog.html#setIconProvider(com.trolltech.qt.gui.QFileIconProvider)"><tt>setIconProvider</tt></a> */"/> <method name="public final boolean isReadOnly()" doc="/** <p>Returns Whether the filedialog is readonly..</p> <p>If this property is set to false, the filedialog will allow renaming, and deleting of files and directories and creating directories.</p> <p>The default value is false.</p> */"/> <method name="public final com.trolltech.qt.gui.QAbstractItemDelegate itemDelegate()" doc="/** <p>returns the item delegate used to render the items in the views in the filedialog</p> @see <a href="QFileDialog.html#setItemDelegate(com.trolltech.qt.gui.QAbstractItemDelegate)"><tt>setItemDelegate</tt></a> */"/> <method name="public final java.lang.String labelText(com.trolltech.qt.gui.QFileDialog.DialogLabel label)" doc="/** <p>returns the text shown in the filedialog in the specified <tt>label</tt></p> @see <a href="QFileDialog.html#setLabelText(com.trolltech.qt.gui.QFileDialog.DialogLabel, java.lang.String)"><tt>setLabelText</tt></a> */"/> <method name="public final com.trolltech.qt.gui.QAbstractProxyModel proxyModel()" doc="/** <p>Returns the proxy model used by the file dialog. By default no proxy is set.</p> @see <a href="QFileDialog.html#setProxyModel(com.trolltech.qt.gui.QAbstractProxyModel)"><tt>setProxyModel</tt></a> */"/> <method name="public final boolean resolveSymlinks()" doc="/** <p>Returns whether the filedialog should resolve shortcuts.</p> <p>If this property is set to true, the file dialog will resolve shortcuts.</p> @see <a href="QFileDialog.html#setResolveSymlinks(boolean)"><tt>setResolveSymlinks</tt></a> */"/> <method name="public final boolean restoreState(com.trolltech.qt.core.QByteArray state)" doc="/** <p>Restores the dialogs's layout, history and current directory to the <tt>state</tt> specified.</p> <p>Typically this is used in conjunction with <a href="%2E%2E/core/QSettings.html"><tt>QSettings</tt></a> to restore the size from a past session.</p> <p>Returns false if there are errors</p> */"/> <method name="public final com.trolltech.qt.core.QByteArray saveState()" doc="/** <p>Saves the state of the dialog's layout, history and current directory.</p> <p>Typically this is used in conjunction with <a href="%2E%2E/core/QSettings.html"><tt>QSettings</tt></a> to remember the size for a future session. A version number is stored as part of the data.</p> */"/> <method name="public final void selectFile(java.lang.String filename)" doc="/** <p>Selects the given <tt>filename</tt> in the file dialog.</p> @see <a href="QFileDialog.html#selectedFiles()"><tt>selectedFiles</tt></a> */"/> <method name="public final void selectFilter(java.lang.String filter)" doc="/** <p>Sets the current file type <tt>filter</tt>. Multiple filters can be passed in <tt>filter</tt> by separating them with semicolons or spaces.</p> @see <a href="QFileDialog.html#setFilter(java.lang.String)"><tt>setFilter</tt></a> @see <a href="QFileDialog.html#setFilters(java.util.List<java.lang.String>)"><tt>setFilters</tt></a> @see <a href="QFileDialog.html#selectedFilter()"><tt>selectedFilter</tt></a> */"/> <method name="public final java.util.List<java.lang.String> selectedFiles()" doc="/** <p>Returns a list of strings containing the absolute paths of the selected files in the dialog. If no files are selected, or the mode is not <a href="QFileDialog.html#FileMode-enum"><tt>ExistingFiles</tt></a>, <a href="QFileDialog.html#selectedFiles()"><tt>selectedFiles</tt></a> is an empty string list.</p> @see <a href="QFileDialog.html#selectedFilter()"><tt>selectedFilter</tt></a> @see <a href="QFileDialog.html#selectFile(java.lang.String)"><tt>selectFile</tt></a> */"/> <method name="public final java.lang.String selectedFilter()" doc="/** <p>Returns the filter that the user selected in the file dialog.</p> @see <a href="QFileDialog.html#selectedFiles()"><tt>selectedFiles</tt></a> */"/> <method name="public final void setAcceptMode(com.trolltech.qt.gui.QFileDialog.AcceptMode mode)" doc="/** <p>Sets the accept mode of the dialog to <tt>mode</tt>.</p> <p>The action mode defines whether the dialog is for opening or saving files.</p> @see <a href="QFileDialog.html#acceptMode()"><tt>acceptMode</tt></a> @see <a href="QFileDialog.html#AcceptMode-enum"><tt>AcceptMode</tt></a> */"/> <method name="public final void setConfirmOverwrite(boolean enabled)" doc="/** <p>Sets whether the filedialog should ask before accepting a selected file, when the accept mode is <a href="QFileDialog.html#AcceptMode-enum"><tt>AcceptSave</tt></a> to <tt>enabled</tt>.</p> <p>If this property is set to true and the accept mode is <a href="QFileDialog.html#AcceptMode-enum"><tt>AcceptSave</tt></a>, the filedialog will ask whether the user wants to overwrite the fike before accepting the file.</p> @see <a href="QFileDialog.html#confirmOverwrite()"><tt>confirmOverwrite</tt></a> */"/> <method name="public final void setDefaultSuffix(java.lang.String suffix)" doc="/** <p>Sets suffix added to the filename if no other suffix was specified to <tt>suffix</tt>.</p> <p>This property specifies a string that will be added to the filename if it has no suffix already. The suffix is typically used to indicate the file type (e.g&#x2e; &quot;txt&quot; indicates a text file).</p> @see <a href="QFileDialog.html#defaultSuffix()"><tt>defaultSuffix</tt></a> */"/> <method name="public final void setDirectory(com.trolltech.qt.core.QDir directory)"/> <method name="public final void setDirectory(java.lang.String directory)" doc="/** <p>Sets the file dialog's current <tt>directory</tt>.</p> @see <a href="QFileDialog.html#directory()"><tt>directory</tt></a> */"/> <method name="public final void setFileMode(com.trolltech.qt.gui.QFileDialog.FileMode mode)" doc="/** <p>Sets the file mode of the dialog to <tt>mode</tt>.</p> <p>The file mode defines the number and type of items that the user is expected to select in the dialog.</p> @see <a href="QFileDialog.html#fileMode()"><tt>fileMode</tt></a> @see <a href="QFileDialog.html#FileMode-enum"><tt>FileMode</tt></a> */"/> <method name="public final void setFilter(java.lang.String filter)" doc="/** <p>Sets the filter used in the file dialog to the given <tt>filter</tt>.</p> <p>If <tt>filter</tt> contains a pair of parentheses containing one or more of <b>anything*something</b>, separated by semicolons, then only the text contained in the parentheses is used as the filter. This means that these calls are all equivalent:</p> <pre> dialog.setFilter(&quot;All C++ files (*.cpp;*.cc;*.C;*.cxx;*.c++)&quot;); dialog.setFilter(&quot;*.cpp;*.cc;*.C;*.cxx;*.c++&quot;);</pre> @see <a href="QFileDialog.html#setFilters(java.util.List<java.lang.String>)"><tt>setFilters</tt></a> */"/> <method name="public final void setFilters(java.util.List<java.lang.String> filters)" doc="/** <p>Sets the <tt>filters</tt> used in the file dialog.</p> <pre> QStringList filters; filters &lt;&lt; &quot;Image files (*.png *.xpm *.jpg)&quot; &lt;&lt; &quot;Text files (*.txt)&quot; &lt;&lt; &quot;Any files (*)&quot;; QFileDialog dialog(this); dialog.setFilters(filters); dialog.exec();</pre> @see <a href="QFileDialog.html#filters()"><tt>filters</tt></a> */"/> <method name="public final void setHistory(java.util.List<java.lang.String> paths)" doc="/** <p>Sets the browsing history of the filedialog to contain the given <tt>paths</tt>.</p> @see <a href="QFileDialog.html#history()"><tt>history</tt></a> */"/> <method name="public final void setIconProvider(com.trolltech.qt.gui.QFileIconProvider provider)" doc="/** <p>set the icon provider used by the filedialog to the specified <tt>provider</tt></p> @see <a href="QFileDialog.html#iconProvider()"><tt>iconProvider</tt></a> */"/> <method name="public final void setItemDelegate(com.trolltech.qt.gui.QAbstractItemDelegate delegate)" doc="/** <p>Sets the item delegate used to render items in the views in the file dialog to the given <tt>delegate</tt>.</p> <p><b>Warning:</b> You should not share the same instance of a delegate between views. Doing so can cause incorrect or unintuitive editing behavior since each view connected to a given delegate may receive the closeEditor() signal, and attempt to access, modify or close an editor that has already been closed.</p> @see <a href="QFileDialog.html#itemDelegate()"><tt>itemDelegate</tt></a> */"/> <method name="public final void setLabelText(com.trolltech.qt.gui.QFileDialog.DialogLabel label, java.lang.String text)" doc="/** <p>set the <tt>text</tt> shown in the filedialog in the specified <tt>label</tt></p> @see <a href="QFileDialog.html#labelText(com.trolltech.qt.gui.QFileDialog.DialogLabel)"><tt>labelText</tt></a> */"/> <method name="public final void setProxyModel(com.trolltech.qt.gui.QAbstractProxyModel model)" doc="/** <p>Sets the model for the views to the given <tt>model</tt>. This is useful if you want to modify the underlying model; for example, to add columns, filter data or add drives.</p> <p>Any existing proxy model will be removed, but not deleted. The file dialog will take ownership of the <tt>model</tt>.</p> @see <a href="QFileDialog.html#proxyModel()"><tt>proxyModel</tt></a> */"/> <method name="public final void setReadOnly(boolean enabled)" doc="/** <p>Sets Whether the filedialog is readonly. to <tt>enabled</tt>.</p> <p>If this property is set to false, the filedialog will allow renaming, and deleting of files and directories and creating directories.</p> <p>The default value is false.</p> @see <a href="QFileDialog.html#isReadOnly()"><tt>isReadOnly</tt></a> */"/> <method name="public final void setResolveSymlinks(boolean enabled)" doc="/** <p>Sets whether the filedialog should resolve shortcuts to <tt>enabled</tt>.</p> <p>If this property is set to true, the file dialog will resolve shortcuts.</p> @see <a href="QFileDialog.html#resolveSymlinks()"><tt>resolveSymlinks</tt></a> */"/> <method name="public final void setSidebarUrls(java.util.List<com.trolltech.qt.core.QUrl> urls)" doc="/** <p>Sets the <tt>urls</tt> that are located in the sidebar</p> @see <a href="QFileDialog.html#sidebarUrls()"><tt>sidebarUrls</tt></a> */"/> <method name="public final void setViewMode(com.trolltech.qt.gui.QFileDialog.ViewMode mode)" doc="/** <p>Sets the way files and directories are displayed in the dialog to <tt>mode</tt>.</p> <p>By default, the <tt>Detail</tt> mode is used to display information about files and directories.</p> @see <a href="QFileDialog.html#viewMode()"><tt>viewMode</tt></a> @see <a href="QFileDialog.html#ViewMode-enum"><tt>ViewMode</tt></a> */"/> <method name="public final java.util.List<com.trolltech.qt.core.QUrl> sidebarUrls()" doc="/** <p>Returns a list of urls that are currently in the sidebar</p> @see <a href="QFileDialog.html#setSidebarUrls(java.util.List<com.trolltech.qt.core.QUrl>)"><tt>setSidebarUrls</tt></a> */"/> <method name="public final com.trolltech.qt.gui.QFileDialog.ViewMode viewMode()" doc="/** <p>Returns the way files and directories are displayed in the dialog.</p> <p>By default, the <tt>Detail</tt> mode is used to display information about files and directories.</p> @see <a href="QFileDialog.html#setViewMode(com.trolltech.qt.gui.QFileDialog.ViewMode)"><tt>setViewMode</tt></a> @see <a href="QFileDialog.html#ViewMode-enum"><tt>ViewMode</tt></a> */"/> <method name="public void accept()" doc="/** <p>This function is reimplemented for internal reasons.</p> */"/> <method name="protected void changeEvent(com.trolltech.qt.core.QEvent e)" doc="/** <p>This function is reimplemented for internal reasons.</p> */"/> <method name="public void done(int result)" doc="/** <p>This function is reimplemented for internal reasons.</p> */"/> <method name="public static java.lang.String getExistingDirectory(com.trolltech.qt.gui.QWidget parent, java.lang.String caption, java.lang.String dir, com.trolltech.qt.gui.QFileDialog.Options options)" doc="/** <p>This is a convenience static function that will return an existing directory selected by the user.</p> <pre> QString dir = QFileDialog::getExistingDirectory(this, tr(&quot;Open Directory&quot;), &quot;/home&quot;, QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);</pre> <p>This function creates a modal file dialog with the given <tt>parent</tt> widget. If the parent is not 0, the dialog will be shown centered over the parent widget.</p> <p>The dialog's working directory is set to <tt>dir</tt>, and the caption is set to <tt>caption</tt>. Either of these may be an empty string in which case the current directory and a default caption will be used respectively. The <tt>options</tt> argument holds various options about how to run the dialog, see the QFileDialog::Option enum for more information on the flags you can pass.</p> <p>Under Windows and Mac OS X, this static function will use the native file dialog and not a <a href="QFileDialog.html#QFileDialog(com.trolltech.qt.gui.QWidget, java.lang.String, java.lang.String, java.lang.String)"><tt>QFileDialog</tt></a>. On Mac OS X, the <tt>dir</tt> argument is ignored, the native dialog always displays the last visited directory.</p> <p>Under Unix/X11, the normal behavior of the file dialog is to resolve and follow symlinks. For example, if <tt>/usr/tmp</tt> is a symlink to <tt>/var/tmp</tt>, the file dialog will change to <tt>/var/tmp</tt> after entering <tt>/usr/tmp</tt>. If <tt>options</tt> includes <a href="QFileDialog.html#Option-enum"><tt>DontResolveSymlinks</tt></a>, the file dialog will treat symlinks as regular directories.</p> <p>Note that on Windows the dialog will spin a blocking modal event loop that will not dispatch any QTimers, and if parent is not 0 then it will position the dialog just under the parent's title bar.</p> @see <tt>getOpenFileName</tt> @see <tt>getOpenFileNames</tt> @see <tt>getSaveFileName</tt> */"/> <method name="public static java.lang.String getExistingDirectory(com.trolltech.qt.gui.QWidget parent, java.lang.String caption, java.lang.String dir)" doc="/** <p>Equivalent to <a href="QFileDialog.html#getExistingDirectory(com.trolltech.qt.gui.QWidget, java.lang.String, java.lang.String, com.trolltech.qt.gui.QFileDialog.Options)"><tt>getExistingDirectory</tt></a>(<tt>parent</tt>, <tt>caption</tt>, <tt>dir</tt>, ShowDirsOnly). */"/> <method name="public static java.lang.String getExistingDirectory(com.trolltech.qt.gui.QWidget parent, java.lang.String caption)" doc="/** <p>Equivalent to <a href="QFileDialog.html#getExistingDirectory(com.trolltech.qt.gui.QWidget, java.lang.String, java.lang.String, com.trolltech.qt.gui.QFileDialog.Options)"><tt>getExistingDirectory</tt></a>(<tt>parent</tt>, <tt>caption</tt>, QString(), ShowDirsOnly). */"/> <method name="public static java.lang.String getExistingDirectory(com.trolltech.qt.gui.QWidget parent)" doc="/** <p>Equivalent to <a href="QFileDialog.html#getExistingDirectory(com.trolltech.qt.gui.QWidget, java.lang.String, java.lang.String, com.trolltech.qt.gui.QFileDialog.Options)"><tt>getExistingDirectory</tt></a>(<tt>parent</tt>, QString(), QString(), ShowDirsOnly). */"/> <method name="public static java.lang.String getExistingDirectory()" doc="/** <p>Equivalent to <a href="QFileDialog.html#getExistingDirectory(com.trolltech.qt.gui.QWidget, java.lang.String, java.lang.String, com.trolltech.qt.gui.QFileDialog.Options)"><tt>getExistingDirectory</tt></a>(0, QString(), QString(), ShowDirsOnly). */"/> <enum name="FileMode" doc="/** <p>This enum is used to indicate what the user may select in the file dialog; i.e&#x2e; what the dialog will return if the user clicks OK.</p> @see <a href="QFileDialog.html#setFileMode(com.trolltech.qt.gui.QFileDialog.FileMode)"><tt>setFileMode</tt></a> */"> <enum-value name="AnyFile" doc="/** <p>The name of a file, whether it exists or not.</p> */"/> <enum-value name="ExistingFile" doc="/** <p>The name of a single existing file.</p> */"/> <enum-value name="Directory" doc="/** <p>The name of a directory. Both files and directories are displayed.</p> */"/> <enum-value name="ExistingFiles" doc="/** <p>The names of zero or more existing files.</p> */"/> <enum-value name="DirectoryOnly" doc="/** <p>The name of a directory. The file dialog will only display directories.</p> */"/> </enum> <enum name="Option"> <enum-value name="ShowDirsOnly" doc="/** <p>Only show directories in the file dialog. By default both files and directories are shown.</p> */"/> <enum-value name="DontResolveSymlinks" doc="/** <p>Don't resolve symlinks in the file dialog. By default symlinks are resolved.</p> */"/> <enum-value name="DontConfirmOverwrite" doc="/** <p>Don't ask for confirmation if an existing file is selected. By default confirmation is requested.</p> */"/> <enum-value name="DontUseSheet" doc="/** <p>Don't make the native file dialog a sheet. By default on Mac OS X, the native file dialog is made a sheet if it has a parent that can take a sheet.</p> */"/> <enum-value name="DontUseNativeDialog" doc="/** <p>Don't use the native file dialog. By default on Mac OS X and Windows, the native file dialog is used.</p> */"/> </enum> <enum name="DialogLabel"> <enum-value name="LookIn" doc="/** Internal. */"/> <enum-value name="FileName" doc="/** Internal. */"/> <enum-value name="FileType" doc="/** Internal. */"/> <enum-value name="Accept" doc="/** Internal. */"/> <enum-value name="Reject" doc="/** Internal. */"/> </enum> <enum name="ViewMode" doc="/** <p>This enum describes the view mode of the file dialog; i.e&#x2e; what information about each file will be displayed.</p> @see <a href="QFileDialog.html#setViewMode(com.trolltech.qt.gui.QFileDialog.ViewMode)"><tt>setViewMode</tt></a> */"> <enum-value name="Detail" doc="/** <p>Displays an icon, a name, and details for each item in the directory.</p> */"/> <enum-value name="List" doc="/** <p>Displays only an icon and a name for each item in the directory.</p> */"/> </enum> <enum name="AcceptMode"> <enum-value name="AcceptOpen" doc="/** Internal. */"/> <enum-value name="AcceptSave" doc="/** Internal. */"/> </enum> </class>