15struct MRVIEWER_CLASS FileDialogSignals
24 MRVIEWER_API
static FileDialogSignals&
instance();
35 FileDialogSignals() =
default;
36 ~FileDialogSignals() =
default;
68MRVIEWER_API std::filesystem::path
openFolderDialog( std::filesystem::path baseFolder = {} );
72MRVIEWER_API
void openFolderDialogAsync( std::function<
void (
const std::filesystem::path& )> callback, std::filesystem::path baseFolder = {} );
76MRVIEWER_API std::vector<std::filesystem::path>
openFoldersDialog( std::filesystem::path baseFolder = {} );
std::vector< std::filesystem::path > openFoldersDialog(std::filesystem::path baseFolder={})
SelectFileSignal onOpenFile
called when one file is selected for opening (openFileDialog and openFileDialogAsync)
Definition MRFileDialog.h:26
std::filesystem::path saveFileDialog(const FileParameters ¶ms={})
returns empty path on cancel
void openFileDialogAsync(std::function< void(const std::filesystem::path &)> callback, const FileParameters ¶ms={})
std::string fileName
Default filename.
Definition MRFileDialog.h:43
SelectFilesSignal onOpenFiles
called when several files are selected for opening (openFilesDialog and openFilesDialogAsync)
Definition MRFileDialog.h:27
bool multiselect
open dialog only
Definition MRFileDialog.h:91
SelectFileSignal SelectFolderSignal
Definition MRFileDialog.h:20
std::filesystem::path baseFolder
Definition MRFileDialog.h:46
void saveFileDialogAsync(std::function< void(const std::filesystem::path &)> callback, const FileParameters ¶ms={})
std::vector< std::filesystem::path > openFilesDialog(const FileParameters ¶ms={})
void openFolderDialogAsync(std::function< void(const std::filesystem::path &)> callback, std::filesystem::path baseFolder={})
SelectFileSignal onSaveFile
called when file name is selected for saving (saveFileDialog and saveFileDialogAsync)
Definition MRFileDialog.h:29
bool saveDialog
open dialog only
Definition MRFileDialog.h:92
void openFilesDialogAsync(std::function< void(const std::vector< std::filesystem::path > &)> callback, const FileParameters ¶ms={})
SelectFolderSignal onSelectFolder
called when one folder is selected (we do not now differ reason)(openFolderDialog and openFolderDialo...
Definition MRFileDialog.h:31
static FileDialogSignals & instance()
returns instance of this holder
std::filesystem::path openFolderDialog(std::filesystem::path baseFolder={})
std::filesystem::path getLastUsedDir()
void setLastUsedDir(const std::filesystem::path &folder)
saves in the configuration the path to last used folder (where the files were last saved or open)
bool folderDialog
Definition MRFileDialog.h:90
SelectFoldersSignal onSelectFolders
called when several folders are selected (we do not now differ reason)(openFoldersDialog)
Definition MRFileDialog.h:32
std::filesystem::path openFileDialog(const FileParameters ¶ms={})
Signal< void(const std::vector< std::filesystem::path > &)> SelectFilesSignal
Definition MRFileDialog.h:19
Signal< void(const std::filesystem::path &path)> SelectFileSignal
Definition MRFileDialog.h:18
IOFilters filters
Definition MRFileDialog.h:47
SelectFilesSignal SelectFoldersSignal
Definition MRFileDialog.h:21
std::vector< IOFilter > IOFilters
Definition MRIOFilters.h:32
Definition MRFileDialog.h:86
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Definition MRFileDialog.h:89
Definition MRFileDialog.h:41