Function TRAP::Utils::Dialogs::OpenSingleFile#

Function Documentation#

std::string TRAP::Utils::Dialogs::OpenSingleFile(const std::string &title, const std::string &defaultPathAndFile = "", const std::vector<std::pair<std::string, std::string>> &filterPatterns = {}, bool allFiles = true)#

Opens an open file dialog for a single file. Alias for OpenFile();.

Parameters:
  • title – Title for the dialog.

  • defaultPathAndFile – Sets a default path and file.

  • filterPatterns – File filters (separate multiple extensions for the same filter with a ‘;’. Example: {“Test File”, “*.Test;*.TS”}.

  • allFiles – Whether to add a filter for “All Files (*.*)” or not.

Returns:

Physical path of the dialog or empty string.