Gui::FileDialog Class Reference

The FileDialog class provides dialogs that allow users to select files or directories. More...

#include <FileDialog.h>

List of all members.

Static Public Member Functions

static QString getExistingDirectory (QWidget *parent=0, const QString &caption=QString(), const QString &dir=QString(), Options options=ShowDirsOnly)
 This is a convenience static function that will return an existing directory selected by the user.
static QString getOpenFileName (QWidget *parent=0, const QString &caption=QString(), const QString &dir=QString(), const QString &filter=QString(), QString *selectedFilter=0, Options options=0)
 This is a convenience static function that returns an existing file selected by the user.
static QStringList getOpenFileNames (QWidget *parent=0, const QString &caption=QString(), const QString &dir=QString(), const QString &filter=QString(), QString *selectedFilter=0, Options options=0)
 This is a convenience static function that will return one or more existing files selected by the user.
static QString getSaveFileName (QWidget *parent=0, const QString &caption=QString(), const QString &dir=QString(), const QString &filter=QString(), QString *selectedFilter=0, Options options=0)
 This is a convenience static function that will return a file name selected by the user.
static QString getWorkingDirectory ()
 Returns the working directory for the file dialog.
static void setWorkingDirectory (const QString &)
 Sets the working directory to dir for the file dialog.

Detailed Description

The FileDialog class provides dialogs that allow users to select files or directories.

Author:
Werner Mayer

Definition at line 43 of file FileDialog.h.


Member Function Documentation

QString FileDialog::getExistingDirectory ( QWidget *  parent = 0,
const QString &  caption = QString(),
const QString &  dir = QString(),
Options  options = ShowDirsOnly 
) [static]

This is a convenience static function that will return an existing directory selected by the user.

Definition at line 99 of file FileDialog.cpp.

Referenced by Gui::StdCmdDownloadOnlineHelp::activated().

QString FileDialog::getOpenFileName ( QWidget *  parent = 0,
const QString &  caption = QString(),
const QString &  dir = QString(),
const QString &  filter = QString(),
QString *  selectedFilter = 0,
Options  options = 0 
) [static]
QStringList FileDialog::getOpenFileNames ( QWidget *  parent = 0,
const QString &  caption = QString(),
const QString &  dir = QString(),
const QString &  filter = QString(),
QString *  selectedFilter = 0,
Options  options = 0 
) [static]

This is a convenience static function that will return one or more existing files selected by the user.

Definition at line 144 of file FileDialog.cpp.

References getWorkingDirectory(), and setWorkingDirectory().

Referenced by CmdSandboxMeshLoaderFuture::activated(), and CmdMeshImport::activated().

QString FileDialog::getSaveFileName ( QWidget *  parent = 0,
const QString &  caption = QString(),
const QString &  dir = QString(),
const QString &  filter = QString(),
QString *  selectedFilter = 0,
Options  options = 0 
) [static]
QString FileDialog::getWorkingDirectory (  )  [static]

Returns the working directory for the file dialog.

This path can be used in combination with getSaveFileName(), getOpenFileName(), getOpenFileNames() or getExistingDirectory() to open the dialog in this path.

Definition at line 171 of file FileDialog.cpp.

References App::Application::Config(), App::GetApplication(), ParameterGrp::GetGroup(), and App::Application::GetUserParameter().

Referenced by getOpenFileName(), getOpenFileNames(), getSaveFileName(), and Gui::Document::saveAs().

void FileDialog::setWorkingDirectory ( const QString &  dir  )  [static]

Sets the working directory to dir for the file dialog.

If dir is a file then the path only is taken. getWorkingDirectory() returns the working directory.

Definition at line 188 of file FileDialog.cpp.

References App::GetApplication(), ParameterGrp::GetGroup(), and App::Application::GetUserParameter().

Referenced by getOpenFileName(), getOpenFileNames(), getSaveFileName(), and Gui::Document::saveAs().


The documentation for this class was generated from the following files:

Generated on Wed Nov 23 19:02:00 2011 for FreeCAD by  doxygen 1.6.1