![]() |
OpenMS
|
A widget shows a list of input files (i.e. existing files on a mounted drive), which allows adding/removing files and supports drag'n'drop from the window manager. More...
#include <OpenMS/VISUAL/InputFileList.h>
Public Slots | |
| void | showFileDialog () |
| Lets the user select files via a file dialog. More... | |
| void | removeSelected () |
| Removes all currently selected files from the list. More... | |
| void | removeAll () |
| Removes all files from the list. More... | |
| void | editCurrentItem () |
| Shows a TOPPASInputFileDialog which edits the current item. More... | |
Signals | |
| void | updatedCWD (QString new_cwd) |
| emitted when a new file is added (by drag'n'drop or 'Add..' button) More... | |
Public Member Functions | |
| InputFileList (QWidget *parent=nullptr) | |
| C'tor. More... | |
| ~InputFileList () | |
| 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 | getFilenames (QStringList &files) const |
Stores the list of all filenames in the list widget in files. More... | |
| StringList | getFilenames () const |
Stores the list of all filenames in the list widget in files. More... | |
| void | setFilenames (const QStringList &files) |
| Set the list of all filenames in the list widget. 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), but only if the current input list is not already populated. Use force to set the CWD in any case. More... | |
| void | keyPressEvent (QKeyEvent *e) override |
| support Ctrl+C to copy currently selected items to clipboard More... | |
Protected Member Functions | |
| void | addFiles_ (const QStringList &files) |
| add files to the list, and update 'cwd_' by using the path of the last filename More... | |
| void | updateCWD_ () |
| updates the CWD, based on the last file in the current list More... | |
Protected Attributes | |
| QString | cwd_ |
| current working dir, i.e. the last position a file was added from More... | |
Private Attributes | |
| Ui::InputFileList * | ui_ |
A widget shows a list of input files (i.e. existing files on a mounted drive), which allows adding/removing files and supports drag'n'drop from the window manager.
|
explicit |
C'tor.
| ~InputFileList | ( | ) |
|
protected |
add files to the list, and update 'cwd_' by using the path of the last filename
|
override |
support drag'n'drop of files from OS window manager
|
override |
|
override |
support drag'n'drop of files from OS window manager
|
slot |
Shows a TOPPASInputFileDialog which edits the current item.
| const QString& getCWD | ( | ) | const |
get the CWD (according to most recently added file)
| StringList getFilenames | ( | ) | const |
Stores the list of all filenames in the list widget in files.
| void getFilenames | ( | QStringList & | files | ) | const |
Stores the list of all filenames in the list widget in files.
|
override |
support Ctrl+C to copy currently selected items to clipboard
|
slot |
Removes all files from the list.
|
slot |
Removes all currently selected files from the list.
| void setCWD | ( | const QString & | cwd, |
| bool | force = false |
||
| ) |
set the current working directory (for opening files), but only if the current input list is not already populated. Use force to set the CWD in any case.
| void setFilenames | ( | const QStringList & | files | ) |
Set the list of all filenames in the list widget.
|
slot |
Lets the user select files via a file dialog.
|
protected |
updates the CWD, based on the last file in the current list
|
signal |
emitted when a new file is added (by drag'n'drop or 'Add..' button)
|
protected |
current working dir, i.e. the last position a file was added from
|
private |