|
Qmmp
|
#include <filedialog.h>
Inherited by QtFileDialog.
Public Types | |
| enum | Mode { AddFile = 0, AddDir, AddFiles, AddDirs, AddDirsFiles, SaveFile } |
Signals | |
| void | filesAdded (const QStringList &) |
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 QString | existingDirectory (QWidget *parent, const QString &caption, const QString &dir) |
| virtual QString | openFileName (QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter) |
| virtual QStringList | openFileNames (QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter) |
| virtual QString | saveFileName (QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter) |
| virtual | ~FileDialog () |
| virtual void | raise (const QString &dir=QString(), Mode mode=AddFiles, const QString &caption=QString(), const QStringList &mask=QStringList()) |
The FileDialog class is the base interface class of the file dialogs.
| enum Mode |
| FileDialog | ( | ) | [protected] |
Object constructor.
| virtual ~FileDialog | ( | ) | [protected, virtual] |
Object destructor
| virtual QString existingDirectory | ( | QWidget * | parent, |
| const QString & | caption, | ||
| const QString & | dir | ||
| ) | [protected, virtual] |
This is a 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 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 filesAdded | ( | const QStringList & | ) | [signal] |
Emitted when the add 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
| virtual QString openFileName | ( | QWidget * | parent, |
| const QString & | caption, | ||
| const QString & | dir, | ||
| const QString & | filter, | ||
| QString * | selectedFilter | ||
| ) | [protected, virtual] |
This is a function that will open modal file dialog and return an existing file selected by the user. Subclass should reimplement this function.
| 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 |
| virtual QStringList openFileNames | ( | QWidget * | parent, |
| const QString & | caption, | ||
| const QString & | dir, | ||
| const QString & | filter, | ||
| QString * | selectedFilter | ||
| ) | [protected, virtual] |
This is a function that will open modal file dialog and return an existing files selected by the user. Subclass should reimplement this function.
| 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 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)"). |
Usage: FileDialog::popup(this, FileDialog::AddDirs, &m_lastDir, m_playListModel, SLOT(addFileList(const QStringList&)), tr("Choose a directory"));
| virtual void raise | ( | const QString & | dir = QString(), |
| Mode | mode = AddFiles, |
||
| const QString & | caption = QString(), |
||
| const QStringList & | mask = QStringList() |
||
| ) | [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 |
| virtual QString saveFileName | ( | QWidget * | parent, |
| const QString & | caption, | ||
| const QString & | dir, | ||
| const QString & | filter, | ||
| QString * | selectedFilter | ||
| ) | [protected, virtual] |
This is a function that will open modal file dialog and return a file name selected by the user. The file does not have to exist. Subclass should reimplement this function.
| 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 void setEnabled | ( | FileDialogFactory * | factory | ) | [static] |
Selects current file dialog factory.
1.7.6.1