Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::InviwoFileDialog Class Reference
+ Inheritance diagram for inviwo::InviwoFileDialog:

Public Member Functions

 InviwoFileDialog (QWidget *parent=nullptr, std::string_view title="", std::string_view pathType="default", const std::filesystem::path &path={})
 
virtual bool show () override
 
virtual int exec () override
 
virtual void setTitle (std::string_view 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 (std::string_view contentType) override
 
virtual std::string getContentType () const override
 
virtual void setCurrentFile (const std::filesystem::path &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.
 
virtual std::vector< std::filesystem::path > getSelectedFiles () const override
 
virtual void setCurrentDirectory (const std::filesystem::path &path) override
 set the current directory of the file dialog
 
virtual FileExtension getSelectedFileExtension () const override
 
virtual void setSelectedExtension (const FileExtension &ext) override
 
virtual void addExtension (const FileExtension &fileExt) override
 
virtual void addExtension (std::string_view ext, std::string_view description) override
 
virtual void addExtension (std::string_view extString) override
 
virtual void addExtensions (const std::vector< FileExtension > &extensions) override
 
void addSidebarPath (const PathType &path)
 
void addSidebarPath (const std::filesystem::path &path)
 
void addSidebarPath (const QString &path)
 
- Public Member Functions inherited from inviwo::FileDialog
std::filesystem::path getSelectedFile () const
 
- Public Member Functions inherited from inviwo::Dialog

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

◆ addExtension() [1/3]

virtual void inviwo::InviwoFileDialog::addExtension ( const FileExtension & fileExt)
overridevirtual

Implements inviwo::FileDialog.

◆ addExtension() [2/3]

virtual void inviwo::InviwoFileDialog::addExtension ( std::string_view ext,
std::string_view description )
overridevirtual

Implements inviwo::FileDialog.

◆ addExtension() [3/3]

virtual void inviwo::InviwoFileDialog::addExtension ( std::string_view extString)
overridevirtual

Implements inviwo::FileDialog.

◆ addExtensions()

virtual void inviwo::InviwoFileDialog::addExtensions ( const std::vector< FileExtension > & extensions)
overridevirtual

Implements inviwo::FileDialog.

◆ getAcceptMode()

virtual inviwo::AcceptMode inviwo::InviwoFileDialog::getAcceptMode ( ) const
overridevirtual

Implements inviwo::FileDialog.

◆ getContentType()

virtual std::string inviwo::InviwoFileDialog::getContentType ( ) const
overridevirtual

Implements inviwo::FileDialog.

◆ getFileMode()

virtual inviwo::FileMode inviwo::InviwoFileDialog::getFileMode ( ) const
overridevirtual

Implements inviwo::FileDialog.

◆ getSelectedFileExtension()

virtual FileExtension inviwo::InviwoFileDialog::getSelectedFileExtension ( ) const
overridevirtual

Implements inviwo::FileDialog.

◆ getSelectedFiles()

virtual std::vector< std::filesystem::path > inviwo::InviwoFileDialog::getSelectedFiles ( ) const
overridevirtual

Implements inviwo::FileDialog.

◆ setAcceptMode()

virtual void inviwo::InviwoFileDialog::setAcceptMode ( inviwo::AcceptMode mode)
overridevirtual

Implements inviwo::FileDialog.

◆ setContentType()

virtual void inviwo::InviwoFileDialog::setContentType ( std::string_view contentType)
overridevirtual

Implements inviwo::FileDialog.

◆ setCurrentDirectory()

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

set the current directory of the file dialog

Parameters
pathgiven path, must not contain a file name

Implements inviwo::FileDialog.

◆ setCurrentFile()

virtual void inviwo::InviwoFileDialog::setCurrentFile ( const std::filesystem::path & 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.

◆ setFileMode()

virtual void inviwo::InviwoFileDialog::setFileMode ( inviwo::FileMode mode)
overridevirtual

Implements inviwo::FileDialog.

◆ setSelectedExtension()

virtual void inviwo::InviwoFileDialog::setSelectedExtension ( const FileExtension & ext)
overridevirtual

Implements inviwo::FileDialog.

◆ setTitle()

virtual void inviwo::InviwoFileDialog::setTitle ( std::string_view title)
overridevirtual

Implements inviwo::FileDialog.

◆ show()

virtual bool inviwo::InviwoFileDialog::show ( )
overridevirtual

Implements inviwo::FileDialog.


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