Defines a component for choose a file. More...
#include <FileDialog.h>
Public Types | |
| enum | FileType { RASTER, VECTOR } | 
Public Member Functions | |
| void | exec () | 
| This method will open the dialog of file selection and populate the class members with the chosen file path.  More... | |
| FileDialog (QWidget *parent, FileType type, std::string pathInfo="") | |
| Constructor.  More... | |
| std::string | getExtension () | 
| This method will return the file extension.  More... | |
| std::string | getFileName () | 
| This method will return the file name.  More... | |
| std::map< QString, QString > | getMappedExtensions (QString extensions) | 
| Genarate an extensions map with the extensions returned by driver.  More... | |
| std::string | getPath () | 
| This method will return the chosen path.  More... | |
| bool | hasInvalidCharacters (std::string filename) | 
| Verify if the file name has special characters.  More... | |
| void | setExtension (std::string filePath) | 
| Sets the file extension.  More... | |
| void | setFileName (std::string filePath) | 
| Sets the file name.  More... | |
| void | setPath (std::string filePath) | 
| Sets the file path.  More... | |
| ~FileDialog () | |
| Destructor.  More... | |
Private Attributes | |
| std::string | m_extension | 
| The extension of the file.  More... | |
| std::string | m_fileInfo | 
| The file path info.  More... | |
| std::string | m_fileName | 
| The name of the file.  More... | |
| QWidget * | m_parent | 
| The QWidget parent argumnt.  More... | |
| std::string | m_path | 
| The path of the file.  More... | |
| FileType | m_type | 
| The type of file.  More... | |
Defines a component for choose a file.
This class is used to create a QFileDialog in order to facilitate the use of file path, file name and file extension.
Definition at line 52 of file FileDialog.h.
| Enumerator | |
|---|---|
| RASTER | |
| VECTOR | |
Definition at line 56 of file FileDialog.h.
| te::qt::widgets::FileDialog::FileDialog | ( | QWidget * | parent, | 
| FileType | type, | ||
| std::string | pathInfo = ""  | 
        ||
| ) | 
Constructor.
| parent | The QWidget parent argumnt. | 
      
  | 
  inline | 
Destructor.
Definition at line 71 of file FileDialog.h.
| void te::qt::widgets::FileDialog::exec | ( | ) | 
This method will open the dialog of file selection and populate the class members with the chosen file path.
| std::string te::qt::widgets::FileDialog::getExtension | ( | ) | 
This method will return the file extension.
| std::string te::qt::widgets::FileDialog::getFileName | ( | ) | 
This method will return the file name.
| std::map<QString, QString> te::qt::widgets::FileDialog::getMappedExtensions | ( | QString | extensions | ) | 
Genarate an extensions map with the extensions returned by driver.
| The | extensions returned by driver. | 
| std::string te::qt::widgets::FileDialog::getPath | ( | ) | 
This method will return the chosen path.
| bool te::qt::widgets::FileDialog::hasInvalidCharacters | ( | std::string | filename | ) | 
Verify if the file name has special characters.
| The | name of the file. | 
| void te::qt::widgets::FileDialog::setExtension | ( | std::string | filePath | ) | 
Sets the file extension.
| The | file path with a file and an extension. | 
| void te::qt::widgets::FileDialog::setFileName | ( | std::string | filePath | ) | 
Sets the file name.
| The | file path with a file name. | 
| void te::qt::widgets::FileDialog::setPath | ( | std::string | filePath | ) | 
Sets the file path.
| The | file path. | 
      
  | 
  private | 
The extension of the file.
Definition at line 134 of file FileDialog.h.
      
  | 
  private | 
The file path info.
Definition at line 131 of file FileDialog.h.
      
  | 
  private | 
The name of the file.
Definition at line 133 of file FileDialog.h.
      
  | 
  private | 
The QWidget parent argumnt.
Definition at line 129 of file FileDialog.h.
      
  | 
  private | 
The path of the file.
Definition at line 132 of file FileDialog.h.
      
  | 
  private | 
The type of file.
Definition at line 130 of file FileDialog.h.