The GFileChooser class contains static methods for popping up file-choosing dialog boxes that allow the user to select a file. More...
#include "gfilechooser.h"
Static Public Member Functions | |
static string | showOpenDialog(string title="Open file", string currentDir="", string fileFilter="") |
Pops up a file "Open" chooser dialog with the given top title text, current directory, and file filter. More... | |
static string | showOpenDialog(GWindow *parent, string title="Open file", string currentDir="", string fileFilter="") |
Pops up a file "Open" chooser dialog with the given top title text, current directory, and file filter. More... | |
static string | showOpenDialog(QWidget* parent, string title="Open file", string currentDir="", string fileFilter="") |
Pops up a file "Open" chooser dialog with the given top title text, current directory, and file filter. More... | |
static string | showSaveDialog(string title="Save file", string currentDir="", string fileFilter="") |
Pops up a file "Save" chooser dialog with the given top title text, current directory, and file filter. More... | |
static string | showSaveDialog(GWindow *parent, string title="Save file", string currentDir="", string fileFilter="") |
Pops up a file "Save" chooser dialog with the given top title text, current directory, and file filter. More... | |
static string | showSaveDialog(QWidget* parent, string title="Save file", string currentDir="", string fileFilter="") |
Pops up a file "Save" chooser dialog with the given top title text, current directory, and file filter. More... | |
The GFileChooser class contains static methods for popping up file-choosing dialog boxes that allow the user to select a file.
Each method blocks until the file is chosen and the dialog is closed, returning the file the user chose (or an empty string if the user canceled).
|
static |
Pops up a file "Open" chooser dialog with the given top title text, current directory, and file filter.
All arguments are optional.
title | text to show on the top title bar of the dialog |
currentDir | directory to show initially in the file chooser (defaults to current working directory) |
fileFilter | a file filter string such as "*.gif,*.jpg,*.png". |
|
static |
Pops up a file "Open" chooser dialog with the given top title text, current directory, and file filter.
All arguments are optional.
parent | graphical window to use as this dialog's parent (modal) |
title | text to show on the top title bar of the dialog |
currentDir | directory to show initially in the file chooser (defaults to current working directory) |
fileFilter | a file filter string such as "*.gif,*.jpg,*.png". |
|
static |
Pops up a file "Open" chooser dialog with the given top title text, current directory, and file filter.
All arguments are optional.
parent | graphical widget to use as this dialog's parent |
title | text to show on the top title bar of the dialog |
currentDir | directory to show initially in the file chooser (defaults to current working directory) |
fileFilter | a file filter string such as "*.gif,*.jpg,*.png". |
|
static |
Pops up a file "Save" chooser dialog with the given top title text, current directory, and file filter.
All arguments are optional.
The main difference between an "Open" dialog and a "Save" dialog, aside from the different title bar text, is that a "Save" dialog allows the user to type a name of a file that does not yet exist.
If the user chooses the name of a file that already exists, they will be prompted to overwrite this file. If they choose No, the dialog will remain up; if they choose Yes, it will close.
title | text to show on the top title bar of the dialog |
currentDir | directory to show initially in the file chooser (defaults to current working directory) |
fileFilter | a file filter string such as "*.gif,*.jpg,*.png". |
|
static |
Pops up a file "Save" chooser dialog with the given top title text, current directory, and file filter.
All arguments are optional.
The main difference between an "Open" dialog and a "Save" dialog, aside from the different title bar text, is that a "Save" dialog allows the user to type a name of a file that does not yet exist.
If the user chooses the name of a file that already exists, they will be prompted to overwrite this file. If they choose No, the dialog will remain up; if they choose Yes, it will close.
parent | graphical window to use as this dialog's parent (modal) |
title | text to show on the top title bar of the dialog |
currentDir | directory to show initially in the file chooser (defaults to current working directory) |
fileFilter | a file filter string such as "*.gif,*.jpg,*.png". |
|
static |
Pops up a file "Save" chooser dialog with the given top title text, current directory, and file filter.
All arguments are optional.
The main difference between an "Open" dialog and a "Save" dialog, aside from the different title bar text, is that a "Save" dialog allows the user to type a name of a file that does not yet exist.
If the user chooses the name of a file that already exists, they will be prompted to overwrite this file. If they choose No, the dialog will remain up; if they choose Yes, it will close.
parent | graphical widget to use as this dialog's parent |
title | text to show on the top title bar of the dialog |
currentDir | directory to show initially in the file chooser (defaults to current working directory) |
fileFilter | a file filter string such as "*.gif,*.jpg,*.png". |