#include <filedialog.h>
Inherited by QtFileDialog.
Public Types | |
| enum | Mode { AddFile = 0, AddDir, AddFiles, AddDirs, AddDirsFiles, PlayDirsFiles, SaveFile } |
Signals | |
| void | filesSelected (const QStringList &selected, bool play=false) |
Static Public Member Functions | |
| static QList< FileDialogFactory * > | factories () |
| static void | setEnabled (FileDialogFactory *factory) |
| static bool | isEnabled (FileDialogFactory *factory) |
| static QString | file (FileDialogFactory *factory) |
| static QString | getExistingDirectory (QWidget *parent=0, const QString &caption=QString(), const QString &dir=QString()) |
| static QString | getOpenFileName (QWidget *parent=0, const QString &caption=QString(), const QString &dir=QString(), const QString &filter=QString(), QString *selectedFilter=0) |
| static QStringList | getOpenFileNames (QWidget *parent=0, const QString &caption=QString(), const QString &dir=QString(), const QString &filter=QString(), QString *selectedFilter=0) |
| static QString | getSaveFileName (QWidget *parent=0, const QString &caption=QString(), const QString &dir=QString(), const QString &filter=QString(), QString *selectedFilter=0) |
| static void | popup (QWidget *parent=0, Mode mode=AddFiles, QString *dir=0, QObject *receiver=0, const char *member=0, const QString &caption=QString(), const QString &filters=QString()) |
Protected Member Functions | |
| FileDialog () | |
| virtual | ~FileDialog () |
| virtual void | raise (const QString &dir, Mode mode, const QString &caption, const QStringList &mask) |
| virtual QStringList | exec (QWidget *parent, const QString &dir, Mode mode, const QString &caption, const QString &filter=QString(), QString *selectedFilter=0)=0 |
| enum Mode |
Enum of available file dialog modes
| FileDialog | ( | ) | [protected] |
Object constructor.
| virtual ~FileDialog | ( | ) | [protected, virtual] |
Object destructor
| virtual QStringList exec | ( | QWidget * | parent, | |
| const QString & | dir, | |||
| Mode | mode, | |||
| const QString & | caption, | |||
| const QString & | filter = QString(), |
|||
| QString * | selectedFilter = 0 | |||
| ) | [protected, pure virtual] |
This is a function that will open modal file dialog and return a file(s) or directory name selected by the user. Subclass should reimplement this function.
| parent | Parent widget. | |
| dir | Default directory. | |
| mode | File dialog mode. | |
| caption | Dialog title. | |
| filter | Filer used by file dialog (example: "Audio (*.mp3 *.ogg);;Text files (*.txt);;XML files (*.xml)"). | |
| selectedFilter | Default selected filter. |
| static QList<FileDialogFactory*> factories | ( | ) | [static] |
Returns a list of registered file dialog factories.
| static QString file | ( | FileDialogFactory * | factory | ) | [static] |
Returns plugin file path.
| factory | File dialog plugin factory. |
| void filesSelected | ( | const QStringList & | selected, | |
| bool | play = false | |||
| ) | [signal] |
Emitted when the add/open button has pressed. Subclass should emit this signal.
| static QString getExistingDirectory | ( | QWidget * | parent = 0, |
|
| const QString & | caption = QString(), |
|||
| const QString & | dir = QString() | |||
| ) | [static] |
This is a static function that will open modal file dialog and return an existing directory selected by the user.
| parent | Parent widget. | |
| caption | Dialog title. | |
| dir | Default directory. |
| static QString getOpenFileName | ( | QWidget * | parent = 0, |
|
| const QString & | caption = QString(), |
|||
| const QString & | dir = QString(), |
|||
| const QString & | filter = QString(), |
|||
| QString * | selectedFilter = 0 | |||
| ) | [static] |
This is a static function that will open modal file dialog and return an existing file selected by the user.
| parent | Parent widget. | |
| caption | Dialog title. | |
| dir | Default directory. | |
| filter | Filer used by file dialog (example: "Audio (*.mp3 *.ogg);;Text files (*.txt);;XML files (*.xml)"). | |
| selectedFilter | Default selected filter |
| static QStringList getOpenFileNames | ( | QWidget * | parent = 0, |
|
| const QString & | caption = QString(), |
|||
| const QString & | dir = QString(), |
|||
| const QString & | filter = QString(), |
|||
| QString * | selectedFilter = 0 | |||
| ) | [static] |
This is a static function that will open modal file dialog and return an existing file selected by the user.
| parent | Parent widget. | |
| caption | Dialog title. | |
| dir | Default directory. | |
| filter | Filer used by file dialog (example: "Audio (*.mp3 *.ogg);;Text files (*.txt);;XML files (*.xml)"). | |
| selectedFilter | Default selected filter. |
| static QString getSaveFileName | ( | QWidget * | parent = 0, |
|
| const QString & | caption = QString(), |
|||
| const QString & | dir = QString(), |
|||
| const QString & | filter = QString(), |
|||
| QString * | selectedFilter = 0 | |||
| ) | [static] |
This is a static function that will open modal file dialog and return a file name selected by the user. The file does not have to exist.
| parent | Parent widget. | |
| caption | Dialog title. | |
| dir | Default directory. | |
| filter | Filer used by file dialog (example: "Audio (*.mp3 *.ogg);;Text files (*.txt);;XML files (*.xml)"). | |
| selectedFilter | Default selected filter. |
| static bool isEnabled | ( | FileDialogFactory * | factory | ) | [static] |
Returns true if file dialog factory is used by default, otherwise returns false
| static void popup | ( | QWidget * | parent = 0, |
|
| Mode | mode = AddFiles, |
|||
| QString * | dir = 0, |
|||
| QObject * | receiver = 0, |
|||
| const char * | member = 0, |
|||
| const QString & | caption = QString(), |
|||
| const QString & | filters = QString() | |||
| ) | [static] |
Opens nonmodal file dialog. Selected file dialog should support nonmodal mode. Otherwise this function creates modal dialog.
| parent | Parent widget. | |
| mode | File dialog mode. | |
| dir | Default directory. | |
| receiver | Receiver QObject. | |
| member | Receiver slot. | |
| caption | Dialog title. | |
| filters | Filer used by file dialog (example: "Audio (*.mp3 *.ogg);;Text files (*.txt);;XML files (*.xml)"). |
| virtual void raise | ( | const QString & | dir, | |
| Mode | mode, | |||
| const QString & | caption, | |||
| const QStringList & | mask | |||
| ) | [protected, virtual] |
Opens nonmodal file dialog. Selected file dialog should support nonmodal mode. Otherwise this function does nothing. Nonmodal dialog subclass should reimplement this function.
| dir | Default directory. | |
| mode | File dialog mode. | |
| caption | Dialog title. | |
| mask | Filer used by file dialog |
| static void setEnabled | ( | FileDialogFactory * | factory | ) | [static] |
Selects current file dialog factory.
1.5.9