Inviwo  0.9.10.1
Inviwo documentation
inviwo::InviwoFileDialog Class Reference
+ Inheritance diagram for inviwo::InviwoFileDialog:

Public Member Functions

 InviwoFileDialog (QWidget *parent=nullptr, const std::string &title="", const std::string &pathType="default", const std::string &path="")
 
virtual bool show () override
 
virtual int exec () override
 
virtual void setTitle (const std::string &title) override
 
virtual void setAcceptMode (inviwo::AcceptMode mode) override
 
virtual inviwo::AcceptMode getAcceptMode () const override
 
virtual void setFileMode (inviwo::FileMode mode) override
 
virtual inviwo::FileMode getFileMode () const override
 
virtual void setContentType (const std::string &contentType) override
 
virtual std::string getContentType () const override
 
virtual void setCurrentFile (const std::string &filename) override
 sets the current directory of the file dialog to the parent directory of the given file name or, if it is referring to a directory, to the given path. The file will be selected when the dialog is shown. More...
 
virtual std::vector< std::string > getSelectedFiles () const override
 
virtual void setCurrentDirectory (const std::string &path) override
 set the current directory of the file dialog More...
 
virtual FileExtension getSelectedFileExtension () const override
 
virtual void setSelectedExtension (const FileExtension &ext) override
 
virtual void addExtension (const FileExtension &fileExt) override
 
virtual void addExtension (const std::string &ext, const std::string &description) override
 
virtual void addExtension (const std::string &extString) override
 
virtual void addExtensions (const std::vector< FileExtension > &extensions) override
 
void addSidebarPath (const PathType &path)
 
void addSidebarPath (const std::string &path)
 
void addSidebarPath (const QString &path)
 
void useNativeDialog (const bool &use=true)
 
- Public Member Functions inherited from inviwo::FileDialog
std::string getSelectedFile () const
 

Static Public Member Functions

static QString getPreviousPath (const QString &pathType)
 
static void setPreviousPath (const QString &pathType, const QString &path)
 
static QString getPreviousExtension (const QString &pathType)
 
static void setPreviousExtension (const QString &pathType, const QString &path)
 

Protected Types

using FileExtMap = std::unordered_map< std::string, FileExtension >
 

Protected Slots

void filterSelectionChanged (const QString &filter)
 

Protected Member Functions

FileExtension getMatchingFileExtension (const QString &extStr)
 

Protected Attributes

QList< QUrl > sidebarURLs_
 
QStringList extensions_
 
QString selectedExtension_
 
QString pathType_
 
QString currentPath_
 
FileExtension selectedFilter_
 
FileExtMap extmap_
 

Member Function Documentation

◆ setCurrentDirectory()

void inviwo::InviwoFileDialog::setCurrentDirectory ( const std::string &  path)
overridevirtual

set the current directory of the file dialog

Parameters
pathgiven path, must not contain a file name

Implements inviwo::FileDialog.

◆ setCurrentFile()

void inviwo::InviwoFileDialog::setCurrentFile ( const std::string &  filename)
overridevirtual

sets the current directory of the file dialog to the parent directory of the given file name or, if it is referring to a directory, to the given path. The file will be selected when the dialog is shown.

Parameters
filenamepath and name of the file (can be either a file name or directory name including the full path)

Implements inviwo::FileDialog.


The documentation for this class was generated from the following files: