MeVisLab Scripting Reference
|
#include <mlabScriptWrappers.h>
Inherits QObject.
Public Types | |
enum | Option { ShowFilesAndDirs = 0 , ShowDirsOnly = QFileDialog::ShowDirsOnly , DontConfirmOverwrite = QFileDialog::DontConfirmOverwrite , DontUseNativeDialog = QFileDialog::DontUseNativeDialog } |
Public Slots | |
FileDialog methods | |
| |
QString | getOpenFileName (const QString &initially, const QString &filter, const QString &caption, Option options=static_cast< Option >(0), MLABWidgetControl *parent=nullptr) |
QString | getOpenFileName (const QString &initially, const QString &filter, const QString &caption, const QString &browsingGroup, Option options=static_cast< Option >(0), MLABWidgetControl *parent=nullptr) |
QString | getSaveFileName (const QString &initially, const QString &filter, const QString &caption, Option options=static_cast< Option >(0), MLABWidgetControl *parent=nullptr) |
QString | getSaveFileName (const QString &initially, const QString &filter, const QString &caption, const QString &browsingGroup, Option options=static_cast< Option >(0), MLABWidgetControl *parent=nullptr) |
QString | getExistingDirectory (const QString &dir, const QString &caption, Option options=ShowDirsOnly, MLABWidgetControl *parent=nullptr) |
QString | getExistingDirectory (const QString &dir, const QString &caption, const QString &browsingGroup, Option options=ShowDirsOnly, MLABWidgetControl *parent=nullptr) |
QStringList | getOpenFileNames (const QString &filter, const QString &dir, const QString &caption, Option options=static_cast< Option >(0), MLABWidgetControl *parent=nullptr) |
QStringList | getOpenFileNames (const QString &filter, const QString &dir, const QString &caption, const QString &browsingGroup, Option options=static_cast< Option >(0), MLABWidgetControl *parent=nullptr) |
QString | lastFileDialogPath (const QString &browsingGroup="") |
void | setLastFileDialogPath (const QString &path, const QString &browsingGroup="") |
Global MLABFileDialog object available in all script.s.
The MLABFileDialog object can be used as follows:
enum MLABFileDialog::Option |
file dialog options
|
slot |
Same method with the browsingGroup
parameter. (See getOpenFileName() about that.)
|
inlineslot |
Returns an existing directory, returns absolute path or empty string on cancel.
Script Example:
|
slot |
Same method with the browsingGroup
parameter.
browsingGroup | If initially is empty the last used path is used as starting path. By selecting unique identifiers for browsingGroup you can have different last paths for different purposes. |
|
inlineslot |
Opens a file with a file dialog box, returns absolute path or empty string on cancel.
Script Example:
initially | An path to display initially |
filter | Set one or more name filters - the format is that defined for QFileDialog, multiple filters must be separated by two semicolons |
caption | A caption to show on top of the dialog |
options | A set of options to modify the behavior of the dialog |
parent | A parent control which is used to place the dialog |
|
slot |
Same method with the browsingGroup
parameter. (See getOpenFileName() about that.)
|
inlineslot |
Returns multiple filenames with a file dialog box, returns a list of absolute paths.
Script Example:
|
slot |
Same method with the browsingGroup
parameter. (See getOpenFileName() about that.)
|
inlineslot |
Saves a file with a file dialog box, returns absolute path or empty string on cancel.
Script Example:
|
slot |
Return the path last used with the given browsingGroup
.
|
slot |
Set the path to show for the given browsingGroup
when the next file dialog is opened (this is only used if no default file path is given for that dialog).
This path is persistent across runs of an application and holds the last path used in a file dialog (without cancelling).