Convenience Widget showing a line edit with the path of a file or directory and a button which invokes a file choose dialog.
More...
#include <QmitkFileChooser.h>
Convenience Widget showing a line edit with the path of a file or directory and a button which invokes a file choose dialog.
Various methods are given to influence the behaviour or presentation
Definition at line 28 of file QmitkFileChooser.h.
◆ QmitkFileChooser()
QmitkFileChooser::QmitkFileChooser |
( |
QWidget * |
parent = nullptr , |
|
|
Qt::WindowFlags |
f = {} |
|
) |
| |
|
explicit |
standard ctor, init values to defaults (see methods for values)
◆ GetFile()
virtual std::string QmitkFileChooser::GetFile |
( |
| ) |
const |
|
virtual |
returns the currently set file (an absolute path)
◆ IsValidFile()
bool QmitkFileChooser::IsValidFile |
( |
| ) |
const |
returns whether the selected file/directory exists
◆ NewFileSelected
void QmitkFileChooser::NewFileSelected |
( |
const std::string & |
| ) |
|
|
signal |
emitted when the input changed programmatically or by the user
◆ OnFileEditingFinished
virtual void QmitkFileChooser::OnFileEditingFinished |
( |
| ) |
|
|
protectedvirtualslot |
◆ OnSelectFileClicked
virtual void QmitkFileChooser::OnSelectFileClicked |
( |
bool |
| ) |
|
|
protectedvirtualslot |
◆ SetFile()
void QmitkFileChooser::SetFile |
( |
const std::string & |
file | ) |
|
sets the file input, default=""
◆ SetFileMustExist()
void QmitkFileChooser::SetFileMustExist |
( |
bool |
fileMustExist | ) |
|
determines whether the file/directory mustexist default=true
◆ SetFilePattern()
void QmitkFileChooser::SetFilePattern |
( |
const std::string & |
filepattern | ) |
|
sets a file pattern to be selected, default=""
◆ SetHorizotalLayout()
void QmitkFileChooser::SetHorizotalLayout |
( |
bool |
horizontalLayout | ) |
|
determines whether the button "Select file" is shown on the left underneath the line edit, default=false (=is shown in a vertical layout)
◆ SetReadOnly()
void QmitkFileChooser::SetReadOnly |
( |
bool |
ReadOnly | ) |
|
sets whether the user can edit the input, default=false
◆ SetSelectDir()
void QmitkFileChooser::SetSelectDir |
( |
bool |
selectDir | ) |
|
determines whether the selection must be a directory default=false
◆ m_File
QLineEdit* QmitkFileChooser::m_File |
|
protected |
◆ m_FileMustExist
bool QmitkFileChooser::m_FileMustExist |
|
protected |
◆ m_FilePattern
QString QmitkFileChooser::m_FilePattern |
|
protected |
◆ m_SelectDir
bool QmitkFileChooser::m_SelectDir |
|
protected |
◆ m_SelectFile
QPushButton* QmitkFileChooser::m_SelectFile |
|
protected |
The documentation for this class was generated from the following file: