OpenMS
2.6.0
|
A simple widget with a line-edit and a browse button to choose filenames. More...
#include <OpenMS/VISUAL/InputFile.h>
Public Slots | |
void | showFileDialog () |
Lets the user select the file via a file dialog. More... | |
Signals | |
void | updatedCWD (QString new_cwd) |
emitted when a new file is added (by drag'n'drop or 'Browse' button) More... | |
void | updatedFile (QString new_path) |
emitted when a new file is added (by drag'n'drop or 'Browse' button) More... | |
Public Member Functions | |
InputFile (QWidget *parent) | |
Constructor. More... | |
~InputFile () | |
Destructor. More... | |
void | dragEnterEvent (QDragEnterEvent *e) override |
support drag'n'drop of files from OS window manager More... | |
void | dropEvent (QDropEvent *e) override |
support drag'n'drop of files from OS window manager More... | |
void | dragMoveEvent (QDragMoveEvent *pEvent) override |
void | setFilename (const QString &filename) |
Sets the text in the line-edit. More... | |
QString | getFilename () const |
Returns the filename currently set in the line-edit. More... | |
void | setFileFormatFilter (const QString &fff) |
Users can only choose certain filetypes, e.g. "Transition sqLite file (*.pqp)". More... | |
const QString & | getCWD () const |
get the CWD (according to most recently added file) More... | |
void | setCWD (const QString &cwd, bool force=false) |
set the current working directory (for opening files). If the input is not empty, the cwd will not be altered, unless force is used More... | |
Protected Attributes | |
QString | file_format_filter_ |
optional filter during file browsing More... | |
QString | cwd_ |
the current working directory according to the last file added More... | |
Private Attributes | |
Ui::InputFileTemplate * | ui_ |
A simple widget with a line-edit and a browse button to choose filenames.
~InputFile | ( | ) |
Destructor.
|
override |
support drag'n'drop of files from OS window manager
|
override |
|
override |
support drag'n'drop of files from OS window manager
const QString& getCWD | ( | ) | const |
get the CWD (according to most recently added file)
QString getFilename | ( | ) | const |
Returns the filename currently set in the line-edit.
void setCWD | ( | const QString & | cwd, |
bool | force = false |
||
) |
set the current working directory (for opening files). If the input is not empty, the cwd will not be altered, unless force
is used
void setFileFormatFilter | ( | const QString & | fff | ) |
Users can only choose certain filetypes, e.g. "Transition sqLite file (*.pqp)".
void setFilename | ( | const QString & | filename | ) |
Sets the text in the line-edit.
|
slot |
Lets the user select the file via a file dialog.
|
signal |
emitted when a new file is added (by drag'n'drop or 'Browse' button)
|
signal |
emitted when a new file is added (by drag'n'drop or 'Browse' button)
|
protected |
the current working directory according to the last file added
|
protected |
optional filter during file browsing
|
private |